-
Notifications
You must be signed in to change notification settings - Fork 69
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
compiler pass for route filters #71
Comments
In the meantime we abstracted that into http://cgit.drupalcode.org/drupal/tree/core/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php?id=refs/heads;id2=8.0.x which allows you to specify a service to collect other services.
and then you do something like that in the client service:
Do you think that this is something we could even push into symfony itself? |
@dawehner sorry for the late reply. are you proposing a generic way of doing compiler passes for tags? compiler passes can do all kind of things, but for the standard case of late-and-implicit hooking up services together, this seems a good idea to me. i would propose that to symfony and see if they like the idea. it seems a DX improvement to me. a variant of your proposal would be a generic compiler pass that the bundle can instantiate with the options about the receiving service and its add-method and the tag name - might be a tad more straightforward. (what would happen if we define several service collectors for the same tag?) |
feel free to ping me in the symfony/symfony issue to help with the discussion, btw. |
Port the route filters pass from drupal into the component. Left over from #70
see http://drupalcode.org/project/drupal.git/blob/refs/heads/8.x:/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterRouteFiltersPass.php
btw, why is there no priorities on the filters pass? the enhancer and router passes do have priorities. for performance reasons, priorities could also be important here.
when we do that, don't forget to enable the pass in the CmfRoutingBundle
/cc @Crell
The text was updated successfully, but these errors were encountered: