diff --git a/core/core.services.yml b/core/core.services.yml
index 90c40a9..16d6633 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -6,7 +6,9 @@ services:
       - [setContainer, ['@service_container']]
   cache_contexts:
     class: Drupal\Core\Cache\CacheContexts
-    arguments: ['@service_container', '%cache_contexts%' ]
+    arguments: ['%cache_contexts%' ]
+    calls:
+      - [setContainer, ['@service_container']]
   cache_context.url:
     class: Drupal\Core\Cache\UrlCacheContext
     arguments: ['@request']
@@ -115,13 +117,17 @@ services:
       - [setRequest, ['@?request=']]
   keyvalue:
     class: Drupal\Core\KeyValueStore\KeyValueFactory
-    arguments: ['@service_container', '@settings']
+    arguments: ['@settings']
+    calls:
+      - [setContainer, ['@service_container']]
   keyvalue.database:
     class: Drupal\Core\KeyValueStore\KeyValueDatabaseFactory
     arguments: ['@database']
   keyvalue.expirable:
     class: Drupal\Core\KeyValueStore\KeyValueExpirableFactory
-    arguments: ['@service_container', '@settings']
+    arguments: ['@settings']
+    calls:
+      - [setContainer, ['@service_container']]
   keyvalue.expirable.database:
     class: Drupal\Core\KeyValueStore\KeyValueDatabaseExpirableFactory
     tags:
@@ -187,7 +193,9 @@ services:
     arguments: ['@config.factory', '@module_handler', '@cache.default', '@info_parser', '@config.installer', '@router.builder']
   entity.manager:
     class: Drupal\Core\Entity\EntityManager
-    arguments: ['@container.namespaces', '@service_container', '@module_handler', '@cache.default', '@language_manager', '@string_translation']
+    arguments: ['@container.namespaces', '@module_handler', '@cache.default', '@language_manager', '@string_translation']
+    calls:
+      - [setContainer, ['@service_container']]
     tags:
       - { name: plugin_manager_cache_clear }
   entity.form_builder:
@@ -232,13 +240,16 @@ services:
     arguments: ['@service_container']
   controller_resolver:
     class: Drupal\Core\Controller\ControllerResolver
-    arguments: ['@service_container']
+    calls:
+      - [setContainer, ['@service_container']]
   title_resolver:
     class: Drupal\Core\Controller\TitleResolver
     arguments: ['@controller_resolver', '@string_translation']
   http_kernel:
     class: Drupal\Core\HttpKernel
-    arguments: ['@event_dispatcher', '@service_container', '@controller_resolver', '@request_stack']
+    arguments: ['@event_dispatcher', '@controller_resolver', '@request_stack']
+    calls:
+      - [setContainer, ['@service_container']]
   language_manager:
     class: Drupal\Core\Language\LanguageManager
     arguments: ['@language.default']
@@ -425,7 +436,9 @@ services:
       - { name: event_subscriber }
   route_content_form_controller_subscriber:
     class: Drupal\Core\EventSubscriber\ContentFormControllerSubscriber
-    arguments: ['@service_container', '@controller_resolver', '@form_builder']
+    arguments: ['@controller_resolver', '@form_builder']
+    calls:
+      - [setContainer, ['@service_container']]
     tags:
       - { name: event_subscriber }
   route_special_attributes_subscriber:
diff --git a/core/lib/Drupal/Core/Access/AccessManager.php b/core/lib/Drupal/Core/Access/AccessManager.php
index 42fc39a..d957de8 100644
--- a/core/lib/Drupal/Core/Access/AccessManager.php
+++ b/core/lib/Drupal/Core/Access/AccessManager.php
@@ -16,7 +16,7 @@
 use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
 use Symfony\Component\Routing\RouteCollection;
 use Symfony\Component\Routing\Route;
-use Symfony\Component\DependencyInjection\ContainerAware;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\Routing\Exception\RouteNotFoundException;
 use Symfony\Cmf\Component\Routing\RouteObjectInterface;
@@ -26,7 +26,8 @@
  *
  * @see \Drupal\Tests\Core\Access\AccessManagerTest
  */
-class AccessManager extends ContainerAware {
+class AccessManager {
+  use ContainerAwareTrait;
 
   /**
    * Array of registered access check service ids.
diff --git a/core/lib/Drupal/Core/Cache/CacheContexts.php b/core/lib/Drupal/Core/Cache/CacheContexts.php
index cbc2e9e..040c2f3 100644
--- a/core/lib/Drupal/Core/Cache/CacheContexts.php
+++ b/core/lib/Drupal/Core/Cache/CacheContexts.php
@@ -8,7 +8,7 @@
 namespace Drupal\Core\Cache;
 
 use Drupal\Core\Database\Query\SelectInterface;
-use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 
 /**
  * Defines the CacheContexts service.
@@ -17,14 +17,7 @@
  * cache key.
  */
 class CacheContexts {
-
-  /**
-   * The service container.
-   *
-   * @var \Symfony\Component\DependencyInjection\ContainerInterface
-   */
-  protected $container;
-
+  use ContainerAwareTrait;
   /**
    * Available cache contexts and corresponding labels.
    *
@@ -35,15 +28,12 @@ class CacheContexts {
   /**
    * Constructs a CacheContexts object.
    *
-   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
-   *   The current service container.
    * @param array $contexts
    *   An array of key-value pairs, where the keys are service names (which also
    *   serve as the corresponding cache context token) and the values are the
    *   cache context labels.
    */
-  public function __construct(ContainerInterface $container, array $contexts) {
-    $this->container = $container;
+  public function __construct(array $contexts) {
     $this->contexts = $contexts;
   }
 
diff --git a/core/lib/Drupal/Core/Cache/CacheFactory.php b/core/lib/Drupal/Core/Cache/CacheFactory.php
index 7f061e5..e6513c1 100644
--- a/core/lib/Drupal/Core/Cache/CacheFactory.php
+++ b/core/lib/Drupal/Core/Cache/CacheFactory.php
@@ -11,10 +11,11 @@
  * Defines the cache backend factory.
  */
 use Drupal\Component\Utility\Settings;
-use Symfony\Component\DependencyInjection\ContainerAware;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 use Symfony\Component\DependencyInjection\ContainerBuilder;
 
-class CacheFactory extends ContainerAware implements CacheFactoryInterface {
+class CacheFactory implements CacheFactoryInterface {
+  use ContainerAwareTrait;
 
   /**
    * The settings array.
diff --git a/core/lib/Drupal/Core/Controller/AjaxController.php b/core/lib/Drupal/Core/Controller/AjaxController.php
index 8d17397..c6636ce 100644
--- a/core/lib/Drupal/Core/Controller/AjaxController.php
+++ b/core/lib/Drupal/Core/Controller/AjaxController.php
@@ -8,13 +8,14 @@
 namespace Drupal\Core\Controller;
 
 use Drupal\Core\Ajax\AjaxResponseRenderer;
-use Symfony\Component\DependencyInjection\ContainerAware;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 use Symfony\Component\HttpFoundation\Request;
 
 /**
  * Default controller for Ajax requests.
  */
-class AjaxController extends ContainerAware {
+class AjaxController {
+  use ContainerAwareTrait;
 
   /**
    * The controller resolver.
diff --git a/core/lib/Drupal/Core/Controller/ControllerResolver.php b/core/lib/Drupal/Core/Controller/ControllerResolver.php
index 7928c36..eaa1623 100644
--- a/core/lib/Drupal/Core/Controller/ControllerResolver.php
+++ b/core/lib/Drupal/Core/Controller/ControllerResolver.php
@@ -11,7 +11,7 @@
 use Symfony\Component\HttpKernel\Controller\ControllerResolver as BaseControllerResolver;
 use Symfony\Component\HttpKernel\Log\LoggerInterface;
 use Symfony\Component\DependencyInjection\ContainerAwareInterface;
-use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 
 /**
  * ControllerResolver to enhance controllers beyond Symfony's basic handling.
@@ -29,13 +29,7 @@
  *    convention).
  */
 class ControllerResolver extends BaseControllerResolver implements ControllerResolverInterface {
-
-  /**
-   * The injection container that should be injected into all controllers.
-   *
-   * @var \Symfony\Component\DependencyInjection\ContainerInterface
-   */
-  protected $container;
+   use ContainerAwareTrait;
 
   /**
    * The PSR-3 logger. (optional)
@@ -47,14 +41,10 @@ class ControllerResolver extends BaseControllerResolver implements ControllerRes
   /**
    * Constructs a new ControllerResolver.
    *
-   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
-   *   A ContainerInterface instance.
    * @param \Symfony\Component\HttpKernel\Log\LoggerInterface $logger
    *   (optional) A LoggerInterface instance.
    */
-  public function __construct(ContainerInterface $container, LoggerInterface $logger = NULL) {
-    $this->container = $container;
-
+  public function __construct(LoggerInterface $logger = NULL) {
     parent::__construct($logger);
   }
 
diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php
index 3ea9429..7e3deb6 100644
--- a/core/lib/Drupal/Core/Entity/EntityManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityManager.php
@@ -24,7 +24,7 @@
 use Drupal\Core\Plugin\Discovery\InfoHookDecorator;
 use Drupal\Core\StringTranslation\TranslationInterface;
 use Drupal\Core\TypedData\TranslatableInterface;
-use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 
 /**
  * Manages entity type plugin definitions.
@@ -41,6 +41,7 @@
  * @see hook_entity_type_alter()
  */
 class EntityManager extends PluginManagerBase implements EntityManagerInterface {
+  use ContainerAwareTrait;
 
   /**
    * Extra fields by bundle.
@@ -50,13 +51,6 @@ class EntityManager extends PluginManagerBase implements EntityManagerInterface
   protected $extraFields = array();
 
   /**
-   * The injection container that should be passed into the controller factory.
-   *
-   * @var \Symfony\Component\DependencyInjection\ContainerInterface
-   */
-  protected $container;
-
-  /**
    * Contains instantiated controllers keyed by controller type and entity type.
    *
    * @var array
@@ -134,8 +128,6 @@ class EntityManager extends PluginManagerBase implements EntityManagerInterface
    * @param \Traversable $namespaces
    *   An object that implements \Traversable which contains the root paths
    *   keyed by the corresponding namespace to look for plugin implementations,
-   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
-   *   The service container this object should use.
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
    *   The module handler.
    * @param \Drupal\Core\Cache\CacheBackendInterface $cache
@@ -145,7 +137,7 @@ class EntityManager extends PluginManagerBase implements EntityManagerInterface
    * @param \Drupal\Core\StringTranslation\TranslationInterface $translation_manager
    *   The string translationManager.
    */
-  public function __construct(\Traversable $namespaces, ContainerInterface $container, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache, LanguageManager $language_manager, TranslationInterface $translation_manager) {
+  public function __construct(\Traversable $namespaces, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache, LanguageManager $language_manager, TranslationInterface $translation_manager) {
     // Allow the plugin definition to be altered by hook_entity_type_alter().
 
     $this->moduleHandler = $module_handler;
@@ -159,7 +151,6 @@ public function __construct(\Traversable $namespaces, ContainerInterface $contai
     $this->discovery = new AlterDecorator($this->discovery, 'entity_type');
     $this->discovery = new CacheDecorator($this->discovery, 'entity_type:' . $this->languageManager->getCurrentLanguage()->id, 'default', Cache::PERMANENT, array('entity_types' => TRUE));
 
-    $this->container = $container;
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Entity/Query/QueryFactory.php b/core/lib/Drupal/Core/Entity/Query/QueryFactory.php
index d046c87..f0d24ee 100644
--- a/core/lib/Drupal/Core/Entity/Query/QueryFactory.php
+++ b/core/lib/Drupal/Core/Entity/Query/QueryFactory.php
@@ -8,12 +8,13 @@
 namespace Drupal\Core\Entity\Query;
 
 use Drupal\Core\Entity\EntityManagerInterface;
-use Symfony\Component\DependencyInjection\ContainerAware;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 
 /**
  * Factory class Creating entity query objects.
  */
-class QueryFactory extends ContainerAware {
+class QueryFactory {
+  use ContainerAwareTrait;
 
   /**
    * Stores the entity manager used by the query.
diff --git a/core/lib/Drupal/Core/EventSubscriber/ContentFormControllerSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ContentFormControllerSubscriber.php
index 676d273..2c528bc 100644
--- a/core/lib/Drupal/Core/EventSubscriber/ContentFormControllerSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/ContentFormControllerSubscriber.php
@@ -13,19 +13,13 @@
 use Symfony\Component\HttpKernel\Event\GetResponseEvent;
 use Symfony\Component\HttpKernel\KernelEvents;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
-use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 
 /**
  * Subscriber for setting wrapping form logic.
  */
 class ContentFormControllerSubscriber implements EventSubscriberInterface {
-
-  /**
-   * The service container.
-   *
-   * @var \Symfony\Component\DependencyInjection\ContainerInterface
-   */
-  protected $container;
+  use ContainerAwareTrait;
 
   /**
    * The controller resolver.
@@ -44,15 +38,12 @@ class ContentFormControllerSubscriber implements EventSubscriberInterface {
   /**
    * Constructs a new ContentFormControllerSubscriber object.
    *
-   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
-   *   The service container.
    * @param \Drupal\Core\Controller\ControllerResolverInterface $resolver
    *   The controller resolver.
    * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
    *   The form builder.
    */
-  public function __construct(ContainerInterface $container, ControllerResolverInterface $resolver, FormBuilderInterface $form_builder) {
-    $this->container = $container;
+  public function __construct(ControllerResolverInterface $resolver, FormBuilderInterface $form_builder) {
     $this->resolver = $resolver;
     $this->formBuilder = $form_builder;
   }
diff --git a/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php
index e71f5ca..5309fa1 100644
--- a/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\Core\EventSubscriber;
 
-use Symfony\Component\DependencyInjection\ContainerAware;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 use Symfony\Component\HttpKernel\Event\PostResponseEvent;
 use Symfony\Component\HttpKernel\KernelEvents;
@@ -15,8 +15,8 @@
 /**
  * Destructs services that are initiated and tagged with "needs_destruction".
  */
-class KernelDestructionSubscriber extends ContainerAware implements EventSubscriberInterface {
-
+class KernelDestructionSubscriber implements EventSubscriberInterface {
+  use ContainerAwareTrait;
   /**
    * Holds an array of service ID's that will require destruction.
    *
diff --git a/core/lib/Drupal/Core/HttpKernel.php b/core/lib/Drupal/Core/HttpKernel.php
index 1f75531..b824419 100644
--- a/core/lib/Drupal/Core/HttpKernel.php
+++ b/core/lib/Drupal/Core/HttpKernel.php
@@ -14,14 +14,11 @@
 
 use Symfony\Cmf\Component\Routing\RouteObjectInterface;
 use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpFoundation\RequestStack;
 use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\HttpFoundation\StreamedResponse;
 use Symfony\Component\HttpKernel\HttpKernelInterface;
-use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
-use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpKernel\HttpKernel as BaseHttpKernel;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 
 /**
  * This HttpKernel is used to manage scope changes of the DI container.
@@ -31,29 +28,10 @@
  */
 class HttpKernel extends BaseHttpKernel
 {
-    protected $container;
+    use ContainerAwareTrait;
 
     private $esiSupport;
 
-  /**
-   * Constructs a new HttpKernel.
-   *
-   * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher
-   *   The event dispatcher.
-   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
-   *   The dependency injection container.
-   * @param \Symfony\Component\HttpKernel\Controller\ControllerResolverInterface $controller_resolver
-   *   The controller resolver.
-   * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
-   *   The request stack.
-   */
-    public function __construct(EventDispatcherInterface $dispatcher, ContainerInterface $container, ControllerResolverInterface $controller_resolver, RequestStack $request_stack = NULL)
-    {
-        parent::__construct($dispatcher, $controller_resolver, $request_stack);
-
-        $this->container = $container;
-    }
-
     public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
     {
         $request->headers->set('X-Php-Ob-Level', ob_get_level());
diff --git a/core/lib/Drupal/Core/KeyValueStore/KeyValueExpirableFactory.php b/core/lib/Drupal/Core/KeyValueStore/KeyValueExpirableFactory.php
index b1efbf0..ae40d43 100644
--- a/core/lib/Drupal/Core/KeyValueStore/KeyValueExpirableFactory.php
+++ b/core/lib/Drupal/Core/KeyValueStore/KeyValueExpirableFactory.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\Core\KeyValueStore;
 
-use Symfony\Component\DependencyInjection\ContainerInterface;
-
 /**
  * Defines the key/value store factory.
  */
diff --git a/core/lib/Drupal/Core/KeyValueStore/KeyValueFactory.php b/core/lib/Drupal/Core/KeyValueStore/KeyValueFactory.php
index a1a9d65..0d68119 100644
--- a/core/lib/Drupal/Core/KeyValueStore/KeyValueFactory.php
+++ b/core/lib/Drupal/Core/KeyValueStore/KeyValueFactory.php
@@ -7,13 +7,13 @@
 
 namespace Drupal\Core\KeyValueStore;
 use Drupal\Component\Utility\Settings;
-use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 
 /**
  * Defines the key/value store factory.
  */
 class KeyValueFactory implements KeyValueFactoryInterface {
-
+  use ContainerAwareTrait;
   /**
    * The specific setting name prefix.
    *
@@ -45,11 +45,6 @@ class KeyValueFactory implements KeyValueFactoryInterface {
   protected $stores = array();
 
   /**
-   * var \Symfony\Component\DependencyInjection\ContainerInterface
-   */
-  protected $container;
-
-  /**
    * The read-only settings container.
    *
    * @var \Drupal\Component\Utility\Settings
@@ -57,13 +52,10 @@ class KeyValueFactory implements KeyValueFactoryInterface {
   protected $settings;
 
   /**
-   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
-   *   The service container.
    * @param \Drupal\Component\Utility\Settings $settings
    *  The read-only settings container.
    */
-  function __construct(ContainerInterface $container, Settings $settings) {
-    $this->container = $container;
+  function __construct( Settings $settings) {
     $this->settings = $settings;
   }
 
diff --git a/core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php b/core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php
index 48f057b..1e53bd3 100644
--- a/core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php
+++ b/core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\Core\ParamConverter;
 
-use Symfony\Component\DependencyInjection\ContainerAware;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 use Symfony\Cmf\Component\Routing\RouteObjectInterface;
 use Symfony\Component\Routing\RouteCollection;
 use Symfony\Component\HttpFoundation\Request;
@@ -18,7 +18,8 @@
  * A typical use case for this would be upcasting (converting) a node id to a
  * node entity.
  */
-class ParamConverterManager extends ContainerAware implements ParamConverterManagerInterface {
+class ParamConverterManager implements ParamConverterManagerInterface {
+  use ContainerAwareTrait;
 
   /**
    * An array of registered converter service ids.
diff --git a/core/lib/Drupal/Core/Queue/QueueFactory.php b/core/lib/Drupal/Core/Queue/QueueFactory.php
index 114123f..e2c256c 100644
--- a/core/lib/Drupal/Core/Queue/QueueFactory.php
+++ b/core/lib/Drupal/Core/Queue/QueueFactory.php
@@ -8,12 +8,13 @@
 namespace Drupal\Core\Queue;
 
 use Drupal\Component\Utility\Settings;
-use Symfony\Component\DependencyInjection\ContainerAware;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 
 /**
  * Defines the queue factory.
  */
-class QueueFactory extends ContainerAware {
+class QueueFactory {
+  use ContainerAwareTrait;
 
   /**
    * Instantiated queues, keyed by name.
diff --git a/core/modules/contextual/lib/Drupal/contextual/ContextualController.php b/core/modules/contextual/lib/Drupal/contextual/ContextualController.php
index aca277d..b881c77 100644
--- a/core/modules/contextual/lib/Drupal/contextual/ContextualController.php
+++ b/core/modules/contextual/lib/Drupal/contextual/ContextualController.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\contextual;
 
-use Symfony\Component\DependencyInjection\ContainerAware;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 use Symfony\Component\HttpFoundation\JsonResponse;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
@@ -16,7 +16,8 @@
 /**
  * Returns responses for Contextual module routes.
  */
-class ContextualController extends ContainerAware {
+class ContextualController {
+  use ContainerAwareTrait;
 
   /**
    * Returns the requested rendered contextual links.
diff --git a/core/modules/rest/lib/Drupal/rest/RequestHandler.php b/core/modules/rest/lib/Drupal/rest/RequestHandler.php
index 120ccfa..c78a940 100644
--- a/core/modules/rest/lib/Drupal/rest/RequestHandler.php
+++ b/core/modules/rest/lib/Drupal/rest/RequestHandler.php
@@ -8,7 +8,7 @@
 namespace Drupal\rest;
 
 use Symfony\Cmf\Component\Routing\RouteObjectInterface;
-use Symfony\Component\DependencyInjection\ContainerAware;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\HttpKernel\Exception\HttpException;
@@ -18,7 +18,8 @@
 /**
  * Acts as intermediate request forwarder for resource plugins.
  */
-class RequestHandler extends ContainerAware {
+class RequestHandler {
+  use ContainerAwareTrait;
 
   /**
    * Handles a web API request.
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php
index 7737cc8..5fafdb4 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php
@@ -247,9 +247,8 @@ public function containerBuild(ContainerBuilder $container) {
 
       $container
         ->register('keyvalue', 'Drupal\Core\KeyValueStore\KeyValueFactory')
-        ->addArgument(new Reference('service_container'))
+       ->addMethodCall('setContainer', array(new Reference('service_container')))
         ->addArgument(new Reference('settings'));
-
       $container->register('state', 'Drupal\Core\KeyValueStore\State')
         ->addArgument(new Reference('keyvalue'));
     }
diff --git a/core/modules/system/lib/Drupal/system/Tests/KeyValueStore/StorageTestBase.php b/core/modules/system/lib/Drupal/system/Tests/KeyValueStore/StorageTestBase.php
index 4b48cfb..aaf8bbc 100644
--- a/core/modules/system/lib/Drupal/system/Tests/KeyValueStore/StorageTestBase.php
+++ b/core/modules/system/lib/Drupal/system/Tests/KeyValueStore/StorageTestBase.php
@@ -57,11 +57,11 @@ protected function setUp() {
       ->setFactoryMethod('getInstance');
     $this->container
       ->register('keyvalue', 'Drupal\Core\KeyValueStore\KeyValueFactory')
-      ->addArgument(new Reference('service_container'))
+      ->addMethodCall('setContainer', array(new Reference('service_container')))
       ->addArgument(new Reference('settings'));
     $this->container
       ->register('keyvalue.expirable', 'Drupal\Core\KeyValueStore\KeyValueExpirableFactory')
-      ->addArgument(new Reference('service_container'))
+      ->addMethodCall('setContainer', array(new Reference('service_container')))
       ->addArgument(new Reference('settings'));
     // Define two data collections,
     $this->collections = array(0 => 'zero', 1 => 'one');
diff --git a/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php b/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php
index d3676e0..6437707 100644
--- a/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php
+++ b/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\theme_test\EventSubscriber;
 
-use Symfony\Component\DependencyInjection\ContainerAware;
+use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 use Symfony\Component\HttpKernel\KernelEvents;
 use Symfony\Component\HttpKernel\Event\GetResponseEvent;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@@ -15,14 +15,8 @@
 /**
  * Theme test subscriber for controller requests.
  */
-class ThemeTestSubscriber extends ContainerAware implements EventSubscriberInterface {
-
-  /**
-   * The used container.
-   *
-   * @var \Symfony\Component\DependencyInjection\IntrospectableContainerInterface
-   */
-  protected $container;
+class ThemeTestSubscriber implements EventSubscriberInterface {
+  use ContainerAwareTrait;
 
   /**
    * Generates themed output early in a page request.
diff --git a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php
index cd3acfe..da201f5 100644
--- a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php
+++ b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php
@@ -59,7 +59,8 @@ protected function setUp() {
     parent::setUp();
 
     $this->container = new ContainerBuilder();
-    $this->controllerResolver = new ControllerResolver($this->container);
+    $this->controllerResolver = new ControllerResolver();
+    $this->controllerResolver->setContainer($this->container);
   }
 
   /**
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
index b16008c..d582f87 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
@@ -149,7 +149,8 @@ protected function setUpEntityManager($definitions = array()) {
       ->method('getDefinitions')
       ->will($this->returnValue($definitions));
 
-    $this->entityManager = new TestEntityManager(new \ArrayObject(), $this->container, $this->moduleHandler, $this->cache, $this->languageManager, $this->translationManager, $this->formBuilder);
+    $this->entityManager = new TestEntityManager(new \ArrayObject(), $this->moduleHandler, $this->cache, $this->languageManager, $this->translationManager, $this->formBuilder);
+    $this->entityManager->setContainer($this->container);
     $this->entityManager->setDiscovery($this->discovery);
   }
 
diff --git a/core/tests/Drupal/Tests/Core/HttpKernelTest.php b/core/tests/Drupal/Tests/Core/HttpKernelTest.php
index b51e108..10a5f76 100644
--- a/core/tests/Drupal/Tests/Core/HttpKernelTest.php
+++ b/core/tests/Drupal/Tests/Core/HttpKernelTest.php
@@ -46,7 +46,8 @@ public function testSetupSubrequest() {
     $container->set('request', $request, 'request');
 
     $dispatcher = new EventDispatcher();
-    $controller_resolver = new ControllerResolver($container);
+    $controller_resolver = new ControllerResolver();
+    $controller_resolver->setContainer($container);
 
     $http_kernel = new HttpKernel($dispatcher, $container, $controller_resolver);
 
