diff -u b/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php --- b/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -71,17 +71,17 @@ * Initializes the service container. */ protected function initializeContainer() { - // While the default Symfony class name only depends on the environment, - // for testing purposes we can't use that because there would be a - // collission as each test method creates a new kernel. On the other hand, - // the container only depends on the enabled modules (and only on those - // that provide bundles) so we base the name of the container class on - // the hash of the enabled modules. We can't use directly the hash though - // because PHP identifiers always start with a letter and hashes don't so - // we add a charater to the beginning. This mechanism also avoids the - // problem of needing to rebuild the DIC at the right time on module - // enable: simply on the next request the hash will change and so the - // container will be rebuilt. + // While the default Symfony class name only depends on the environment, for + // testing purposes we can't use that because there would be a collision as + // each test method creates a new kernel. On the other hand, the container + // only depends on the enabled modules (and only on those that provide + // bundles) so we base the name of the container class on the hash of the + // enabled modules. We can't directly use the hash though because PHP + // identifiers always start with a letter and hashes don't so we add a + // character to the beginning. This mechanism also avoids the problem of + // needing to rebuild the DIC at the right time on module enable: simply on + // the next request the hash will change and so the container will be + // rebuilt. $class = 'c' . $this->systemList['module_enabled_hash']; $cache_file = $class . '.php'; @@ -136,18 +136,22 @@ /** * Dumps the service container to PHP code in the config directory. * - * This method is based on the dumpContinaer method in the parent class, but + * This method is based on the dumpContainer method in the parent class, but * that method is reliant on the Config component which we do not use here. * - * @param string $cache_file The full filename to write to. - * @param ContainerBuilder $container The service container - * @param string $class The name of the class to generate - * @param string $baseClass The name of the container's base class - * @param PhpStorageInterface $storage The php storage class + * @param string $cache_file + * The full filename to write to. + * @param ContainerBuilder $container + * The service container. + * @param string $class + * The name of the class to generate. + * @param string $baseClass + * The name of the container's base class + * @param PhpStorageInterface $storage + * The PHP storage class. */ - protected function dumpDrupalContainer($cache_file, ContainerBuilder $container, $class, $baseClass, PhpStorageInterface $storage) - { - // cache the container + protected function dumpDrupalContainer($cache_file, ContainerBuilder $container, $class, $baseClass, PhpStorageInterface $storage) { + // Cache the container. $dumper = new PhpDumper($container); $content = $dumper->dump(array('class' => $class, 'base_class' => $baseClass));