- 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.");
- }
- }
-