Skip to content
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

[DependencyInjection] Remove deprecations across the component #50578

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

alexandre-daubois
Copy link
Member

@alexandre-daubois alexandre-daubois commented Jun 6, 2023

Q A
Branch? 7.0
Bug fix? no
New feature? yes
Deprecations? no
Tickets -
License MIT
Doc PR -
  • Remove #[MapDecorated], use #[AutowireDecorated] instead
  • Remove ProxyHelper, use Symfony\Component\VarExporter\ProxyHelper instead
  • Remove ReferenceSetArgumentTrait
  • Remove support of @required annotation, use the Symfony\Contracts\Service\Attribute\Required attribute instead
  • Passing null to ContainerAwareTrait::setContainer() must be done explicitly
  • Remove PhpDumper options inline_factories_parameter and inline_class_loader_parameter, use options inline_factories and inline_class_loader instead
  • Parameter names of ParameterBag cannot be numerics
  • Remove ContainerAwareInterface and ContainerAwareTrait, use dependency injection instead
  • Remove ContainerAwareLoader, use dependency injection in your fixtures instead

@alexandre-daubois alexandre-daubois force-pushed the di-deprecations branch 2 times, most recently from 9a62ed7 to 0757d42 Compare June 9, 2023 12:02
Copy link
Member

@nicolas-grekas nicolas-grekas left a 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! 🙏

@nicolas-grekas
Copy link
Member

(failures are related)

@alexandre-daubois
Copy link
Member Author

I'll have a look at them, thank you for investigating Nicolas!

nicolas-grekas added a commit that referenced this pull request Jun 20, 2023
…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`
@alexandre-daubois
Copy link
Member Author

alexandre-daubois commented Jun 21, 2023

I'm currently having a look at the failing job /~https://github.com/symfony/symfony/actions/runs/5335835620/jobs/9669640171?pr=50578

@alexandre-daubois alexandre-daubois force-pushed the di-deprecations branch 2 times, most recently from 4a863f8 to e3d816e Compare June 21, 2023 15:26
@alexandre-daubois alexandre-daubois force-pushed the di-deprecations branch 2 times, most recently from 32cb2fc to 0b9660f Compare June 22, 2023 08:34
@nicolas-grekas nicolas-grekas force-pushed the di-deprecations branch 2 times, most recently from cd33c9b to cb0e036 Compare June 30, 2023 13:14
@alexandre-daubois alexandre-daubois force-pushed the di-deprecations branch 4 times, most recently from 6eda6bf to 60cdce8 Compare June 30, 2023 15:11
nicolas-grekas added a commit that referenced this pull request Jun 30, 2023
…(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
@nicolas-grekas
Copy link
Member

Thank you @alexandre-daubois.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants