-
-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SeoBundle] Added event to populate robots.txt #2937
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @, your PR needs some changes
- This PR seems to need a milestone of a minor release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @, your PR passed all our requirements.
Thank you for contributing!
00daad2
to
d08210b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.