-
Notifications
You must be signed in to change notification settings - Fork 277
Deprecate routing annotation of FrameworkExtraBundle in favor of Symfony Core #562
Deprecate routing annotation of FrameworkExtraBundle in favor of Symfony Core #562
Conversation
2a31619
to
417fb40
Compare
417fb40
to
444683c
Compare
Thank you @Tobion. |
…favor of Symfony Core (Tobion) This PR was merged into the 5.1.x-dev branch. Discussion ---------- Deprecate routing annotation of FrameworkExtraBundle in favor of Symfony Core Since symfony/symfony#23044 routing annotation is part of Symfony Core. The only extra features that the routing annotation from SensioFrameworkExtraBundle has are - service config for `@Route` which we don't need anymore - Either you use class-named services, then you don't need the "service" property at all. - Or you don't use class-named services. In this case the better solution to me, is for people to create a alias in the container from the controller class to to service id instead of specifying the service id in the routing. Then you're set as well and that is already common practice with autowiring. - `@Method` does not provide real value as people agree in symfony/symfony#25103 This resolves symfony/symfony#25103 Commits ------- 444683c Deprecate routing annotation of FrameworkExtraBundle in favor of Symfony Core
|
||
/** | ||
* @Route(service="test.invokable_class_level.predefined") |
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.
wasn't this meant to test the routing loader of this bundle ? Testing the Symfony one does not make sense here.
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.
I would assume no, as this test is part of the TemplateAnnotationTest.
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.
I think I originally created these tests to prevent regressions for the @Template
annotation. I simply registered them as service this way, so my best guess is that this can be removed.
The routing annotations of SensioFrameworkExtraBundle are deprecate since sensiolabs/SensioFrameworkExtraBundle#562 Also the example code in this documentation does not use SensioFrameworkExtraBundle at all but the core annotation as it should be. So installing the SensioFrameworkExtraBundle is pointless.
…on, javiereguiluz) This PR was merged into the 4.0 branch. Discussion ---------- [Routing] do not install SensioFrameworkExtraBundle The routing annotations of SensioFrameworkExtraBundle are deprecate since sensiolabs/SensioFrameworkExtraBundle#562 Also the example code in this documentation does not use SensioFrameworkExtraBundle at all but the core annotation as it should be. So installing the SensioFrameworkExtraBundle is pointless. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- c98babf Reword 6119b67 [Routing] do not install SensioFrameworkExtraBundle
The routing annotations of SensioFrameworkExtraBundle are deprecate since sensiolabs/SensioFrameworkExtraBundle#562 Also the example code in this documentation does not use SensioFrameworkExtraBundle at all but the core annotation as it should be. So installing the SensioFrameworkExtraBundle is pointless.
Since symfony/symfony#23044 routing annotation is part of Symfony Core.
The only extra features that the routing annotation from SensioFrameworkExtraBundle has are
@Route
which we don't need anymore@Method
does not provide real value as people agree in Annotation routing in the core symfony/symfony#25103This resolves symfony/symfony#25103