By longwave on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.3.x
Introduced in version:
10.3.0
Issue links:
Description:
Symfony's \Symfony\Component\DependencyInjection\ContainerAwareInterface and \Symfony\Component\DependencyInjection\ContainerAwareTrait are deprecated in Symfony 6.4 and removed in Symfony 7.0.
Drupal's \Drupal\Core\Utility\CallableResolver and \Drupal\Core\DependencyInjection\ClassResolver services previously supported ContainerAwareInterface to allow classes to access the whole dependency injection container. This is now deprecated in Drupal 10.3.0 and will not be supported in Drupal 11.
Instead, implement \Drupal\Core\DependencyInjection\ContainerInjectionInterface and implement a create() factory method to inject only the services you need from the container.
Impacts:
Module developers