commit dd771ebf91cce6dc926dd68c76a277c740b509af Author: Jibran Ijaz Date: Sat Dec 3 08:29:24 2016 +1100 oye diff --git a/core/lib/Drupal/Component/DependencyInjection/Container.php b/core/lib/Drupal/Component/DependencyInjection/Container.php index 6fde12d..199f52b 100644 --- a/core/lib/Drupal/Component/DependencyInjection/Container.php +++ b/core/lib/Drupal/Component/DependencyInjection/Container.php @@ -41,10 +41,6 @@ * getAServiceWithAnIdByCamelCase(). * - The function getServiceIds() was added as it has a use-case in core and * contrib. - * - Scopes are explicitly not allowed, because Symfony 2.8 has deprecated - * them and they will be removed in Symfony 3.0. - * - Synchronized services are explicitly not supported, because Symfony 2.8 has - * deprecated them and they will be removed in Symfony 3.0. * * @ingroup container */ @@ -309,12 +305,8 @@ protected function createService(array $definition, $id) { } } - // Share the service if it is public. - if (!isset($definition['public']) || $definition['public'] !== FALSE) { - // Forward compatibility fix for Symfony 2.8 update. - if (!isset($definition['shared']) || $definition['shared'] !== FALSE) { - $this->services[$id] = $service; - } + if (!isset($definition['shared']) || $definition['shared'] !== FALSE) { + $this->services[$id] = $service; } if (isset($definition['calls'])) { diff --git a/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php b/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php index 3ec2086..91577c3 100644 --- a/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php +++ b/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php @@ -136,12 +136,8 @@ protected function createService(array $definition, $id) { } } - // Share the service if it is public. - if (!isset($definition['public']) || $definition['public'] !== FALSE) { - // Forward compatibility fix for Symfony 2.8 update. - if (!isset($definition['shared']) || $definition['shared'] !== FALSE) { - $this->services[$id] = $service; - } + if (!isset($definition['shared']) || $definition['shared'] !== FALSE) { + $this->services[$id] = $service; } if (isset($definition['calls'])) { diff --git a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php index da1c08c..d999450 100644 --- a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php +++ b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php @@ -168,21 +168,10 @@ private function parseDefinition($id, $service, $file) $definition->setShared($service['shared']); } - if (isset($service['scope'])) { - if ('request' !== $id) { - @trigger_error(sprintf('The "scope" key of service "%s" in file "%s" is deprecated since version 2.8 and will be removed in 3.0.', $id, $file), E_USER_DEPRECATED); - } - $definition->setScope($service['scope'], false); - } - if (isset($service['synthetic'])) { $definition->setSynthetic($service['synthetic']); } - if (isset($service['synchronized'])) { - $definition->setSynchronized($service['synchronized'], 'request' !== $id); - } - if (isset($service['lazy'])) { $definition->setLazy($service['lazy']); } @@ -213,15 +202,15 @@ private function parseDefinition($id, $service, $file) } if (isset($service['factory_class'])) { - $definition->setFactoryClass($service['factory_class']); + $definition->setFactory($service['factory_class']); } if (isset($service['factory_method'])) { - $definition->setFactoryMethod($service['factory_method']); + $definition->setFactory($service['factory_method']); } if (isset($service['factory_service'])) { - $definition->setFactoryService($service['factory_service']); + $definition->setFactory($service['factory_service']); } if (isset($service['file'])) {