Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\Discovery\RecursiveExtensionFilterIterator.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension\Discovery;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\Extension.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\ExtensionDiscovery.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
use Drupal\Component\FileCache\FileCacheFactory;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\ExtensionNameLengthException.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\InfoParser.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\InfoParserDynamic.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
use Drupal\Component\Serialization\Yaml;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\InfoParserException.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\InfoParserInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\MissingDependencyException.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\ModuleHandler.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
use Drupal\Component\Graph\Graph;
|
||||
|
@ -89,6 +84,13 @@ class ModuleHandler implements ModuleHandlerInterface {
|
|||
*/
|
||||
protected $root;
|
||||
|
||||
/**
|
||||
* A list of module include file keys.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $includeFileKeys = [];
|
||||
|
||||
/**
|
||||
* Constructs a ModuleHandler object.
|
||||
*
|
||||
|
@ -263,14 +265,21 @@ class ModuleHandler implements ModuleHandlerInterface {
|
|||
}
|
||||
|
||||
$name = $name ?: $module;
|
||||
$key = $type . ':' . $module . ':' . $name;
|
||||
if (isset($this->includeFileKeys[$key])) {
|
||||
return $this->includeFileKeys[$key];
|
||||
}
|
||||
if (isset($this->moduleList[$module])) {
|
||||
$file = $this->root . '/' . $this->moduleList[$module]->getPath() . "/$name.$type";
|
||||
if (is_file($file)) {
|
||||
require_once $file;
|
||||
$this->includeFileKeys[$key] = $file;
|
||||
return $file;
|
||||
}
|
||||
else {
|
||||
$this->includeFileKeys[$key] = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\ModuleHandlerInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\ModuleInstaller.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
use Drupal\Component\Serialization\Yaml;
|
||||
|
@ -284,6 +279,10 @@ class ModuleInstaller implements ModuleInstallerInterface {
|
|||
// @see https://www.drupal.org/node/2208429
|
||||
\Drupal::service('theme_handler')->refreshInfo();
|
||||
|
||||
// In order to make uninstalling transactional if anything uses routes.
|
||||
\Drupal::getContainer()->set('router.route_provider.old', \Drupal::service('router.route_provider'));
|
||||
\Drupal::getContainer()->set('router.route_provider', \Drupal::service('router.route_provider.lazy_builder'));
|
||||
|
||||
// Allow the module to perform install tasks.
|
||||
$this->moduleHandler->invoke($module, 'install');
|
||||
|
||||
|
@ -294,7 +293,15 @@ class ModuleInstaller implements ModuleInstallerInterface {
|
|||
|
||||
// If any modules were newly installed, invoke hook_modules_installed().
|
||||
if (!empty($modules_installed)) {
|
||||
\Drupal::service('router.builder')->setRebuildNeeded();
|
||||
\Drupal::getContainer()->set('router.route_provider', \Drupal::service('router.route_provider.old'));
|
||||
if (!\Drupal::service('router.route_provider.lazy_builder')->hasRebuilt()) {
|
||||
// Rebuild routes after installing module. This is done here on top of
|
||||
// \Drupal\Core\Routing\RouteBuilder::destruct to not run into errors on
|
||||
// fastCGI which executes ::destruct() after the module installation
|
||||
// page was sent already.
|
||||
\Drupal::service('router.builder')->rebuild();
|
||||
}
|
||||
|
||||
$this->moduleHandler->invokeAll('modules_installed', array($modules_installed));
|
||||
}
|
||||
|
||||
|
@ -383,6 +390,10 @@ class ModuleInstaller implements ModuleInstallerInterface {
|
|||
// Remove all configuration belonging to the module.
|
||||
\Drupal::service('config.manager')->uninstall('module', $module);
|
||||
|
||||
// In order to make uninstalling transactional if anything uses routes.
|
||||
\Drupal::getContainer()->set('router.route_provider.old', \Drupal::service('router.route_provider'));
|
||||
\Drupal::getContainer()->set('router.route_provider', \Drupal::service('router.route_provider.lazy_builder'));
|
||||
|
||||
// Notify interested components that this module's entity types are being
|
||||
// deleted. For example, a SQL-based storage handler can use this as an
|
||||
// opportunity to drop the corresponding database tables.
|
||||
|
@ -455,7 +466,11 @@ class ModuleInstaller implements ModuleInstallerInterface {
|
|||
$post_update_registry = \Drupal::service('update.post_update_registry');
|
||||
$post_update_registry->filterOutInvokedUpdatesByModule($module);
|
||||
}
|
||||
\Drupal::service('router.builder')->setRebuildNeeded();
|
||||
// Rebuild routes after installing module. This is done here on top of
|
||||
// \Drupal\Core\Routing\RouteBuilder::destruct to not run into errors on
|
||||
// fastCGI which executes ::destruct() after the Module uninstallation page
|
||||
// was sent already.
|
||||
\Drupal::service('router.builder')->rebuild();
|
||||
drupal_get_installed_schema_version(NULL, TRUE);
|
||||
|
||||
// Let other modules react.
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\ModuleInstallerInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\ModuleUninstallValidatorException.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\ModuleUninstallValidatorInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\RequiredModuleUninstallValidator.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
use Drupal\Core\StringTranslation\StringTranslationTrait;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\ThemeHandler.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
use Drupal\Core\Config\ConfigFactoryInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\ThemeHandlerInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\ThemeInstaller.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
use Drupal\Core\Asset\AssetCollectionOptimizerInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Extension\ThemeInstallerInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
/**
|
||||
|
|
|
@ -198,6 +198,12 @@ function hook_modules_installed($modules) {
|
|||
* If the module implements hook_schema(), the database tables will
|
||||
* be created before this hook is fired.
|
||||
*
|
||||
* If the module provides a MODULE.routing.yml or alters routing information
|
||||
* these changes will not be available when this hook is fired. If up-to-date
|
||||
* router information is required, for example to use \Drupal\Core\Url, then
|
||||
* (preferably) use hook_modules_installed() or rebuild the router in the
|
||||
* hook_install() implementation.
|
||||
*
|
||||
* Implementations of this hook are by convention declared in the module's
|
||||
* .install file. The implementation can rely on the .module file being loaded.
|
||||
* The hook will only be called when a module is installed. The module's schema
|
||||
|
|
Reference in a new issue