diff --git a/core/includes/common.inc b/core/includes/common.inc index 5a46d80..fdd9eac 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -33,7 +33,7 @@ use Drupal\Core\Routing\GeneratorNotInitializedException; use Drupal\Core\Template\Attribute; use Drupal\Core\Render\Element; -use Drupal\Core\Session\AnonymousUserSession; +use Drupal\Core\Authentication\AnonymousUserSession; /** * @defgroup php_wrappers PHP wrapper functions diff --git a/core/lib/Drupal/Core/Session/AnonymousUserSession.php b/core/lib/Drupal/Core/Authentication/AnonymousUserSession.php similarity index 70% rename from core/lib/Drupal/Core/Session/AnonymousUserSession.php rename to core/lib/Drupal/Core/Authentication/AnonymousUserSession.php index de0527d..4025862 100644 --- a/core/lib/Drupal/Core/Session/AnonymousUserSession.php +++ b/core/lib/Drupal/Core/Authentication/AnonymousUserSession.php @@ -2,10 +2,12 @@ /** * @file - * Contains \Drupal\Core\Session\AnonymousUserSession. + * Contains \Drupal\Core\Authentication\AnonymousUserSession. */ -namespace Drupal\Core\Session; +namespace Drupal\Core\Authentication; + +use Drupal\Core\Session\UserSession; /** * An account implementation representing an anonymous user. diff --git a/core/lib/Drupal/Core/Cron.php b/core/lib/Drupal/Core/Cron.php index 1c17c94..615489f 100644 --- a/core/lib/Drupal/Core/Cron.php +++ b/core/lib/Drupal/Core/Cron.php @@ -12,7 +12,7 @@ use Drupal\Core\State\StateInterface; use Drupal\Core\Lock\LockBackendInterface; use Drupal\Core\Queue\QueueFactory; -use Drupal\Core\Session\AnonymousUserSession; +use Drupal\Core\Authentication\AnonymousUserSession; use Drupal\Core\Session\AccountSwitcherInterface; use Drupal\Core\Queue\SuspendQueueException; use Psr\Log\LoggerInterface; diff --git a/core/lib/Drupal/Core/Session/AccountProxy.php b/core/lib/Drupal/Core/Session/AccountProxy.php index 492797b..463f00f 100644 --- a/core/lib/Drupal/Core/Session/AccountProxy.php +++ b/core/lib/Drupal/Core/Session/AccountProxy.php @@ -7,6 +7,7 @@ namespace Drupal\Core\Session; use Drupal\Core\Authentication\AccountInterface; +use Drupal\Core\Authentication\AnonymousUserSession; /** * A proxied implementation of AccountInterface. diff --git a/core/lib/Drupal/Core/Session/UserSession.php b/core/lib/Drupal/Core/Session/UserSession.php index 1d8380b..12f22be 100644 --- a/core/lib/Drupal/Core/Session/UserSession.php +++ b/core/lib/Drupal/Core/Session/UserSession.php @@ -6,9 +6,7 @@ */ namespace Drupal\Core\Session; -use Drupal\Core\Authentication\AccountInterface; -use Drupal\Core\Authentication\AccountInterface; -use Drupal\Core\Authentication\AccountInterface; + use Drupal\Core\Authentication\AccountInterface; /** diff --git a/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php b/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php index 2b955cd..474259e 100644 --- a/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php +++ b/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php @@ -16,7 +16,7 @@ use Drupal\Core\Routing\UrlGeneratorTrait; use Drupal\Core\TypedData\DataDefinition; use Drupal\Core\Field\FieldItemBase; -use Drupal\Core\Session\AnonymousUserSession; +use Drupal\Core\Authentication\AnonymousUserSession; /** * Plugin implementation of the 'comment' field type. diff --git a/core/modules/comment/src/Tests/CommentFieldAccessTest.php b/core/modules/comment/src/Tests/CommentFieldAccessTest.php index 654d1b0..0eb27bf 100644 --- a/core/modules/comment/src/Tests/CommentFieldAccessTest.php +++ b/core/modules/comment/src/Tests/CommentFieldAccessTest.php @@ -9,7 +9,7 @@ use Drupal\comment\Entity\Comment; use Drupal\comment\Entity\CommentType; use Drupal\Component\Utility\SafeMarkup; -use Drupal\Core\Session\AnonymousUserSession; +use Drupal\Core\Authentication\AnonymousUserSession; use Drupal\entity_test\Entity\EntityTest; use Drupal\field\Entity\FieldConfig; use Drupal\simpletest\TestBase; diff --git a/core/modules/comment/src/Tests/Views/CommentFieldNameTest.php b/core/modules/comment/src/Tests/Views/CommentFieldNameTest.php index ab40e6f..4ac63a8 100644 --- a/core/modules/comment/src/Tests/Views/CommentFieldNameTest.php +++ b/core/modules/comment/src/Tests/Views/CommentFieldNameTest.php @@ -8,7 +8,7 @@ namespace Drupal\comment\Tests\Views; use Drupal\comment\Entity\Comment; -use Drupal\Core\Session\AnonymousUserSession; +use Drupal\Core\Authentication\AnonymousUserSession; use Drupal\user\RoleInterface; use Drupal\views\Views; diff --git a/core/modules/comment/src/Tests/Views/CommentUserNameTest.php b/core/modules/comment/src/Tests/Views/CommentUserNameTest.php index 2c64bb2..8bc932c 100644 --- a/core/modules/comment/src/Tests/Views/CommentUserNameTest.php +++ b/core/modules/comment/src/Tests/Views/CommentUserNameTest.php @@ -8,7 +8,7 @@ namespace Drupal\comment\Tests\Views; use Drupal\comment\Entity\Comment; -use Drupal\Core\Session\AnonymousUserSession; +use Drupal\Core\Authentication\AnonymousUserSession; use Drupal\user\Entity\Role; use Drupal\user\Entity\User; use Drupal\views\Entity\View; diff --git a/core/modules/filter/src/Tests/FilterAPITest.php b/core/modules/filter/src/Tests/FilterAPITest.php index 49b99d2..dc2e684 100644 --- a/core/modules/filter/src/Tests/FilterAPITest.php +++ b/core/modules/filter/src/Tests/FilterAPITest.php @@ -9,7 +9,7 @@ use Drupal\Core\Language\LanguageInterface; use Drupal\Component\Utility\SafeMarkup; -use Drupal\Core\Session\AnonymousUserSession; +use Drupal\Core\Authentication\AnonymousUserSession; use Drupal\Core\TypedData\OptionsProviderInterface; use Drupal\Core\TypedData\DataDefinition; use Drupal\filter\Plugin\DataType\FilterFormat; diff --git a/core/modules/simpletest/src/BrowserTestBase.php b/core/modules/simpletest/src/BrowserTestBase.php index 64e9cdb..1b99ac2 100644 --- a/core/modules/simpletest/src/BrowserTestBase.php +++ b/core/modules/simpletest/src/BrowserTestBase.php @@ -20,7 +20,7 @@ use Drupal\Core\Database\Database; use Drupal\Core\DrupalKernel; use Drupal\Core\Authentication\AccountInterface; -use Drupal\Core\Session\AnonymousUserSession; +use Drupal\Core\Authentication\AnonymousUserSession; use Drupal\Core\Session\UserSession; use Drupal\Core\Site\Settings; use Drupal\Core\StreamWrapper\StreamWrapperInterface; diff --git a/core/modules/simpletest/src/TestBase.php b/core/modules/simpletest/src/TestBase.php index 9a38774..7f60ecc 100644 --- a/core/modules/simpletest/src/TestBase.php +++ b/core/modules/simpletest/src/TestBase.php @@ -18,7 +18,7 @@ use Drupal\Core\Config\StorageInterface; use Drupal\Core\Language\Language; use Drupal\Core\Session\AccountProxy; -use Drupal\Core\Session\AnonymousUserSession; +use Drupal\Core\Authentication\AnonymousUserSession; use Drupal\Core\Site\Settings; use Drupal\Core\StreamWrapper\PublicStream; use Drupal\Core\Utility\Error; diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php index 99ae133..c64ffe2 100644 --- a/core/modules/simpletest/src/WebTestBase.php +++ b/core/modules/simpletest/src/WebTestBase.php @@ -22,7 +22,7 @@ use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Render\Element; use Drupal\Core\Authentication\AccountInterface; -use Drupal\Core\Session\AnonymousUserSession; +use Drupal\Core\Authentication\AnonymousUserSession; use Drupal\Core\Session\UserSession; use Drupal\Core\Site\Settings; use Drupal\Core\StreamWrapper\PublicStream; diff --git a/core/modules/system/src/Tests/Form/FormCacheTest.php b/core/modules/system/src/Tests/Form/FormCacheTest.php index 77d259e..1809b38 100644 --- a/core/modules/system/src/Tests/Form/FormCacheTest.php +++ b/core/modules/system/src/Tests/Form/FormCacheTest.php @@ -8,7 +8,7 @@ namespace Drupal\system\Tests\Form; use Drupal\Core\Form\FormState; -use Drupal\Core\Session\AnonymousUserSession; +use Drupal\Core\Authentication\AnonymousUserSession; use Drupal\Core\Session\UserSession; use Drupal\simpletest\KernelTestBase; diff --git a/core/modules/user/user.module b/core/modules/user/user.module index 1a6395f..6a3003b 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -10,7 +10,7 @@ use Drupal\Core\Render\Element; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Authentication\AccountInterface; -use Drupal\Core\Session\AnonymousUserSession; +use Drupal\Core\Authentication\AnonymousUserSession; use Drupal\Core\Site\Settings; use Drupal\Core\Url; use Drupal\user\Entity\Role; diff --git a/core/modules/views/src/Tests/Plugin/DisplayPageTest.php b/core/modules/views/src/Tests/Plugin/DisplayPageTest.php index 373fe5a..8aac4ad 100644 --- a/core/modules/views/src/Tests/Plugin/DisplayPageTest.php +++ b/core/modules/views/src/Tests/Plugin/DisplayPageTest.php @@ -8,7 +8,7 @@ namespace Drupal\views\Tests\Plugin; use Drupal\Core\Menu\MenuTreeParameters; -use Drupal\Core\Session\AnonymousUserSession; +use Drupal\Core\Authentication\AnonymousUserSession; use Drupal\views\Views; use Drupal\views\Tests\ViewUnitTestBase; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; diff --git a/core/tests/Drupal/Tests/Core/Session/AnonymousUserSessionTest.php b/core/tests/Drupal/Tests/Core/Authentication/AnonymousUserSessionTest.php similarity index 55% rename from core/tests/Drupal/Tests/Core/Session/AnonymousUserSessionTest.php rename to core/tests/Drupal/Tests/Core/Authentication/AnonymousUserSessionTest.php index 043e17e..df4563f 100644 --- a/core/tests/Drupal/Tests/Core/Session/AnonymousUserSessionTest.php +++ b/core/tests/Drupal/Tests/Core/Authentication/AnonymousUserSessionTest.php @@ -2,21 +2,17 @@ /** * @file - * Contains \Drupal\Tests\Core\Session\AnonymousUserSessionTest. + * Contains \Drupal\Tests\Core\Authentication\AnonymousUserSessionTest. */ -namespace Drupal\Tests\Core\Session; +namespace Drupal\Tests\Core\Authentication; use Drupal\Tests\UnitTestCase; -use Drupal\Core\Session\AnonymousUserSession; - use Drupal\user\RoleInterface; - use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Scope; -use Symfony\Component\HttpFoundation\RequestStack; +use Drupal\Core\Authentication\AnonymousUserSession; +use Drupal\user\RoleInterface; /** - * @coversDefaultClass \Drupal\Core\Session\AnonymousUserSession + * @coversDefaultClass \Drupal\Core\Authentication\AnonymousUserSession * @group Session */ class AnonymousUserSessionTest extends UnitTestCase {