[SeoBundle] Added event to populate robots.txt#2937
[SeoBundle] Added event to populate robots.txt#2937waaghals wants to merge 3 commits intoKunstmaan:masterfrom
Conversation
ProfessorKuma
left a comment
There was a problem hiding this comment.
Hi @, your PR needs some changes
- This PR seems to need a milestone of a minor release.
ProfessorKuma
left a comment
There was a problem hiding this comment.
Hi @, your PR passed all our requirements.
Thank you for contributing!
00daad2 to
d08210b
Compare
acrobat
left a comment
There was a problem hiding this comment.
Is there a specific reason every action/check for robots file/content is moved to an event listener? I would think it would enough to keep the current behaviour and just dispatch an event at the end that would allow you to hook into the robots content and modify it or event fully replace it.
Is there a specific need for this setup?
|
My reasoning was to allow for easier changing of the logic. By making smaller listeners this could easily be done by only replacing |
I've used events to generate a robots.txt. This makes for an easy extension point for dynamically modifing the robots.txt.
I'm having doubts about the working of
Kunstmaan\SeoBundle\EventListener\FileRobotsTxtListener.It no longer uses the request's basepath. But I do not understand how it could have worked previously, as the controller would never be called when the file exists in te public directory.