Update to Drupal 8.2.0. For more information, see https://www.drupal.org/project/drupal/releases/8.2.0
This commit is contained in:
parent
2f563ab520
commit
f1c8716f57
1732 changed files with 52334 additions and 11780 deletions
|
@ -81,6 +81,20 @@ class RecursiveExtensionFilterIterator extends \RecursiveFilterIterator {
|
|||
*/
|
||||
protected $acceptTests = FALSE;
|
||||
|
||||
/**
|
||||
* Construct a RecursiveExtensionFilterIterator.
|
||||
*
|
||||
* @param \RecursiveIterator $iterator
|
||||
* The iterator to filter.
|
||||
* @param array $blacklist
|
||||
* (optional) Add to the blacklist of directories that should be filtered
|
||||
* out during the iteration.
|
||||
*/
|
||||
public function __construct(\RecursiveIterator $iterator, array $blacklist = []) {
|
||||
parent::__construct($iterator);
|
||||
$this->blacklist = array_merge($this->blacklist, $blacklist);
|
||||
}
|
||||
|
||||
/**
|
||||
* Controls whether test directories will be scanned.
|
||||
*
|
||||
|
@ -102,6 +116,8 @@ class RecursiveExtensionFilterIterator extends \RecursiveFilterIterator {
|
|||
*/
|
||||
public function getChildren() {
|
||||
$filter = parent::getChildren();
|
||||
// Pass on the blacklist.
|
||||
$filter->blacklist = $this->blacklist;
|
||||
// Pass the $acceptTests flag forward to child iterators.
|
||||
$filter->acceptTests($this->acceptTests);
|
||||
return $filter;
|
||||
|
|
|
@ -427,11 +427,17 @@ class ExtensionDiscovery {
|
|||
$flags |= \FilesystemIterator::CURRENT_AS_SELF;
|
||||
$directory_iterator = new \RecursiveDirectoryIterator($absolute_dir, $flags);
|
||||
|
||||
// Allow directories specified in settings.php to be ignored. You can use
|
||||
// this to not check for files in common special-purpose directories. For
|
||||
// example, node_modules and bower_components. Ignoring irrelevant
|
||||
// directories is a performance boost.
|
||||
$ignore_directories = Settings::get('file_scan_ignore_directories', []);
|
||||
|
||||
// Filter the recursive scan to discover extensions only.
|
||||
// Important: Without a RecursiveFilterIterator, RecursiveDirectoryIterator
|
||||
// would recurse into the entire filesystem directory tree without any kind
|
||||
// of limitations.
|
||||
$filter = new RecursiveExtensionFilterIterator($directory_iterator);
|
||||
$filter = new RecursiveExtensionFilterIterator($directory_iterator, $ignore_directories);
|
||||
$filter->acceptTests($include_tests);
|
||||
|
||||
// The actual recursive filesystem scan is only invoked by instantiating the
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
use Drupal\Component\Serialization\Yaml;
|
||||
use Drupal\Component\Serialization\Exception\InvalidDataTypeException;
|
||||
use Drupal\Core\Serialization\Yaml;
|
||||
|
||||
/**
|
||||
* Parses dynamic .info.yml files that might change during the page request.
|
||||
|
|
|
@ -581,8 +581,8 @@ class ModuleHandler implements ModuleHandlerInterface {
|
|||
$this->alter('module_implements', $implementations, $hook);
|
||||
// Verify new or modified implementations.
|
||||
foreach (array_diff_assoc($implementations, $implementations_before) as $module => $group) {
|
||||
// If drupal_alter('module_implements') changed or added a $group, the
|
||||
// respective file needs to be included.
|
||||
// If an implementation of hook_module_implements_alter() changed or
|
||||
// added a group, the respective file needs to be included.
|
||||
if ($group) {
|
||||
$this->loadInclude($module, 'inc', "$module.$group");
|
||||
}
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
namespace Drupal\Core\Extension;
|
||||
|
||||
use Drupal\Component\Serialization\Yaml;
|
||||
use Drupal\Core\Cache\Cache;
|
||||
use Drupal\Core\Cache\CacheBackendInterface;
|
||||
use Drupal\Core\DrupalKernelInterface;
|
||||
use Drupal\Core\Entity\EntityStorageException;
|
||||
use Drupal\Core\Entity\FieldableEntityInterface;
|
||||
use Drupal\Core\Serialization\Yaml;
|
||||
|
||||
/**
|
||||
* Default implementation of the module installer.
|
||||
|
|
|
@ -198,8 +198,10 @@ class ThemeHandler implements ThemeHandlerInterface {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function addTheme(Extension $theme) {
|
||||
foreach ($theme->info['libraries'] as $library => $name) {
|
||||
$theme->libraries[$library] = $name;
|
||||
if (!empty($theme->info['libraries'])) {
|
||||
foreach ($theme->info['libraries'] as $library => $name) {
|
||||
$theme->libraries[$library] = $name;
|
||||
}
|
||||
}
|
||||
if (isset($theme->info['engine'])) {
|
||||
$theme->engine = $theme->info['engine'];
|
||||
|
|
|
@ -223,7 +223,7 @@ class ThemeInstaller implements ThemeInstallerInterface {
|
|||
throw new \InvalidArgumentException("The current default theme $key cannot be uninstalled.");
|
||||
}
|
||||
if ($key === $theme_config->get('admin')) {
|
||||
throw new \InvalidArgumentException("The current admin theme $key cannot be uninstalled.");
|
||||
throw new \InvalidArgumentException("The current administration theme $key cannot be uninstalled.");
|
||||
}
|
||||
// Base themes cannot be uninstalled if sub themes are installed, and if
|
||||
// they are not uninstalled at the same time.
|
||||
|
|
Reference in a new issue