Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Deprecate routing annotation of FrameworkExtraBundle in favor of Symfony Core #562

Merged
merged 1 commit into from
Feb 24, 2018

Conversation

Tobion
Copy link
Collaborator

@Tobion Tobion commented Feb 24, 2018

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 Annotation routing in the core symfony/symfony#25103

This resolves symfony/symfony#25103

@Tobion Tobion force-pushed the deprecate-routing-annotations branch 2 times, most recently from 2a31619 to 417fb40 Compare February 24, 2018 01:32
@Tobion Tobion force-pushed the deprecate-routing-annotations branch from 417fb40 to 444683c Compare February 24, 2018 01:46
@fabpot
Copy link
Member

fabpot commented Feb 24, 2018

Thank you @Tobion.

@fabpot fabpot merged commit 444683c into sensiolabs:master Feb 24, 2018
fabpot added a commit that referenced this pull request Feb 24, 2018
…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
@Tobion Tobion deleted the deprecate-routing-annotations branch February 24, 2018 14:12

/**
* @Route(service="test.invokable_class_level.predefined")
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

Copy link
Contributor

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.

Tobion added a commit to Tobion/symfony-docs that referenced this pull request Jun 30, 2018
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.
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Jul 24, 2018
…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
Guikingone pushed a commit to Guikingone/symfony-docs that referenced this pull request Feb 12, 2019
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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants