Security update for Core, with self-updated composer
[yaffs-website] / web / core / lib / Drupal / Component / DependencyInjection / Container.php
index 673736954526fbee7e98b379ff84a2000d0cfd4b..ac6a6f65d92cb93066649395b1b10bd026fd4c36 100644 (file)
@@ -3,9 +3,7 @@
 namespace Drupal\Component\DependencyInjection;
 
 use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\IntrospectableContainerInterface;
 use Symfony\Component\DependencyInjection\ResettableContainerInterface;
-use Symfony\Component\DependencyInjection\ScopeInterface;
 use Symfony\Component\DependencyInjection\Exception\LogicException;
 use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
 use Symfony\Component\DependencyInjection\Exception\RuntimeException;
@@ -43,14 +41,10 @@ use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceExce
  *   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
  */
-class Container implements IntrospectableContainerInterface, ResettableContainerInterface {
+class Container implements ContainerInterface, ResettableContainerInterface {
 
   /**
    * The parameters of the container.
@@ -311,12 +305,8 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
       }
     }
 
-    // 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'])) {
@@ -361,11 +351,7 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
   /**
    * {@inheritdoc}
    */
-  public function set($id, $service, $scope = ContainerInterface::SCOPE_CONTAINER) {
-    if (!in_array($scope, ['container', 'request']) || ('request' === $scope && 'request' !== $id)) {
-      @trigger_error('The concept of container scopes is deprecated since version 2.8 and will be removed in 3.0. Omit the third parameter.', E_USER_DEPRECATED);
-    }
-
+  public function set($id, $service) {
     $this->services[$id] = $service;
   }
 
@@ -587,61 +573,6 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
     return $this->getAlternatives($name, array_keys($this->parameters));
   }
 
-
-  /**
-   * {@inheritdoc}
-   */
-  public function enterScope($name) {
-    if ('request' !== $name) {
-      @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
-    }
-
-    throw new \BadMethodCallException(sprintf("'%s' is not supported by Drupal 8.", __FUNCTION__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function leaveScope($name) {
-    if ('request' !== $name) {
-      @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
-    }
-
-    throw new \BadMethodCallException(sprintf("'%s' is not supported by Drupal 8.", __FUNCTION__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function addScope(ScopeInterface $scope) {
-
-    $name = $scope->getName();
-    if ('request' !== $name) {
-      @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
-    }
-    throw new \BadMethodCallException(sprintf("'%s' is not supported by Drupal 8.", __FUNCTION__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function hasScope($name) {
-    if ('request' !== $name) {
-      @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
-    }
-
-    throw new \BadMethodCallException(sprintf("'%s' is not supported by Drupal 8.", __FUNCTION__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function isScopeActive($name) {
-    @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
-
-    throw new \BadMethodCallException(sprintf("'%s' is not supported by Drupal 8.", __FUNCTION__));
-  }
-
   /**
    * Gets all defined service IDs.
    *
@@ -655,8 +586,7 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
   /**
    * Ensure that cloning doesn't work.
    */
-  private function __clone()
-  {
+  private function __clone() {
   }
 
 }