diff --git a/core/core.services.yml b/core/core.services.yml index 2e186ae..e5d9ec2 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -141,12 +141,17 @@ services: calls: - [addSubscriber, ['@http_client_simpletest_subscriber']] - [setUserAgent, ['Drupal (+http://drupal.org/)']] + container.namespaces: + class: ArrayObject + arguments: [ '%container.namespaces%' ] + tags: + - { name: persist } plugin.manager.entity: class: Drupal\Core\Entity\EntityManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] plugin.manager.archiver: class: Drupal\Core\Archiver\ArchiverManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] request: class: Symfony\Component\HttpFoundation\Request event_dispatcher: @@ -171,7 +176,7 @@ services: - [setValidationConstraintManager, ['@validation.constraint']] validation.constraint: class: Drupal\Core\Validation\ConstraintManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] lock: class: Drupal\Core\Lock\DatabaseLockBackend user.tempstore: @@ -372,7 +377,7 @@ services: arguments: ['@database', '@request'] plugin.manager.condition: class: Drupal\Core\Condition\ConditionManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] kernel_destruct_subscriber: class: Drupal\Core\EventSubscriber\KernelDestructionSubscriber tags: @@ -385,7 +390,7 @@ services: - { name: event_subscriber } image.toolkit.manager: class: Drupal\system\Plugin\ImageToolkitManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] image.toolkit: class: Drupal\system\Plugin\ImageToolkitInterface factory_method: getDefaultToolkit diff --git a/core/lib/Drupal/Core/Archiver/ArchiverManager.php b/core/lib/Drupal/Core/Archiver/ArchiverManager.php index 3885146..fd1165b 100644 --- a/core/lib/Drupal/Core/Archiver/ArchiverManager.php +++ b/core/lib/Drupal/Core/Archiver/ArchiverManager.php @@ -20,10 +20,11 @@ class ArchiverManager extends PluginManagerBase { /** * Constructs a ArchiverManager object. * - * @param array $namespaces - * An array of paths keyed by its corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct(array $namespaces) { + public function __construct(\Traversable $namespaces) { $this->discovery = new AnnotatedClassDiscovery('Core', 'Archiver', $namespaces); $this->discovery = new AlterDecorator($this->discovery, 'archiver_info'); $this->discovery = new CacheDecorator($this->discovery, 'archiver_info'); diff --git a/core/lib/Drupal/Core/Condition/ConditionManager.php b/core/lib/Drupal/Core/Condition/ConditionManager.php index 2f4c060..ffa22fd 100644 --- a/core/lib/Drupal/Core/Condition/ConditionManager.php +++ b/core/lib/Drupal/Core/Condition/ConditionManager.php @@ -24,10 +24,11 @@ class ConditionManager extends PluginManagerBase implements ExecutableManagerInt /** * Constructs aa ConditionManager object. * - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct(array $namespaces) { + public function __construct(\Traversable $namespaces) { $this->discovery = new AnnotatedClassDiscovery('Core', 'Condition', $namespaces); $this->discovery = new DerivativeDiscoveryDecorator($this->discovery); $this->discovery = new AlterDecorator($this->discovery, 'condition_info'); diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index e600313..bc46901 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -342,6 +342,14 @@ protected function initializeContainer() { if (!isset($this->container)) { $this->container = $this->buildContainer(); $this->persistServices($persist); + + // The namespaces are marked as persistent, so objects like the annotated + // class discovery still has the right object. We may have updated the + // list of modules, so set it. + if ($this->container->initialized('container.namespaces')) { + $this->container->get('container.namespaces')->exchangeArray($this->container->getParameter('container.namespaces')); + } + if ($this->allowDumping) { $this->containerNeedsDumping = TRUE; } diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index ef7450f..3541c24 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -41,10 +41,11 @@ class EntityManager extends PluginManagerBase { /** * Constructs a new Entity plugin manager. * - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct(array $namespaces) { + public function __construct(\Traversable $namespaces) { // Allow the plugin definition to be altered by hook_entity_info_alter(). $annotation_namespaces = array( 'Drupal\Core\Entity\Annotation' => DRUPAL_ROOT . '/core/lib', diff --git a/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php b/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php index 8ed9440..2694e33 100644 --- a/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php +++ b/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php @@ -15,40 +15,66 @@ class AnnotatedClassDiscovery extends ComponentAnnotatedClassDiscovery { /** + * The module name that defines the plugin type. + * + * @var string + */ + protected $owner; + + /** + * The plugin type, for example filter. + * + * @var string + */ + protected $type; + + /** + * An object containing the namespaces to look for plugin implementations. + * + * @var \Traversable + */ + protected $rootNamespacesIterator; + + /** * Constructs an AnnotatedClassDiscovery object. * * @param string $owner * The module name that defines the plugin type. * @param string $type * The plugin type, for example filter. - * @param array $root_namespaces - * (optional) An array of root paths keyed by the corresponding namespace to - * look for plugin implementations. '\Plugin\$owner\$type' will be appended - * to each namespace. Defaults to an empty array. + * @param \Traversable $root_namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, + * \Plugin\$owner\$type will be appended to each namespace. * @param array $annotation_namespaces * (optional) The namespaces of classes that can be used as annotations. * Defaults to an empty array. * @param string $plugin_definition_annotation_name * (optional) The name of the annotation that contains the plugin definition. * Defaults to 'Drupal\Component\Annotation\Plugin'. - * - * @todo Figure out how to make the following comment FALSE. - * Drupal modules can be enabled (and therefore, namespaces registered) - * during the lifetime of a plugin manager. Passing $root_namespaces into - * the constructor means plugins in the new namespaces will not be available - * until the next request. Additionally when a namespace is unregistered, - * plugins will not be removed until the next request. */ - function __construct($owner, $type, array $root_namespaces = array(), $annotation_namespaces = array(), $plugin_definition_annotation_name = 'Drupal\Component\Annotation\Plugin') { + function __construct($owner, $type, \Traversable $root_namespaces, $annotation_namespaces = array(), $plugin_definition_annotation_name = 'Drupal\Component\Annotation\Plugin') { + $this->owner = $owner; + $this->type = $type; + $this->rootNamespacesIterator = $root_namespaces; $annotation_namespaces += array( 'Drupal\Component\Annotation' => DRUPAL_ROOT . '/core/lib', 'Drupal\Core\Annotation' => DRUPAL_ROOT . '/core/lib', ); $plugin_namespaces = array(); - foreach ($root_namespaces as $namespace => $dir) { - $plugin_namespaces["$namespace\\Plugin\\{$owner}\\{$type}"] = array($dir); - } parent::__construct($plugin_namespaces, $annotation_namespaces, $plugin_definition_annotation_name); } + /** + * {@inheritdoc} + */ + protected function getPluginNamespaces() { + $plugin_namespaces = array(); + foreach ($this->rootNamespacesIterator as $namespace => $dir) { + $plugin_namespaces["$namespace\\Plugin\\{$this->owner}\\{$this->type}"] = array($dir); + } + + return $plugin_namespaces; + } + } diff --git a/core/lib/Drupal/Core/Validation/ConstraintManager.php b/core/lib/Drupal/Core/Validation/ConstraintManager.php index e0444ae..5c8719b 100644 --- a/core/lib/Drupal/Core/Validation/ConstraintManager.php +++ b/core/lib/Drupal/Core/Validation/ConstraintManager.php @@ -39,10 +39,11 @@ class ConstraintManager extends PluginManagerBase { /** * Overrides \Drupal\Component\Plugin\PluginManagerBase::__construct(). * - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct(array $namespaces) { + public function __construct(\Traversable $namespaces) { $this->discovery = new AnnotatedClassDiscovery('Validation', 'Constraint', $namespaces); $this->discovery = new StaticDiscoveryDecorator($this->discovery, array($this, 'registerDefinitions')); $this->discovery = new DerivativeDiscoveryDecorator($this->discovery); diff --git a/core/modules/aggregator/aggregator.services.yml b/core/modules/aggregator/aggregator.services.yml index 1cedc0f..639ed2d 100644 --- a/core/modules/aggregator/aggregator.services.yml +++ b/core/modules/aggregator/aggregator.services.yml @@ -1,10 +1,10 @@ services: plugin.manager.aggregator.fetcher: class: Drupal\aggregator\Plugin\AggregatorPluginManager - arguments: [fetcher, '%container.namespaces%'] + arguments: [fetcher, '@container.namespaces'] plugin.manager.aggregator.parser: class: Drupal\aggregator\Plugin\AggregatorPluginManager - arguments: [parser, '%container.namespaces%'] + arguments: [parser, '@container.namespaces'] plugin.manager.aggregator.processor: class: Drupal\aggregator\Plugin\AggregatorPluginManager - arguments: [processor, '%container.namespaces%'] + arguments: [processor, '@container.namespaces'] diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/AggregatorPluginManager.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/AggregatorPluginManager.php index 9f51a71..aaa6e3e 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/AggregatorPluginManager.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/AggregatorPluginManager.php @@ -22,10 +22,11 @@ class AggregatorPluginManager extends PluginManagerBase { * * @param string $type * The plugin type, for example fetcher. - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct($type, array $namespaces) { + public function __construct($type, \Traversable $namespaces) { $this->discovery = new AnnotatedClassDiscovery('aggregator', $type, $namespaces); $this->discovery = new CacheDecorator($this->discovery, "aggregator_$type:" . language(LANGUAGE_TYPE_INTERFACE)->langcode); $this->factory = new DefaultFactory($this->discovery); diff --git a/core/modules/block/block.services.yml b/core/modules/block/block.services.yml index ddc3556..745bf66 100644 --- a/core/modules/block/block.services.yml +++ b/core/modules/block/block.services.yml @@ -1,7 +1,7 @@ services: plugin.manager.block: class: Drupal\block\Plugin\Type\BlockManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] cache.block: class: Drupal\Core\Cache\CacheBackendInterface tags: diff --git a/core/modules/block/lib/Drupal/block/Plugin/Type/BlockManager.php b/core/modules/block/lib/Drupal/block/Plugin/Type/BlockManager.php index b102d4b..f907662 100644 --- a/core/modules/block/lib/Drupal/block/Plugin/Type/BlockManager.php +++ b/core/modules/block/lib/Drupal/block/Plugin/Type/BlockManager.php @@ -27,10 +27,11 @@ class BlockManager extends PluginManagerBase { /** * Constructs a new \Drupal\block\Plugin\Type\BlockManager object. * - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct(array $namespaces) { + public function __construct(\Traversable $namespaces) { $this->discovery = new AnnotatedClassDiscovery('block', 'block', $namespaces); $this->discovery = new DerivativeDiscoveryDecorator($this->discovery); $this->discovery = new AlterDecorator($this->discovery, 'block'); diff --git a/core/modules/ckeditor/ckeditor.services.yml b/core/modules/ckeditor/ckeditor.services.yml index 143aaa6..5cb1b5e 100644 --- a/core/modules/ckeditor/ckeditor.services.yml +++ b/core/modules/ckeditor/ckeditor.services.yml @@ -1,4 +1,4 @@ services: plugin.manager.ckeditor.plugin: class: Drupal\ckeditor\CKEditorPluginManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php b/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php index 5500241..5386a9f 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php @@ -24,10 +24,11 @@ class CKEditorPluginManager extends PluginManagerBase { /** * Overrides \Drupal\Component\Plugin\PluginManagerBase::__construct(). * - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct(array $namespaces) { + public function __construct(\Traversable $namespaces) { $this->discovery = new AnnotatedClassDiscovery('ckeditor', 'plugin', $namespaces); $this->discovery = new AlterDecorator($this->discovery, 'ckeditor_plugin_info'); $this->discovery = new CacheDecorator($this->discovery, 'ckeditor_plugin'); diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorPluginManagerTest.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorPluginManagerTest.php index b7383d7..8cee06e 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorPluginManagerTest.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorPluginManagerTest.php @@ -63,7 +63,7 @@ function setUp() { * Tests the enabling of plugins. */ function testEnabledPlugins() { - $this->manager = new CKEditorPluginManager($this->container->getParameter('container.namespaces')); + $this->manager = $this->container->get('plugin.manager.ckeditor.plugin'); $editor = entity_load('editor', 'filtered_html'); // Case 1: no CKEditor plugins. @@ -77,7 +77,6 @@ function testEnabledPlugins() { // variations of it, to cover all possible ways a plugin can be enabled) and // clear the editor manager's cache so it is picked up. $this->enableModules(array('ckeditor_test')); - $this->manager = new CKEditorPluginManager($this->container->getParameter('container.namespaces')); $this->manager->clearCachedDefinitions(); // Case 2: CKEditor plugins are available. diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php index db4dbec..98d15c2 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php @@ -64,7 +64,7 @@ function setUp() { $editor->save(); // Create "CKEditor" text editor plugin instance. - $manager = new EditorManager($this->container->getParameter('container.namespaces')); + $manager = $this->container->get('plugin.manager.editor'); $this->ckeditor = $manager->createInstance('ckeditor'); } diff --git a/core/modules/edit/edit.services.yml b/core/modules/edit/edit.services.yml index 8f72c77..91c37b1 100644 --- a/core/modules/edit/edit.services.yml +++ b/core/modules/edit/edit.services.yml @@ -1,7 +1,7 @@ services: plugin.manager.edit.editor: class: Drupal\edit\Plugin\EditorManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] access_check.edit.entity_field: class: Drupal\edit\Access\EditEntityFieldAccessCheck tags: diff --git a/core/modules/edit/lib/Drupal/edit/Plugin/EditorManager.php b/core/modules/edit/lib/Drupal/edit/Plugin/EditorManager.php index ce2d650..8d0032f 100644 --- a/core/modules/edit/lib/Drupal/edit/Plugin/EditorManager.php +++ b/core/modules/edit/lib/Drupal/edit/Plugin/EditorManager.php @@ -24,10 +24,11 @@ class EditorManager extends PluginManagerBase { /** * Overrides \Drupal\Component\Plugin\PluginManagerBase::__construct(). * - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct(array $namespaces) { + public function __construct(\Traversable $namespaces) { $this->discovery = new AnnotatedClassDiscovery('edit', 'editor', $namespaces); $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition')); $this->discovery = new AlterDecorator($this->discovery, 'edit_editor'); diff --git a/core/modules/edit/lib/Drupal/edit/Tests/EditorSelectionTest.php b/core/modules/edit/lib/Drupal/edit/Tests/EditorSelectionTest.php index e7a6db1..26ec6c0 100644 --- a/core/modules/edit/lib/Drupal/edit/Tests/EditorSelectionTest.php +++ b/core/modules/edit/lib/Drupal/edit/Tests/EditorSelectionTest.php @@ -40,7 +40,7 @@ public static function getInfo() { function setUp() { parent::setUp(); - $this->editorManager = new EditorManager($this->container->getParameter('container.namespaces')); + $this->editorManager = $this->container->get('plugin.manager.edit.editor'); $this->editorSelector = new EditorSelector($this->editorManager); } @@ -109,8 +109,6 @@ function testTextWysiwyg() { // Enable edit_test module so that the 'wysiwyg' Create.js PropertyEditor // widget becomes available. $this->enableModules(array('edit_test')); - $this->editorManager = new EditorManager($this->container->getParameter('container.namespaces')); - $this->editorSelector = new EditorSelector($this->editorManager); $field_name = 'field_textarea'; $this->createFieldWithInstance( diff --git a/core/modules/edit/lib/Drupal/edit/Tests/MetadataGeneratorTest.php b/core/modules/edit/lib/Drupal/edit/Tests/MetadataGeneratorTest.php index 5a4faef..6c4569f 100644 --- a/core/modules/edit/lib/Drupal/edit/Tests/MetadataGeneratorTest.php +++ b/core/modules/edit/lib/Drupal/edit/Tests/MetadataGeneratorTest.php @@ -56,7 +56,7 @@ public static function getInfo() { function setUp() { parent::setUp(); - $this->editorManager = new EditorManager($this->container->getParameter('container.namespaces')); + $this->editorManager = $this->container->get('plugin.manager.edit.editor'); $this->accessChecker = new MockEditEntityFieldAccessCheck(); $this->editorSelector = new EditorSelector($this->editorManager); $this->metadataGenerator = new MetadataGenerator($this->accessChecker, $this->editorSelector, $this->editorManager); @@ -131,9 +131,6 @@ function testEditorWithCustomMetadata() { // Enable edit_test module so that the WYSIWYG Create.js PropertyEditor // widget becomes available. $this->enableModules(array('edit_test')); - $this->editorManager = new EditorManager($this->container->getParameter('container.namespaces')); - $this->editorSelector = new EditorSelector($this->editorManager); - $this->metadataGenerator = new MetadataGenerator($this->accessChecker, $this->editorSelector, $this->editorManager); // Create a rich text field. $field_name = 'field_rich'; diff --git a/core/modules/editor/editor.services.yml b/core/modules/editor/editor.services.yml index 60f1609..db19922 100644 --- a/core/modules/editor/editor.services.yml +++ b/core/modules/editor/editor.services.yml @@ -1,4 +1,4 @@ services: plugin.manager.editor: class: Drupal\editor\Plugin\EditorManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] diff --git a/core/modules/editor/lib/Drupal/editor/Plugin/EditorManager.php b/core/modules/editor/lib/Drupal/editor/Plugin/EditorManager.php index c267b5f..989af1f 100644 --- a/core/modules/editor/lib/Drupal/editor/Plugin/EditorManager.php +++ b/core/modules/editor/lib/Drupal/editor/Plugin/EditorManager.php @@ -22,10 +22,11 @@ class EditorManager extends PluginManagerBase { /** * Overrides \Drupal\Component\Plugin\PluginManagerBase::__construct(). * - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct(array $namespaces) { + public function __construct(\Traversable $namespaces) { $this->discovery = new AnnotatedClassDiscovery('editor', 'editor', $namespaces); $this->discovery = new AlterDecorator($this->discovery, 'editor_info'); $this->discovery = new CacheDecorator($this->discovery, 'editor'); diff --git a/core/modules/editor/lib/Drupal/editor/Tests/EditIntegrationTest.php b/core/modules/editor/lib/Drupal/editor/Tests/EditIntegrationTest.php index 9e443f8..1dcadc8 100644 --- a/core/modules/editor/lib/Drupal/editor/Tests/EditIntegrationTest.php +++ b/core/modules/editor/lib/Drupal/editor/Tests/EditIntegrationTest.php @@ -122,7 +122,7 @@ protected function getSelectedEditor($items, $field_name, $view_mode = 'default' * format compatibility. */ function testEditorSelection() { - $this->editorManager = new EditorManager($this->container->getParameter('container.namespaces')); + $this->editorManager = new EditorManager($this->container->get('container.namespaces')); $this->editorSelector = new EditorSelector($this->editorManager); // Pretend there is an entity with these items for the field. @@ -146,7 +146,7 @@ function testEditorSelection() { * Tests (custom) metadata when the "Editor" Create.js editor is used. */ function testMetadata() { - $this->editorManager = new EditorManager($this->container->getParameter('container.namespaces')); + $this->editorManager = new EditorManager($this->container->get('container.namespaces')); $this->accessChecker = new MockEditEntityFieldAccessCheck(); $this->editorSelector = new EditorSelector($this->editorManager); $this->metadataGenerator = new MetadataGenerator($this->accessChecker, $this->editorSelector, $this->editorManager); diff --git a/core/modules/editor/lib/Drupal/editor/Tests/EditorManagerTest.php b/core/modules/editor/lib/Drupal/editor/Tests/EditorManagerTest.php index 567db78..1fee823 100644 --- a/core/modules/editor/lib/Drupal/editor/Tests/EditorManagerTest.php +++ b/core/modules/editor/lib/Drupal/editor/Tests/EditorManagerTest.php @@ -66,7 +66,7 @@ function setUp() { * Tests the configurable text editor manager. */ function testManager() { - $this->editorManager = new EditorManager($this->container->getParameter('container.namespaces')); + $this->editorManager = new EditorManager($this->container->get('container.namespaces')); // Case 1: no text editor available: // - listOptions() should return an empty list of options @@ -79,7 +79,6 @@ function testManager() { // Enable the Text Editor Test module, which has the Unicorn Editor and // clear the editor manager's cache so it is picked up. $this->enableModules(array('editor_test')); - $this->editorManager = new EditorManager($this->container->getParameter('container.namespaces')); $this->editorManager->clearCachedDefinitions(); // Case 2: a text editor available. diff --git a/core/modules/entity_reference/entity_reference.services.yml b/core/modules/entity_reference/entity_reference.services.yml index 6198f73..02c3106 100644 --- a/core/modules/entity_reference/entity_reference.services.yml +++ b/core/modules/entity_reference/entity_reference.services.yml @@ -1,7 +1,7 @@ services: plugin.manager.entity_reference.selection: class: Drupal\entity_reference\Plugin\Type\SelectionPluginManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] entity_reference.autocomplete: class: Drupal\entity_reference\EntityReferenceAutocomplete arguments: ['@plugin.manager.entity'] diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Type/SelectionPluginManager.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Type/SelectionPluginManager.php index db3bd47..bd140a9 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Type/SelectionPluginManager.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Type/SelectionPluginManager.php @@ -23,10 +23,11 @@ class SelectionPluginManager extends PluginManagerBase { /** * Constructs a SelectionPluginManager object. * - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct($namespaces) { + public function __construct(\Traversable $namespaces) { $this->baseDiscovery = new AlterDecorator(new AnnotatedClassDiscovery('entity_reference', 'selection', $namespaces), 'entity_reference_selection'); $this->discovery = new CacheDecorator($this->baseDiscovery, 'entity_reference_selection'); $this->factory = new ReflectionFactory($this); diff --git a/core/modules/field/field.services.yml b/core/modules/field/field.services.yml index 2313254..f45d4e6 100644 --- a/core/modules/field/field.services.yml +++ b/core/modules/field/field.services.yml @@ -1,10 +1,10 @@ services: plugin.manager.field.widget: class: Drupal\field\Plugin\Type\Widget\WidgetPluginManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] plugin.manager.field.formatter: class: Drupal\field\Plugin\Type\Formatter\FormatterPluginManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] field.info: class: Drupal\field\FieldInfo arguments: ['@cache.field', '@config.factory', '@module_handler'] @@ -15,3 +15,4 @@ services: factory_method: get factory_service: cache_factory arguments: [field] +g diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php index 93950e6..90722d5 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php +++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php @@ -30,10 +30,11 @@ class FormatterPluginManager extends PluginManagerBase { /** * Constructs a FormatterPluginManager object. * - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct($namespaces) { + public function __construct(\Traversable $namespaces) { $this->discovery = new AnnotatedClassDiscovery('field', 'formatter', $namespaces); $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition')); $this->discovery = new AlterDecorator($this->discovery, 'field_formatter_info'); diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php index 6ea1879..6cbad1f 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php +++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php @@ -31,10 +31,11 @@ class WidgetPluginManager extends PluginManagerBase { /** * Constructs a WidgetPluginManager object. * - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct($namespaces) { + public function __construct(\Traversable $namespaces) { $this->discovery = new AnnotatedClassDiscovery('field', 'widget', $namespaces); $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition')); $this->discovery = new AlterDecorator($this->discovery, 'field_widget_info'); diff --git a/core/modules/layout/layout.services.yml b/core/modules/layout/layout.services.yml index 68d989c..d387b77 100644 --- a/core/modules/layout/layout.services.yml +++ b/core/modules/layout/layout.services.yml @@ -1,4 +1,4 @@ services: plugin.manager.layout: class: Drupal\layout\Plugin\Type\LayoutManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] diff --git a/core/modules/layout/lib/Drupal/layout/Plugin/Type/LayoutManager.php b/core/modules/layout/lib/Drupal/layout/Plugin/Type/LayoutManager.php index 0dcb14c..179ea4b 100644 --- a/core/modules/layout/lib/Drupal/layout/Plugin/Type/LayoutManager.php +++ b/core/modules/layout/lib/Drupal/layout/Plugin/Type/LayoutManager.php @@ -25,10 +25,11 @@ class LayoutManager extends PluginManagerBase { /** * Overrides Drupal\Component\Plugin\PluginManagerBase::__construct(). * - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct($namespaces) { + public function __construct(\Traversable $namespaces) { // Create layout plugin derivatives from declaratively defined layouts. $this->discovery = new AnnotatedClassDiscovery('layout', 'layout', $namespaces); $this->discovery = new DerivativeDiscoveryDecorator($this->discovery); diff --git a/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php b/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php index c33134b..f6c8180 100644 --- a/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php @@ -35,7 +35,7 @@ protected function setUp() { * Tests conditions. */ function testConditions() { - $manager = $this->container->get('plugin.manager.condition'); + $manager = $this->container->get('plugin.manager.condition', $this->container->get('container.namespaces')); // Get some nodes of various types to check against. $page = entity_create('node', array('type' => 'page', 'title' => $this->randomName())); diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/Type/ResourcePluginManager.php b/core/modules/rest/lib/Drupal/rest/Plugin/Type/ResourcePluginManager.php index ec5e31e..c23e970 100644 --- a/core/modules/rest/lib/Drupal/rest/Plugin/Type/ResourcePluginManager.php +++ b/core/modules/rest/lib/Drupal/rest/Plugin/Type/ResourcePluginManager.php @@ -20,10 +20,11 @@ class ResourcePluginManager extends PluginManagerBase { /** * Overrides Drupal\Component\Plugin\PluginManagerBase::__construct(). * - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct($namespaces) { + public function __construct(\Traversable $namespaces) { // Create resource plugin derivatives from declaratively defined resources. $this->discovery = new DerivativeDiscoveryDecorator(new AnnotatedClassDiscovery('rest', 'resource', $namespaces)); $this->factory = new ReflectionFactory($this->discovery); diff --git a/core/modules/rest/rest.services.yml b/core/modules/rest/rest.services.yml index af0f68c..97817ad 100644 --- a/core/modules/rest/rest.services.yml +++ b/core/modules/rest/rest.services.yml @@ -1,7 +1,7 @@ services: plugin.manager.rest: class: Drupal\rest\Plugin\Type\ResourcePluginManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] rest.route_subscriber: class: Drupal\rest\EventSubscriber\RouteSubscriber tags: diff --git a/core/modules/simpletest/tests/Drupal/simpletest/Tests/PhpUnitErrorTest.php b/core/modules/simpletest/tests/Drupal/simpletest/Tests/PhpUnitErrorTest.php index b6c19d9..56dd131 100644 --- a/core/modules/simpletest/tests/Drupal/simpletest/Tests/PhpUnitErrorTest.php +++ b/core/modules/simpletest/tests/Drupal/simpletest/Tests/PhpUnitErrorTest.php @@ -14,6 +14,7 @@ public static function getInfo() { 'name' => 'PHPUnit errors', 'description' => 'Test PHPUnit errors getting converted to Simpletest errors.', 'group' => 'Simpletest', + ); } diff --git a/core/modules/system/lib/Drupal/system/Plugin/ImageToolkitManager.php b/core/modules/system/lib/Drupal/system/Plugin/ImageToolkitManager.php index 158b6d4..c33f79a 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/ImageToolkitManager.php +++ b/core/modules/system/lib/Drupal/system/Plugin/ImageToolkitManager.php @@ -18,8 +18,12 @@ class ImageToolkitManager extends PluginManagerBase { /** * Constructs the ImageToolkitManager object. + * + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct(array $namespaces) { + public function __construct(\Traversable $namespaces) { $this->discovery = new AnnotatedClassDiscovery('system', 'imagetoolkit', $namespaces); $this->factory = new DefaultFactory($this->discovery); } diff --git a/core/modules/system/lib/Drupal/system/Plugin/Type/PluginUIManager.php b/core/modules/system/lib/Drupal/system/Plugin/Type/PluginUIManager.php index dd7fca3..bc371c0 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/Type/PluginUIManager.php +++ b/core/modules/system/lib/Drupal/system/Plugin/Type/PluginUIManager.php @@ -24,10 +24,11 @@ class PluginUIManager extends PluginManagerBase { /** * Constructs a \Drupal\system\Plugin\Type\PluginUIManager object. * - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct($namespaces) { + public function __construct(\Traversable $namespaces) { $this->discovery = new AnnotatedClassDiscovery('system', 'plugin_ui', $namespaces); $this->discovery = new DerivativeDiscoveryDecorator($this->discovery); $this->discovery = new AlterDecorator($this->discovery, 'plugin_ui'); diff --git a/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitGdTest.php b/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitGdTest.php index 1dac11c..6f4075d 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitGdTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitGdTest.php @@ -215,7 +215,7 @@ function testManipulations() { ); } - $manager = new ImageToolkitManager($this->container->getParameter('container.namespaces')); + $manager = new ImageToolkitManager($this->container->get('container.namespaces')); foreach ($files as $file) { foreach ($operations as $op => $values) { // Load up a fresh image. diff --git a/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTest.php b/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTest.php index 7077023..d0d64a3 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTest.php @@ -26,7 +26,7 @@ public static function getInfo() { * available toolkits. */ function testGetAvailableToolkits() { - $manager = new ImageToolkitManager($this->container->getParameter('container.namespaces')); + $manager = new ImageToolkitManager($this->container->get('container.namespaces')); $toolkits = $manager->getAvailableToolkits(); $this->assertTrue(isset($toolkits['test']), 'The working toolkit was returned.'); $this->assertFalse(isset($toolkits['broken']), 'The toolkit marked unavailable was not returned'); diff --git a/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTestBase.php index d365f97..260b2da 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTestBase.php +++ b/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTestBase.php @@ -31,7 +31,7 @@ function setUp() { parent::setUp(); // Use the image_test.module's test toolkit. - $manager = new ImageToolkitManager($this->container->getParameter('container.namespaces')); + $manager = new ImageToolkitManager($this->container->get('container.namespaces')); $this->toolkit = $manager->createInstance('test'); // Pick a file for testing. diff --git a/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/AnnotatedClassDiscoveryTest.php b/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/AnnotatedClassDiscoveryTest.php index fb026e9..b54b064 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/AnnotatedClassDiscoveryTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/AnnotatedClassDiscoveryTest.php @@ -53,7 +53,7 @@ public function setUp() { 'class' => 'Drupal\plugin_test\Plugin\plugin_test\fruit\Orange', ), ); - $namespaces = array('Drupal\plugin_test' => DRUPAL_ROOT . '/core/modules/system/tests/modules/plugin_test/lib'); + $namespaces = new \ArrayObject(array('Drupal\plugin_test' => DRUPAL_ROOT . '/core/modules/system/tests/modules/plugin_test/lib')); $this->discovery = new AnnotatedClassDiscovery('plugin_test', 'fruit', $namespaces); $this->emptyDiscovery = new AnnotatedClassDiscovery('non_existing_module', 'non_existing_plugin_type', $namespaces); } diff --git a/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/CustomAnnotationClassDiscoveryTest.php b/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/CustomAnnotationClassDiscoveryTest.php index 792f8a7..849933b 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/CustomAnnotationClassDiscoveryTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/CustomAnnotationClassDiscoveryTest.php @@ -39,7 +39,7 @@ protected function setUp() { 'class' => 'Drupal\plugin_test\Plugin\plugin_test\custom_annotation\Example2', ), ); - $root_namespaces = array('Drupal\plugin_test' => DRUPAL_ROOT . '/core/modules/system/tests/modules/plugin_test/lib'); + $root_namespaces = new \ArrayObject(array('Drupal\plugin_test' => DRUPAL_ROOT . '/core/modules/system/tests/modules/plugin_test/lib')); $annotation_namespaces = array( 'Drupal\plugin_test\Plugin\Annotation' => DRUPAL_ROOT . '/core/modules/system/tests/modules/plugin_test/lib', ); diff --git a/core/modules/system/system.services.yml b/core/modules/system/system.services.yml index bf43cd4..c049b0a 100644 --- a/core/modules/system/system.services.yml +++ b/core/modules/system/system.services.yml @@ -5,4 +5,4 @@ services: - { name: access_check } plugin.manager.system.plugin_ui: class: Drupal\system\Plugin\Type\PluginUIManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] diff --git a/core/modules/system/tests/modules/condition_test/lib/Drupal/condition_test/FormController.php b/core/modules/system/tests/modules/condition_test/lib/Drupal/condition_test/FormController.php index 93c3603..b1012c2 100644 --- a/core/modules/system/tests/modules/condition_test/lib/Drupal/condition_test/FormController.php +++ b/core/modules/system/tests/modules/condition_test/lib/Drupal/condition_test/FormController.php @@ -33,7 +33,7 @@ public function getFormID() { * Constructs a \Drupal\condition_test\FormController object. */ public function __construct() { - $manager = new ConditionManager(drupal_container()->getParameter('container.namespaces')); + $manager = new ConditionManager(\Drupal::service('container.namespaces')); $this->condition = $manager->createInstance('node_type'); } diff --git a/core/modules/tour/lib/Drupal/tour/TipPluginManager.php b/core/modules/tour/lib/Drupal/tour/TipPluginManager.php index f4a1016..fd8c1c4 100644 --- a/core/modules/tour/lib/Drupal/tour/TipPluginManager.php +++ b/core/modules/tour/lib/Drupal/tour/TipPluginManager.php @@ -21,10 +21,11 @@ class TipPluginManager extends PluginManagerBase { /** * Overrides \Drupal\Component\Plugin\PluginManagerBase::__construct(). * - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct(array $namespaces) { + public function __construct(\Traversable $namespaces) { $this->discovery = new AnnotatedClassDiscovery('tour', 'tip', $namespaces); $this->discovery = new CacheDecorator($this->discovery, 'tour'); diff --git a/core/modules/tour/tour.services.yml b/core/modules/tour/tour.services.yml index 36a5df2..c4cf3fa 100644 --- a/core/modules/tour/tour.services.yml +++ b/core/modules/tour/tour.services.yml @@ -1,4 +1,4 @@ services: plugin.manager.tour.tip: class: Drupal\tour\TipPluginManager - arguments: ['%container.namespaces%'] + arguments: ['@container.namespaces'] diff --git a/core/modules/views/lib/Drupal/views/Plugin/Discovery/ViewsHandlerDiscovery.php b/core/modules/views/lib/Drupal/views/Plugin/Discovery/ViewsHandlerDiscovery.php index 291ad44..51664cb 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Discovery/ViewsHandlerDiscovery.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Discovery/ViewsHandlerDiscovery.php @@ -22,17 +22,25 @@ class ViewsHandlerDiscovery extends AnnotatedClassDiscovery { protected $type; /** + * An object containing the namespaces to look for plugin implementations. + * + * @var \Traversable + */ + protected $rootNamespacesIterator; + + /** * Constructs a ViewsHandlerDiscovery object. * * @param string $type * The plugin type, for example filter. - * @param array $root_namespaces - * (optional) Array of root paths keyed by the corresponding namespace to - * look for plugin implementations, \Plugin\views\$type will be appended to - * each namespace. Defaults to an empty array. + * @param \Traversable $root_namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - function __construct($type, array $root_namespaces = array()) { + function __construct($type, \Traversable $root_namespaces) { $this->type = $type; + $this->rootNamespacesIterator = $root_namespaces; + $annotation_namespaces = array( 'Drupal\Component\Annotation' => DRUPAL_ROOT . '/core/lib', ); @@ -55,4 +63,16 @@ public function getDefinitions() { return $definitions; } + /** + * {@inheritdoc} + */ + protected function getPluginNamespaces() { + $plugin_namespaces = array(); + foreach ($this->rootNamespacesIterator as $namespace => $dir) { + $plugin_namespaces["$namespace\\Plugin\\views\\{$this->type}"] = array($dir); + } + + return $plugin_namespaces; + } + } diff --git a/core/modules/views/lib/Drupal/views/Plugin/ViewsHandlerManager.php b/core/modules/views/lib/Drupal/views/Plugin/ViewsHandlerManager.php index b515452..5768aa9 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/ViewsHandlerManager.php +++ b/core/modules/views/lib/Drupal/views/Plugin/ViewsHandlerManager.php @@ -22,10 +22,11 @@ class ViewsHandlerManager extends PluginManagerBase { * * @param string $type * The plugin type, for example filter. - * @param array $namespaces - * (optional) An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct($type, array $namespaces = array()) { + public function __construct($type, \Traversable $namespaces) { $this->discovery = new ViewsHandlerDiscovery($type, $namespaces); $this->discovery = new CacheDecorator($this->discovery, "views:$type", 'views_info'); diff --git a/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php b/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php index b1c6866..4413b00 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php +++ b/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php @@ -26,10 +26,11 @@ class ViewsPluginManager extends PluginManagerBase { * * @param string $type * The plugin type, for example filter. - * @param array $namespaces - * An array of paths keyed by it's corresponding namespaces. + * @param \Traversable $namespaces + * An object that implements \Traversable which contains the root paths + * keyed by the corresponding namespace to look for plugin implementations, */ - public function __construct($type, array $namespaces = array()) { + public function __construct($type, \Traversable $namespaces) { $this->discovery = new AnnotatedClassDiscovery('views', $type, $namespaces); $this->discovery = new DerivativeDiscoveryDecorator($this->discovery); $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition')); diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/Page.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/Page.php index daf4186..294d6f6 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/display/Page.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/Page.php @@ -56,7 +56,7 @@ protected function defineOptions() { 'title' => array('default' => '', 'translatable' => FALSE), 'description' => array('default' => '', 'translatable' => FALSE), 'weight' => array('default' => 0), - 'name' => array('default' => variable_get('menu_default_node_menu', 'navigation')), + 'name' => array('default' => 'navigation'), 'context' => array('default' => ''), ), ); diff --git a/core/modules/views/views.services.yml b/core/modules/views/views.services.yml index 7263f67..657f2c6 100644 --- a/core/modules/views/views.services.yml +++ b/core/modules/views/views.services.yml @@ -1,61 +1,61 @@ services: plugin.manager.views.access: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [access, '%container.namespaces%'] + arguments: [access, '@container.namespaces'] plugin.manager.views.area: class: Drupal\views\Plugin\ViewsHandlerManager - arguments: [area, '%container.namespaces%'] + arguments: [area, '@container.namespaces'] plugin.manager.views.argument: class: Drupal\views\Plugin\ViewsHandlerManager - arguments: [argument, '%container.namespaces%'] + arguments: [argument, '@container.namespaces'] plugin.manager.views.argument_default: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [argument_default, '%container.namespaces%'] + arguments: [argument_default, '@container.namespaces'] plugin.manager.views.argument_validator: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [argument_validator, '%container.namespaces%'] + arguments: [argument_validator, '@container.namespaces'] plugin.manager.views.cache: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [cache, '%container.namespaces%'] + arguments: [cache, '@container.namespaces'] plugin.manager.views.display_extender: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [display_extender, '%container.namespaces%'] + arguments: [display_extender, '@container.namespaces'] plugin.manager.views.display: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [display, '%container.namespaces%'] + arguments: [display, '@container.namespaces'] plugin.manager.views.exposed_form: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [exposed_form, '%container.namespaces%'] + arguments: [exposed_form, '@container.namespaces'] plugin.manager.views.field: class: Drupal\views\Plugin\ViewsHandlerManager - arguments: [field, '%container.namespaces%'] + arguments: [field, '@container.namespaces'] plugin.manager.views.filter: class: Drupal\views\Plugin\ViewsHandlerManager - arguments: [filter, '%container.namespaces%'] + arguments: [filter, '@container.namespaces'] plugin.manager.views.join: class: Drupal\views\Plugin\ViewsHandlerManager - arguments: [join, '%container.namespaces%'] + arguments: [join, '@container.namespaces'] plugin.manager.views.pager: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [pager, '%container.namespaces%'] + arguments: [pager, '@container.namespaces'] plugin.manager.views.query: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [query, '%container.namespaces%'] + arguments: [query, '@container.namespaces'] plugin.manager.views.relationship: class: Drupal\views\Plugin\ViewsHandlerManager - arguments: [relationship, '%container.namespaces%'] + arguments: [relationship, '@container.namespaces'] plugin.manager.views.row: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [row, '%container.namespaces%'] + arguments: [row, '@container.namespaces'] plugin.manager.views.sort: class: Drupal\views\Plugin\ViewsHandlerManager - arguments: [sort, '%container.namespaces%'] + arguments: [sort, '@container.namespaces'] plugin.manager.views.style: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [style, '%container.namespaces%'] + arguments: [style, '@container.namespaces'] plugin.manager.views.wizard: class: Drupal\views\Plugin\ViewsPluginManager - arguments: [wizard, '%container.namespaces%'] + arguments: [wizard, '@container.namespaces'] views.views_data: class: Drupal\views\ViewsDataCache arguments: ['@cache.views_info', '@config.factory', '@module_handler']