Problem/Motivation

In #3392616-5: Update to Symfony 6.4 we've found out that the Symfony\Component\DependencyInjection\ContainerAwareTrait and Symfony\Component\DependencyInjection\ContainerAwareInterface are being deprecated in Symfony 6.4.

Although we can't get rid off all implementations and will need to fork those into core, we want to get rid of as many usage as possible. We have figured out ways to remove all uses so this is deprecated in Drupal 10 and will not be supported in Drupal 11.

This issue exists as a META to group all removal of usage.

Steps to reproduce

Proposed resolution

Remaining tasks

#3416354: Inject services into LoggerChannelFactory
#3431362: Remove support for ContainerAwareInterface

User interface changes

API changes

Data model changes

Release notes snippet

Comments

Spokje created an issue. See original summary.

spokje’s picture

Status: Active » Fixed

All children fixed.

alexpott’s picture

Version: 11.x-dev » 10.2.x-dev

The child issues were resolved in 10.2.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

longwave’s picture

Version: 10.2.x-dev » 11.x-dev
Status: Closed (fixed) » Active

Forgot this existed. This would be a better parent for many of the child issues I am creating than #3397522: Fork Symfony's ContainerAwareTrait and ContainerAwareInterface into core, so reopening.

andypost’s picture

Probably \Drupal\Core\DependencyInjection\ClassResolver::getInstanceFromDefinition() still should use deprecated interface for BC

    if ($instance instanceof ContainerAwareInterface) {
      $instance->setContainer($this->container);
    }
andypost’s picture

longwave’s picture

gábor hojtsy’s picture

What else is left here? This the only issue left from the parent's issue summary. Also #3431362: Remove support for ContainerAwareInterface is linked from the parent, how are the two related?

longwave’s picture

Issue summary: View changes

Reparented the final removal under this issue, updated the IS as we can actually remove all implementations here.

andypost’s picture

Status: Active » Reviewed & tested by the community
catch’s picture

Status: Reviewed & tested by the community » Fixed

Just committed #3416354: Inject services into LoggerChannelFactory too. Nice to get all these done!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.