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
|
|
@ -23,7 +23,8 @@ function config_requirements($phase) {
|
|||
// web writable.
|
||||
if ($phase !== 'install' && !is_writable($directory)) {
|
||||
$requirements['config directory ' . CONFIG_SYNC_DIRECTORY] = [
|
||||
'title' => t('The directory %directory is not writable.', ['%directory' => $directory]),
|
||||
'title' => t('Configuration directory: %type', ['%type' => CONFIG_SYNC_DIRECTORY]),
|
||||
'description' => t('The directory %directory is not writable.', ['%directory' => $directory]),
|
||||
'severity' => REQUIREMENT_WARNING,
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
namespace Drupal\config\Controller;
|
||||
|
||||
use Drupal\Core\Archiver\ArchiveTar;
|
||||
use Drupal\Component\Serialization\Yaml;
|
||||
use Drupal\Core\Config\ConfigManagerInterface;
|
||||
use Drupal\Core\Config\StorageInterface;
|
||||
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
|
||||
use Drupal\Core\Diff\DiffFormatter;
|
||||
use Drupal\Core\Serialization\Yaml;
|
||||
use Drupal\Core\Url;
|
||||
use Drupal\system\FileDownloadController;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
namespace Drupal\config\Form;
|
||||
|
||||
use Drupal\Component\Serialization\Yaml;
|
||||
use Drupal\Core\Config\StorageInterface;
|
||||
use Drupal\Core\Entity\EntityManagerInterface;
|
||||
use Drupal\Core\Entity\EntityTypeInterface;
|
||||
use Drupal\Core\Form\FormBase;
|
||||
use Drupal\Core\Form\FormState;
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
use Drupal\Core\Serialization\Yaml;
|
||||
use Drupal\Core\StringTranslation\TranslatableMarkup;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
namespace Drupal\config\Form;
|
||||
|
||||
use Drupal\Component\Serialization\Exception\InvalidDataTypeException;
|
||||
use Drupal\Component\Serialization\Yaml;
|
||||
use Drupal\config\StorageReplaceDataWrapper;
|
||||
use Drupal\Core\Config\ConfigImporter;
|
||||
use Drupal\Core\Config\ConfigImporterException;
|
||||
|
|
@ -19,6 +18,7 @@ use Drupal\Core\Form\ConfirmFormBase;
|
|||
use Drupal\Core\Form\FormStateInterface;
|
||||
use Drupal\Core\Lock\LockBackendInterface;
|
||||
use Drupal\Core\Render\RendererInterface;
|
||||
use Drupal\Core\Serialization\Yaml;
|
||||
use Drupal\Core\Url;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ class ConfigSync extends FormBase {
|
|||
* The module installer.
|
||||
* @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler
|
||||
* The theme handler.
|
||||
* @param \Drupal\Core\Render\RendererInterface
|
||||
* @param \Drupal\Core\Render\RendererInterface $renderer
|
||||
* The renderer.
|
||||
*/
|
||||
public function __construct(StorageInterface $sync_storage, StorageInterface $active_storage, StorageInterface $snapshot_storage, LockBackendInterface $lock, EventDispatcherInterface $event_dispatcher, ConfigManagerInterface $config_manager, TypedConfigManagerInterface $typed_config, ModuleHandlerInterface $module_handler, ModuleInstallerInterface $module_installer, ThemeHandlerInterface $theme_handler, RendererInterface $renderer) {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Drupal\config\Tests;
|
||||
|
||||
use Drupal\Component\Serialization\Yaml;
|
||||
use Drupal\Core\Archiver\Tar;
|
||||
use Drupal\Core\Serialization\Yaml;
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Drupal\config\Tests;
|
||||
|
||||
use Drupal\Component\Serialization\Yaml;
|
||||
use Drupal\Core\Config\InstallStorage;
|
||||
use Drupal\Core\Serialization\Yaml;
|
||||
use Drupal\simpletest\InstallerTestBase;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ class ConfigInstallWebTest extends WebTestBase {
|
|||
// not depend on config_test and order is important.
|
||||
$this->drupalPostForm('admin/modules', array('modules[Testing][config_test][enable]' => TRUE), t('Install'));
|
||||
$this->drupalPostForm('admin/modules', array('modules[Testing][config_install_dependency_test][enable]' => TRUE), t('Install'));
|
||||
$this->assertRaw('Unable to install Config install dependency test, <em class="placeholder">config_test.dynamic.other_module_test_with_dependency</em> has unmet dependencies.');
|
||||
$this->assertRaw('Unable to install Config install dependency test, <em class="placeholder">config_other_module_config_test.weird_simple_config, config_test.dynamic.other_module_test_with_dependency</em> have unmet dependencies.');
|
||||
|
||||
$this->drupalPostForm('admin/modules', array('modules[Testing][config_other_module_config_test][enable]' => TRUE), t('Install'));
|
||||
$this->drupalPostForm('admin/modules', array('modules[Testing][config_install_dependency_test][enable]' => TRUE), t('Install'));
|
||||
|
|
|
|||
|
|
@ -85,11 +85,16 @@ class ConfigOtherModuleTest extends WebTestBase {
|
|||
*/
|
||||
public function testUninstall() {
|
||||
$this->installModule('views');
|
||||
$this->assertTrue(entity_load('view', 'frontpage', TRUE) === NULL, 'After installing Views, frontpage view which is dependant on the Node and Views modules does not exist.');
|
||||
$storage = $this->container->get('entity_type.manager')->getStorage('view');
|
||||
$storage->resetCache(array('frontpage'));
|
||||
$this->assertTrue($storage->load('frontpage') === NULL, 'After installing Views, frontpage view which is dependant on the Node and Views modules does not exist.');
|
||||
$this->installModule('node');
|
||||
$this->assertTrue(entity_load('view', 'frontpage', TRUE) !== NULL, 'After installing Node, frontpage view which is dependant on the Node and Views modules exists.');
|
||||
$storage->resetCache(array('frontpage'));
|
||||
$this->assertTrue($storage->load('frontpage') !== NULL, 'After installing Node, frontpage view which is dependant on the Node and Views modules exists.');
|
||||
$this->uninstallModule('node');
|
||||
$this->assertTrue(entity_load('view', 'frontpage', TRUE) === NULL, 'After uninstalling Node, frontpage view which is dependant on the Node and Views modules does not exist.');
|
||||
$storage = $this->container->get('entity_type.manager')->getStorage('view');
|
||||
$storage->resetCache(array('frontpage'));
|
||||
$this->assertTrue($storage->load('frontpage') === NULL, 'After uninstalling Node, frontpage view which is dependant on the Node and Views modules does not exist.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Drupal\config\Tests;
|
||||
|
||||
use Drupal\Component\Serialization\Yaml;
|
||||
use Drupal\Core\Serialization\Yaml;
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
||||
/**
|
||||
|
|
@ -48,7 +48,8 @@ class ConfigSingleImportExportTest extends WebTestBase {
|
|||
];
|
||||
|
||||
$this->drupalPostForm('admin/config/development/configuration/single/import', $edit, t('Import'));
|
||||
$this->assertText('The import failed with the following message: Malformed inline YAML string ({{{) at line 1 (near "{{{")');
|
||||
// Assert the static portion of the error since different parsers could give different text in their error.
|
||||
$this->assertText('The import failed with the following message: ');
|
||||
|
||||
$import = <<<EOD
|
||||
label: First
|
||||
|
|
@ -219,8 +220,8 @@ EOD;
|
|||
$this->assertFieldByXPath('//select[@name="config_name"]//option[@selected="selected"]', t('Fallback date format (fallback)'), 'The fallback date format config entity is selected when specified in the URL.');
|
||||
|
||||
$fallback_date = \Drupal::entityManager()->getStorage('date_format')->load('fallback');
|
||||
$data = Yaml::encode($fallback_date->toArray());
|
||||
$this->assertFieldByXPath('//textarea[@name="export"]', $data, 'The fallback date format config entity export code is displayed.');
|
||||
$yaml_text = (string) $this->xpath('//textarea[@name="export"]')[0];
|
||||
$this->assertEqual(Yaml::decode($yaml_text), $fallback_date->toArray(), 'The fallback date format config entity export code is displayed.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
foo: bar
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
config_other_module_config_test.weird_simple_config:
|
||||
type: config_object
|
||||
mapping:
|
||||
foo:
|
||||
type: string
|
||||
Reference in a new issue