-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DependencyInjection] Deprecate autowiring service auto-registration #23712
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
Conversation
@nicolas-grekas the cs issue reported by fabbot.io was done on purpose, right? |
Right |
UPGRADE-3.4.md
Outdated
@@ -4,6 +4,10 @@ UPGRADE FROM 3.3 to 3.4 | |||
DependencyInjection | |||
------------------- | |||
|
|||
* Autowiring service auto-registration is deprecated and won't be supported | |||
in Symfony 4.0. Explicitely inject your dependencies or create services | |||
whose ids are their fully-qualified class name. |
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.
An example with before
/after
would probably help people understand what that means. For anybody not familiar with the container, this is cryptic :)
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.
Indeed but that's a deprecation that is hard to illustrate. I added an example that I tried to make as familiar as possible :)
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.
the changelog file of the DependencyInjection component needs to be updated too
UPGRADE-3.4.md
Outdated
@@ -4,6 +4,50 @@ UPGRADE FROM 3.3 to 3.4 | |||
DependencyInjection | |||
------------------- | |||
|
|||
* Autowiring service auto-registration is deprecated and won't be supported | |||
in Symfony 4.0. Explicitely inject your dependencies or create services |
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.
Explicitly
UPGRADE-4.0.md
Outdated
@@ -77,6 +77,50 @@ Debug | |||
DependencyInjection | |||
------------------- | |||
|
|||
* Autowiring service auto-registration is not supported anymore. | |||
Explicitely inject your dependencies or create services whose ids are |
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.
Explicitly
@xabbuh done |
Thank you @GuilhemN. |
…o-registration (GuilhemN) This PR was squashed before being merged into the 3.4 branch (closes #23712). Discussion ---------- [DependencyInjection] Deprecate autowiring service auto-registration | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | yes <!-- don't forget updating UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | #23350 | License | MIT | Doc PR | Fix #23350, to make autowiring more predictable. Commits ------- 969a207 [DependencyInjection] Deprecate autowiring service auto-registration
Fix #23350, to make autowiring more predictable.