Loading src/ComponentServiceProvider.php +5 −4 Original line number Diff line number Diff line Loading @@ -3,19 +3,20 @@ namespace Drupal\component; use Drupal\Core\DependencyInjection\ContainerBuilder; use Drupal\Core\DependencyInjection\ServiceProviderInterface; use Drupal\Core\DependencyInjection\ServiceProviderBase; use Symfony\Component\DependencyInjection\Reference; class ComponentServiceProvider implements ServiceProviderInterface { class ComponentServiceProvider extends ServiceProviderBase { /** * {@inheritdoc} */ public function register(ContainerBuilder $container) { public function alter(ContainerBuilder $container) { // @todo Delete this when dropping Drupal 8 support. if ($container->has('component.discovery') && version_compare(\Drupal::VERSION, '9.0', '<')) { // @see https://www.drupal.org/project/drupal/issues/3074585 $container->getDefinition('component.discovery') ->setArgument(0, '@app.root'); ->setArgument(0, new Reference('app.root')); } } Loading Loading
src/ComponentServiceProvider.php +5 −4 Original line number Diff line number Diff line Loading @@ -3,19 +3,20 @@ namespace Drupal\component; use Drupal\Core\DependencyInjection\ContainerBuilder; use Drupal\Core\DependencyInjection\ServiceProviderInterface; use Drupal\Core\DependencyInjection\ServiceProviderBase; use Symfony\Component\DependencyInjection\Reference; class ComponentServiceProvider implements ServiceProviderInterface { class ComponentServiceProvider extends ServiceProviderBase { /** * {@inheritdoc} */ public function register(ContainerBuilder $container) { public function alter(ContainerBuilder $container) { // @todo Delete this when dropping Drupal 8 support. if ($container->has('component.discovery') && version_compare(\Drupal::VERSION, '9.0', '<')) { // @see https://www.drupal.org/project/drupal/issues/3074585 $container->getDefinition('component.discovery') ->setArgument(0, '@app.root'); ->setArgument(0, new Reference('app.root')); } } Loading