-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[DependencyInjection] Remove deprecations across the component #50578
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
864df90 to
284a935
Compare
src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredPropertiesPass.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredPropertiesPass.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php
Outdated
Show resolved
Hide resolved
9a62ed7 to
0757d42
Compare
nicolas-grekas
left a comment
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.
WitherAnnotationStaticReturnType, etc, there are still many fixtures that should be removed.
Using grep for "deprecated" in the component might help. Careful self-review also.
Thanks! 🙏
0757d42 to
d835121
Compare
|
(failures are related) |
|
I'll have a look at them, thank you for investigating Nicolas! |
…ce`, `ContainerAwareTrait` and `ContainerAwareLoader` (alexandre-daubois) This PR was merged into the 6.4 branch. Discussion ---------- [DependencyInjection] Deprecate `ContainerAwareInterface`, `ContainerAwareTrait` and `ContainerAwareLoader` | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | yes | Tickets | - | License | MIT | Doc PR | - As discussed in #50578 (comment) Commits ------- fc3c572 [DependencyInjection] Deprecate `ContainerAwareInterface`, `ContainerAwareTrait` and `ContainerAwareLoader`
d835121 to
eadf0b7
Compare
src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php
Outdated
Show resolved
Hide resolved
|
I'm currently having a look at the failing job https://github.com/symfony/symfony/actions/runs/5335835620/jobs/9669640171?pr=50578 |
4a863f8 to
e3d816e
Compare
src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php
Outdated
Show resolved
Hide resolved
32cb2fc to
0b9660f
Compare
cd33c9b to
cb0e036
Compare
6eda6bf to
60cdce8
Compare
60cdce8 to
8730286
Compare
8730286 to
cc4ef49
Compare
…(nicolas-grekas) This PR was merged into the 6.4 branch. Discussion ---------- [HttpKernel] Do not use ContainerAwareInterface anymore | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Similar to #50824, keeping this interface blocks compat of HK v6 with DI v7 for no good reasons. Let's drop ContainerAwareInterface from BundleInterface, it serves no purpose anyway. Unlocks #50578 Commits ------- 640c72a [HttpKernel] Do not use ContainerAwareInterface anymore
|
Thank you @alexandre-daubois. |
…handling (MatTheCat) This PR was merged into the 7.2 branch. Discussion ---------- [DependencyInjection] Fix `ServiceLocatorTagPass` indexes handling | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #60651 | License | MIT #50578 changed the `ServiceLocatorTagPass`’ behavior so that if the map is a list, its indexes always are replaced by the corresponding reference ID, even if they come from the `PriorityTaggedServiceTrait`. That means if your service map ends up as a list because e.g. your `default_index_method` returned contiguous integer, its indexes will be replaced. This PR reverts this change so that it works the same than v6. Commits ------- a73c9d1 [DependencyInjection] Fix `ServiceLocatorTagPass` indexes handling
#[MapDecorated], use#[AutowireDecorated]insteadProxyHelper, useSymfony\Component\VarExporter\ProxyHelperinsteadReferenceSetArgumentTrait@requiredannotation, use theSymfony\Contracts\Service\Attribute\Requiredattribute insteadnulltoContainerAwareTrait::setContainer()must be done explicitlyPhpDumperoptionsinline_factories_parameterandinline_class_loader_parameter, use optionsinline_factoriesandinline_class_loaderinsteadParameterBagcannot be numericsContainerAwareInterfaceandContainerAwareTrait, use dependency injection insteadContainerAwareLoader, use dependency injection in your fixtures instead