diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index af1fe52..4480646 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -512,6 +512,7 @@ protected function buildContainer() { // Plugin directory. foreach (array('Core', 'Component') as $parent_directory) { $path = DRUPAL_ROOT . '/core/lib/Drupal/' . $parent_directory; + $namespaces['Drupal\\' . $parent_directory] = DRUPAL_ROOT . '/core/lib'; foreach (new \DirectoryIterator($path) as $component) { if (!$component->isDot() && is_dir($component->getPathname() . '/Plugin')) { $namespaces['Drupal\\' . $parent_directory .'\\' . $component->getFilename()] = DRUPAL_ROOT . '/core/lib'; diff --git a/core/lib/Drupal/Core/StreamWrapper/Plugin/StreamWrapper/PrivateStream.php b/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php similarity index 95% rename from core/lib/Drupal/Core/StreamWrapper/Plugin/StreamWrapper/PrivateStream.php rename to core/lib/Drupal/Core/StreamWrapper/PrivateStream.php index 94a538c..6aeced6 100644 --- a/core/lib/Drupal/Core/StreamWrapper/Plugin/StreamWrapper/PrivateStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php @@ -5,7 +5,7 @@ * Definition of Drupal\Core\StreamWrapper\PrivateStream. */ -namespace Drupal\Core\StreamWrapper\Plugin\StreamWrapper; +namespace Drupal\Core\StreamWrapper; use Drupal\Core\Annotation\StreamWrapper; use Drupal\Core\Annotation\Translation; diff --git a/core/lib/Drupal/Core/StreamWrapper/Plugin/StreamWrapper/PublicStream.php b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php similarity index 95% rename from core/lib/Drupal/Core/StreamWrapper/Plugin/StreamWrapper/PublicStream.php rename to core/lib/Drupal/Core/StreamWrapper/PublicStream.php index 1bf1c35..b2b87fd 100644 --- a/core/lib/Drupal/Core/StreamWrapper/Plugin/StreamWrapper/PublicStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php @@ -5,7 +5,7 @@ * Definition of Drupal\Core\StreamWrapper\PublicStream. */ -namespace Drupal\Core\StreamWrapper\Plugin\StreamWrapper; +namespace Drupal\Core\StreamWrapper; use Drupal\Core\StreamWrapper\LocalStream; use Drupal\Core\Annotation\StreamWrapper; diff --git a/core/lib/Drupal/Core/StreamWrapper/Plugin/StreamWrapper/TemporaryStream.php b/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php similarity index 94% rename from core/lib/Drupal/Core/StreamWrapper/Plugin/StreamWrapper/TemporaryStream.php rename to core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php index 08b91da..0ace393 100644 --- a/core/lib/Drupal/Core/StreamWrapper/Plugin/StreamWrapper/TemporaryStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php @@ -5,7 +5,7 @@ * Definition of Drupal\Core\StreamWrapper\TemporaryStream. */ -namespace Drupal\Core\StreamWrapper\Plugin\StreamWrapper; +namespace Drupal\Core\StreamWrapper; use Drupal\Core\StreamWrapper\LocalStream; use Drupal\Core\Annotation\StreamWrapper; diff --git a/core/modules/file/tests/file_test/lib/Drupal/file_test/Plugin/StreamWrapper/DummyReadOnlyStreamWrapper.php b/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyReadOnlyStreamWrapper.php similarity index 88% rename from core/modules/file/tests/file_test/lib/Drupal/file_test/Plugin/StreamWrapper/DummyReadOnlyStreamWrapper.php rename to core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyReadOnlyStreamWrapper.php index 737684d..5b5b09d 100644 --- a/core/modules/file/tests/file_test/lib/Drupal/file_test/Plugin/StreamWrapper/DummyReadOnlyStreamWrapper.php +++ b/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyReadOnlyStreamWrapper.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\file_test\Plugin\StreamWrapper\DummyReadOnlyStreamWrapper. + * Contains \Drupal\file_test\StreamWrapper\DummyReadOnlyStreamWrapper. */ -namespace Drupal\file_test\Plugin\StreamWrapper; +namespace Drupal\file_test\StreamWrapper; use Drupal\Core\StreamWrapper\LocalReadOnlyStream; use Drupal\Core\Annotation\StreamWrapper; diff --git a/core/modules/file/tests/file_test/lib/Drupal/file_test/Plugin/StreamWrapper/DummyRemoteStreamWrapper.php b/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyRemoteStreamWrapper.php similarity index 69% rename from core/modules/file/tests/file_test/lib/Drupal/file_test/Plugin/StreamWrapper/DummyRemoteStreamWrapper.php rename to core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyRemoteStreamWrapper.php index 29e9045..faf84bc 100644 --- a/core/modules/file/tests/file_test/lib/Drupal/file_test/Plugin/StreamWrapper/DummyRemoteStreamWrapper.php +++ b/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyRemoteStreamWrapper.php @@ -2,12 +2,12 @@ /** * @file - * Contains \Drupal\file_test\Plugin\StreamWrapper\DummyRemoteStreamWrapper. + * Contains \Drupal\file_test\StreamWrapper\DummyRemoteStreamWrapper. */ -namespace Drupal\file_test\Plugin\StreamWrapper; +namespace Drupal\file_test\StreamWrapper; -use Drupal\Core\StreamWrapper\Plugin\StreamWrapper\PublicStream; +use Drupal\Core\StreamWrapper\PublicStream; use Drupal\Core\Annotation\StreamWrapper; use Drupal\Core\Annotation\Translation; @@ -24,7 +24,7 @@ * description = @Translation("Dummy wrapper for simpletest (remote).") * ) */ -class DummyRemoteStreamWrapper extends PublicStream { +class DummyRemoteStreamWrapper extends \Drupal\Core\StreamWrapper\PublicStream { function realpath() { return FALSE; } diff --git a/core/modules/file/tests/file_test/lib/Drupal/file_test/Plugin/StreamWrapper/DummyStreamWrapper.php b/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyStreamWrapper.php similarity index 87% rename from core/modules/file/tests/file_test/lib/Drupal/file_test/Plugin/StreamWrapper/DummyStreamWrapper.php rename to core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyStreamWrapper.php index 2bb6985..ffc3d9d 100644 --- a/core/modules/file/tests/file_test/lib/Drupal/file_test/Plugin/StreamWrapper/DummyStreamWrapper.php +++ b/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyStreamWrapper.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\file_test\Plugin\StreamWrapper\DummyStreamWrapper. + * Contains \Drupal\file_test\StreamWrapper\DummyStreamWrapper. */ -namespace Drupal\file_test\Plugin\StreamWrapper; +namespace Drupal\file_test\StreamWrapper; use Drupal\Core\StreamWrapper\LocalStream; use Drupal\Core\Annotation\StreamWrapper; diff --git a/core/modules/locale/lib/Drupal/locale/Plugin/StreamWrapper/TranslationsStream.php b/core/modules/locale/lib/Drupal/locale/StreamWrapper/TranslationsStream.php similarity index 90% rename from core/modules/locale/lib/Drupal/locale/Plugin/StreamWrapper/TranslationsStream.php rename to core/modules/locale/lib/Drupal/locale/StreamWrapper/TranslationsStream.php index 15c2cbf..bf80fb9 100644 --- a/core/modules/locale/lib/Drupal/locale/Plugin/StreamWrapper/TranslationsStream.php +++ b/core/modules/locale/lib/Drupal/locale/StreamWrapper/TranslationsStream.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\locale\TranslationStream. + * Definition of Drupal\locale\StreamWrapper\TranslationStream. */ -namespace Drupal\locale\Plugin\StreamWrapper; +namespace Drupal\locale\StreamWrapper; use Drupal\Core\StreamWrapper\LocalStream; use Drupal\Core\Annotation\StreamWrapper; diff --git a/core/modules/system/lib/Drupal/system/Tests/File/StreamWrapperTest.php b/core/modules/system/lib/Drupal/system/Tests/File/StreamWrapperTest.php index cf0174b..e9d8b10 100644 --- a/core/modules/system/lib/Drupal/system/Tests/File/StreamWrapperTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/File/StreamWrapperTest.php @@ -22,7 +22,7 @@ class StreamWrapperTest extends WebTestBase { public static $modules = array('file_test'); protected $scheme = 'dummy'; - protected $classname = 'Drupal\file_test\Plugin\StreamWrapper\DummyStreamWrapper'; + protected $classname = 'Drupal\file_test\StreamWrapper\DummyStreamWrapper'; public static function getInfo() { return array( @@ -49,7 +49,7 @@ function testGetClassName() { // Check the dummy scheme. $this->assertEqual($this->classname, file_stream_wrapper_get_class($this->scheme), 'Got correct class name for dummy scheme.'); // Check core's scheme. - $this->assertEqual('Drupal\Core\StreamWrapper\Plugin\StreamWrapper\PublicStream', file_stream_wrapper_get_class('public'), 'Got correct class name for public scheme.'); + $this->assertEqual('Drupal\Core\StreamWrapper\StreamWrapper\PublicStream', file_stream_wrapper_get_class('public'), 'Got correct class name for public scheme.'); } /** @@ -60,7 +60,7 @@ function testGetInstanceByScheme() { $this->assertEqual($this->classname, get_class($instance), 'Got correct class type for dummy scheme.'); $instance = file_stream_wrapper_get_instance_by_scheme('public'); - $this->assertEqual('Drupal\Core\StreamWrapper\Plugin\StreamWrapper\PublicStream', get_class($instance), 'Got correct class type for public scheme.'); + $this->assertEqual('Drupal\Core\StreamWrapper\StreamWrapper\PublicStream', get_class($instance), 'Got correct class type for public scheme.'); } /** @@ -73,7 +73,7 @@ function testUriFunctions() { $this->assertEqual($this->classname, get_class($instance), 'Got correct class type for dummy URI.'); $instance = file_stream_wrapper_get_instance_by_uri('public://foo'); - $this->assertEqual('Drupal\Core\StreamWrapper\Plugin\StreamWrapper\PublicStream', get_class($instance), 'Got correct class type for public URI.'); + $this->assertEqual('Drupal\Core\StreamWrapper\StreamWrapper\PublicStream', get_class($instance), 'Got correct class type for public URI.'); // Test file_uri_target(). $this->assertEqual(file_uri_target('public://foo/bar.txt'), 'foo/bar.txt', 'Got a valid stream target from public://foo/bar.txt.');