diff --git a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php index d52fb89..5ab9ce6 100644 --- a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php +++ b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php @@ -235,18 +235,6 @@ protected function getServiceDefinition(Definition $definition) { $service['calls'] = $this->dumpMethodCalls($definition->getMethodCalls()); } - if (($scope = $definition->getScope()) !== ContainerInterface::SCOPE_CONTAINER) { - if ($scope === ContainerInterface::SCOPE_PROTOTYPE) { - // Scope prototype has been replaced with 'shared' => FALSE. - // This is a Symfony 2.8 forward compatibility fix. - // Reference: https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.8.md#dependencyinjection - $service['shared'] = FALSE; - } - else { - throw new InvalidArgumentException("The 'scope' definition is deprecated in Symfony 3.0 and not supported by Drupal 8."); - } - } - // By default services are shared, so just provide the flag, when needed. if ($definition->isShared() === FALSE) { $service['shared'] = $definition->isShared(); diff --git a/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php b/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php index df8203d..824ebf0 100644 --- a/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php +++ b/core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php @@ -201,11 +201,11 @@ protected function shareService(Definition $definition, $service, $id) * ContainerBuilder class should be fixed to allow setting synthetic * services in a frozen builder. */ - public function set($id, $service, $scope = self::SCOPE_CONTAINER) { + public function set($id, $service) { if (strtolower($id) !== $id) { throw new \InvalidArgumentException("Service ID names must be lowercase: $id"); } - SymfonyContainer::set($id, $service, $scope); + SymfonyContainer::set($id, $service); // Ensure that the _serviceId property is set on synthetic services as well. if (isset($this->services[$id]) && is_object($this->services[$id]) && !isset($this->services[$id]->_serviceId)) {