-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Routing] Deprecate annotations in favor of attributes #49358
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
[Routing] Deprecate annotations in favor of attributes #49358
Conversation
Failing tests are related. I'm looking into those later today. |
src/Symfony/Component/Routing/Tests/Fixtures/TraceableAnnotationClassLoader.php
Outdated
Show resolved
Hide resolved
427785e
to
0dbcbe0
Compare
0dbcbe0
to
7bab4d6
Compare
7bab4d6
to
38b3061
Compare
44c121f
to
9737926
Compare
ec7c82a
to
09500a3
Compare
…ration (derrabus) This PR was merged into the 6.4 branch. Discussion ---------- [FrameworkBundle] Deprecate doctrine/annotations integration | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | yes | Deprecations? | yes | Tickets | N/A | License | MIT | Doc PR | TODO This PR deprecates the integration of the doctrine/annotations package in FrameworkBundle. Currently, the integration is enabled by default if `doctrine/annotations` is installed. This PR adds a runtime deprecation if the app does not explicitly disable it by setting: ```php framework: annotations: false ``` The plan is to make this the default and only valid option in Symfony 7 and remove that setting entirely in Symfony 8. This change unlocks #49358 and similar PRs that remove support for Doctrine Annotations from components. Commits ------- 2b3c954 [FrameworkBundle] Deprecate doctrine/annotations integration
09500a3
to
680f0cc
Compare
PR is ready |
95a59e5
to
288437f
Compare
The failing tests on the high-deps run can be ignored. Those tests will pass as soon as the change hits 7.0. |
288437f
to
6ce15f2
Compare
deps=high failure is related isn't it? |
|
Does it mean that the high-deps tests will fail for all the PRs until the release of 7.0 in November? |
No, they fail until 6.4 has been merged into 7.0. We can do that right after merging this PR. |
Thank you @derrabus. |
This PR was merged into the 7.0 branch. Discussion ---------- [Routing] Remove Doctrine annotations support | Q | A | ------------- | --- | Branch? | 7.0 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Follows #49358 | License | MIT | Doc PR | symfony/symfony-docs#18589 Commits ------- 4b10902 [Routing] Remove Doctrine annotations support
This PR deprecates the integration of Doctrine Annotations for the Routing component.
Attributes are the way to go now if we want to annotate controllers with routing information. Existing applications can be migrated easily using Rector.
Thus I believe that keeping support for oldschool Doctrine Annotations is not necessary anymore.
If this PR is accepted, I would work on a follow-up that renames all
Annotation*Loader
classes because the names of those classes are probably misleading as soon as they support attributes only.