diff --git a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php index d42b4c6d1d..bd3f2de73e 100644 --- a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php +++ b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php @@ -65,7 +65,7 @@ public function getArray() { $definition['aliases'] = $this->getAliases(); $definition['parameters'] = $this->getParameters(); $definition['services'] = $this->getServiceDefinitions(); - $definition['frozen'] = $this->container->isFrozen(); + $definition['frozen'] = $this->container->isCompiled(); $definition['machine_format'] = $this->supportsMachineFormat(); return $definition; } @@ -103,8 +103,8 @@ protected function getParameters() { } $parameters = $this->container->getParameterBag()->all(); - $is_frozen = $this->container->isFrozen(); - return $this->prepareParameters($parameters, $is_frozen); + $is_compiled = $this->container->isCompiled(); + return $this->prepareParameters($parameters, $is_compiled); } /** diff --git a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php index 9df17dd8d1..c87193a2f0 100644 --- a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php +++ b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; @@ -155,7 +155,7 @@ private function parseDefinition($id, $service, $file) } if (isset($service['parent'])) { - $definition = new DefinitionDecorator($service['parent']); + $definition = new ChildDefinition($service['parent']); } else { $definition = new Definition(); // As of Symfony 3.4 all services are private by default. diff --git a/core/modules/rest/src/RestServiceProvider.php b/core/modules/rest/src/RestServiceProvider.php index e705de4177..ca63bc7ae6 100644 --- a/core/modules/rest/src/RestServiceProvider.php +++ b/core/modules/rest/src/RestServiceProvider.php @@ -7,7 +7,7 @@ use Drupal\rest\LinkManager\LinkManager; use Drupal\rest\LinkManager\RelationLinkManager; use Drupal\rest\LinkManager\TypeLinkManager; -use Symfony\Component\DependencyInjection\DefinitionDecorator; +use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\Reference; /** @@ -28,21 +28,21 @@ public function register(ContainerBuilder $container) { // @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. // Use hal.link_manager instead. // @see https://www.drupal.org/node/2830467 - $service_definition = new DefinitionDecorator(new Reference('hal.link_manager')); + $service_definition = new ChildDefinition(new Reference('hal.link_manager')); $service_definition->setClass(LinkManager::class); $container->setDefinition('rest.link_manager', $service_definition); // @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. // Use hal.link_manager.type instead. // @see https://www.drupal.org/node/2830467 - $service_definition = new DefinitionDecorator(new Reference('hal.link_manager.type')); + $service_definition = new ChildDefinition(new Reference('hal.link_manager.type')); $service_definition->setClass(TypeLinkManager::class); $container->setDefinition('rest.link_manager.type', $service_definition); // @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. // Use hal.link_manager.relation instead. // @see https://www.drupal.org/node/2830467 - $service_definition = new DefinitionDecorator(new Reference('hal.link_manager.relation')); + $service_definition = new ChildDefinition(new Reference('hal.link_manager.relation')); $service_definition->setClass(RelationLinkManager::class); $container->setDefinition('rest.link_manager.relation', $service_definition); } diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php index c1b70954d1..cbd84b70fd 100644 --- a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php +++ b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php @@ -68,7 +68,7 @@ protected function setUp() { $this->containerBuilder->getAliases()->willReturn([]); $this->containerBuilder->getParameterBag()->willReturn(new ParameterBag()); $this->containerBuilder->getDefinitions()->willReturn(NULL); - $this->containerBuilder->isFrozen()->willReturn(TRUE); + $this->containerBuilder->isCompiled()->willReturn(TRUE); $definition = []; $definition['aliases'] = []; diff --git a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php index 0e487d9706..2291a0342e 100644 --- a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php +++ b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php @@ -280,8 +280,6 @@ public static function getSkippedDeprecations() { "The 'rest.entity.workflow.GET.xml' route is deprecated since version 8.5.x and will be removed in 9.0.0. Use the 'rest.entity.workflow.GET' route instead.", "The 'rest.entity.workflow.GET.hal_json' route is deprecated since version 8.5.x and will be removed in 9.0.0. Use the 'rest.entity.workflow.GET' route instead.", 'Using the unquoted scalar value "!php/object "O:8:\"stdClass\":1:{s:3:\"foo\";s:3:\"bar\";}"" is deprecated since version 3.3 and will be considered as a tagged value in 4.0. You must quote it.', - 'The Symfony\Component\DependencyInjection\Container::isFrozen() method is deprecated since version 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', - 'The Symfony\Component\DependencyInjection\DefinitionDecorator class is deprecated since version 3.3 and will be removed in 4.0. Use the Symfony\Component\DependencyInjection\ChildDefinition class instead.', 'The Symfony\Component\ClassLoader\ApcClassLoader class is deprecated since Symfony 3.3 and will be removed in 4.0. Use `composer install --apcu-autoloader` instead.', 'Using the X-Status-Code header is deprecated since version 3.3 and will be removed in 4.0. Use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent::allowCustomResponseCode() instead.', 'The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since version 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead.',