diff --git a/core/core.services.yml b/core/core.services.yml index 77173cd2ffe0a7e60ed8cb7e0ed881abc5cd1ba8..5a9cd6e0454c4c536c97fb8d9ba12d6d00916907 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -10,59 +10,59 @@ parameters: services: # Simple cache contexts, directly derived from the request context. cache_context.ip: - class: Drupal\Core\Cache\IpCacheContext + class: Drupal\Core\Cache\Context\IpCacheContext arguments: ['@request_stack'] tags: - { name: cache.context } cache_context.headers: - class: Drupal\Core\Cache\HeadersCacheContext + class: Drupal\Core\Cache\Context\HeadersCacheContext arguments: ['@request_stack'] tags: - { name: cache.context } cache_context.cookies: - class: Drupal\Core\Cache\CookiesCacheContext + class: Drupal\Core\Cache\Context\CookiesCacheContext arguments: ['@request_stack'] tags: - { name: cache.context } cache_context.request_format: - class: Drupal\Core\Cache\RequestFormatCacheContext + class: Drupal\Core\Cache\Context\RequestFormatCacheContext arguments: ['@request_stack'] tags: - { name: cache.context } cache_context.url: - class: Drupal\Core\Cache\UrlCacheContext + class: Drupal\Core\Cache\Context\UrlCacheContext arguments: ['@request_stack'] tags: - { name: cache.context } cache_context.url.site: - class: Drupal\Core\Cache\SiteCacheContext + class: Drupal\Core\Cache\Context\SiteCacheContext arguments: ['@request_stack'] tags: - { name: cache.context } cache_context.url.query_args: - class: Drupal\Core\Cache\QueryArgsCacheContext + class: Drupal\Core\Cache\Context\QueryArgsCacheContext arguments: ['@request_stack'] tags: - { name: cache.context } cache_context.url.query_args.pagers: - class: Drupal\Core\Cache\PagersCacheContext + class: Drupal\Core\Cache\Context\PagersCacheContext arguments: ['@request_stack'] tags: - { name: cache.context } # Complex cache contexts, that depend on the routing system. cache_context.route: - class: Drupal\Core\Cache\RouteCacheContext + class: Drupal\Core\Cache\Context\RouteCacheContext arguments: ['@current_route_match'] tags: - { name: cache.context } cache_context.route.name: - class: Drupal\Core\Cache\RouteNameCacheContext + class: Drupal\Core\Cache\Context\RouteNameCacheContext arguments: ['@current_route_match'] tags: - { name: cache.context } cache_context.route.menu_active_trails: - class: Drupal\Core\Cache\MenuActiveTrailsCacheContext + class: Drupal\Core\Cache\Context\MenuActiveTrailsCacheContext calls: - [setContainer, ['@service_container']] tags: @@ -72,37 +72,37 @@ services: # multiple aspects of the request context plus additional logic. Hence they # are their own roots. cache_context.user: - class: Drupal\Core\Cache\UserCacheContext + class: Drupal\Core\Cache\Context\UserCacheContext arguments: ['@current_user'] tags: - { name: cache.context} cache_context.user.permissions: - class: Drupal\Core\Cache\AccountPermissionsCacheContext + class: Drupal\Core\Cache\Context\AccountPermissionsCacheContext arguments: ['@current_user', '@user_permissions_hash_generator'] tags: - { name: cache.context} cache_context.user.roles: - class: Drupal\Core\Cache\UserRolesCacheContext + class: Drupal\Core\Cache\Context\UserRolesCacheContext arguments: ['@current_user'] tags: - { name: cache.context} cache_context.user.is_super_user: - class: Drupal\Core\Cache\IsSuperUserCacheContext + class: Drupal\Core\Cache\Context\IsSuperUserCacheContext arguments: ['@current_user'] tags: - { name: cache.context} cache_context.languages: - class: Drupal\Core\Cache\LanguagesCacheContext + class: Drupal\Core\Cache\Context\LanguagesCacheContext arguments: ['@language_manager'] tags: - { name: cache.context} cache_context.theme: - class: Drupal\Core\Cache\ThemeCacheContext + class: Drupal\Core\Cache\Context\ThemeCacheContext arguments: ['@theme.manager'] tags: - { name: cache.context} cache_context.timezone: - class: Drupal\Core\Cache\TimeZoneCacheContext + class: Drupal\Core\Cache\Context\TimeZoneCacheContext tags: - { name: cache.context} @@ -112,7 +112,7 @@ services: calls: - [setContainer, ['@service_container']] cache_contexts_manager: - class: Drupal\Core\Cache\CacheContextsManager + class: Drupal\Core\Cache\Context\CacheContextsManager arguments: ['@service_container', '%cache_contexts%' ] cache_tags.invalidator: parent: container.trait diff --git a/core/lib/Drupal/Core/Access/AccessResult.php b/core/lib/Drupal/Core/Access/AccessResult.php index 24d5051033d1b700f606332cfa619f8082aafbe6..9c4e42f6f243509ab5378ada0b8a9b4df5af13f2 100644 --- a/core/lib/Drupal/Core/Access/AccessResult.php +++ b/core/lib/Drupal/Core/Access/AccessResult.php @@ -31,8 +31,8 @@ abstract class AccessResult implements AccessResultInterface, CacheableDependenc /** * The cache context IDs (to vary a cache item ID based on active contexts). * - * @see \Drupal\Core\Cache\CacheContextInterface - * @see \Drupal\Core\Cache\CacheContextsManager::convertTokensToKeys() + * @see \Drupal\Core\Cache\Context\CacheContextInterface + * @see \Drupal\Core\Cache\Context\CacheContextsManager::convertTokensToKeys() * * @var string[] */ diff --git a/core/lib/Drupal/Core/Cache/CacheableDependencyInterface.php b/core/lib/Drupal/Core/Cache/CacheableDependencyInterface.php index f415064e8eb3517faa91b2e801f00c6b7d0af779..ee1241ba0c5f7b1406ac1049a531cb248b5bb3f9 100644 --- a/core/lib/Drupal/Core/Cache/CacheableDependencyInterface.php +++ b/core/lib/Drupal/Core/Cache/CacheableDependencyInterface.php @@ -31,7 +31,7 @@ interface CacheableDependencyInterface { * @return string[] * An array of cache context tokens, used to generate a cache ID. * - * @see \Drupal\Core\Cache\CacheContextsManager::convertTokensToKeys() + * @see \Drupal\Core\Cache\Context\CacheContextsManager::convertTokensToKeys() */ public function getCacheContexts(); diff --git a/core/lib/Drupal/Core/Cache/AccountPermissionsCacheContext.php b/core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php similarity index 92% rename from core/lib/Drupal/Core/Cache/AccountPermissionsCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php index 3352ecafdf824cb6d86d3d4dd0fba6bf84e51685..7afce732b3a34eb6370fd368faf4775f79a397fe 100644 --- a/core/lib/Drupal/Core/Cache/AccountPermissionsCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\UserRolesCacheContext. + * Contains \Drupal\Core\Cache\Context\UserRolesCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; use Drupal\Core\Session\AccountInterface; use Drupal\Core\Session\PermissionsHashGeneratorInterface; diff --git a/core/lib/Drupal/Core/Cache/CacheContextInterface.php b/core/lib/Drupal/Core/Cache/Context/CacheContextInterface.php similarity index 86% rename from core/lib/Drupal/Core/Cache/CacheContextInterface.php rename to core/lib/Drupal/Core/Cache/Context/CacheContextInterface.php index fd9783a0852af8f5dacdce9882bcf09131794024..ada31747341601f7cb663e83e93377b6c48810f0 100644 --- a/core/lib/Drupal/Core/Cache/CacheContextInterface.php +++ b/core/lib/Drupal/Core/Cache/Context/CacheContextInterface.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\CacheContextInterface. + * Contains \Drupal\Core\Cache\Context\CacheContextInterface. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; /** * Provides an interface for defining a cache context service. diff --git a/core/lib/Drupal/Core/Cache/CacheContextsManager.php b/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php similarity index 95% rename from core/lib/Drupal/Core/Cache/CacheContextsManager.php rename to core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php index 67857cbfc11881328c5f4469cfba8e41d3a54674..27b012a9e49d9840d865461f84999b6d19f1ca2a 100644 --- a/core/lib/Drupal/Core/Cache/CacheContextsManager.php +++ b/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\CacheContextsManager. + * Contains \Drupal\Core\Cache\Context\CacheContextsManager. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; use Drupal\Component\Utility\SafeMarkup; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -21,9 +21,9 @@ * Note that this maps exactly to HTTP's Vary header semantics: * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.44 * - * @see \Drupal\Core\Cache\CacheContextInterface - * @see \Drupal\Core\Cache\CalculatedCacheContextInterface - * @see \Drupal\Core\Cache\CacheContextsPass + * @see \Drupal\Core\Cache\Context\CacheContextInterface + * @see \Drupal\Core\Cache\Context\CalculatedCacheContextInterface + * @see \Drupal\Core\Cache\Context\CacheContextsPass */ class CacheContextsManager { @@ -188,7 +188,7 @@ public function optimizeTokens(array $context_tokens) { * The context ID, which together with the service ID prefix allows the * corresponding cache context service to be retrieved. * - * @return \Drupal\Core\Cache\CacheContextInterface + * @return \Drupal\Core\Cache\Context\CacheContextInterface * The requested cache context service. */ protected function getService($context_id) { @@ -231,7 +231,7 @@ public static function parseTokens(array $context_tokens) { * * @throws \LogicException * - * @see \Drupal\Core\Cache\CacheContextsManager::parseTokens() + * @see \Drupal\Core\Cache\Context\CacheContextsManager::parseTokens() */ public function validateTokens(array $context_tokens = []) { if (empty($context_tokens)) { diff --git a/core/lib/Drupal/Core/Cache/CacheContextsPass.php b/core/lib/Drupal/Core/Cache/Context/CacheContextsPass.php similarity index 94% rename from core/lib/Drupal/Core/Cache/CacheContextsPass.php rename to core/lib/Drupal/Core/Cache/Context/CacheContextsPass.php index 576b2b568fca8592140319627b57218950a5e150..ce8e2f4be8a84599652d8de83193d9453234d113 100644 --- a/core/lib/Drupal/Core/Cache/CacheContextsPass.php +++ b/core/lib/Drupal/Core/Cache/Context/CacheContextsPass.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\CacheContextsPass. + * Contains \Drupal\Core\Cache\Context\CacheContextsPass. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; diff --git a/core/lib/Drupal/Core/Cache/CalculatedCacheContextInterface.php b/core/lib/Drupal/Core/Cache/Context/CalculatedCacheContextInterface.php similarity index 90% rename from core/lib/Drupal/Core/Cache/CalculatedCacheContextInterface.php rename to core/lib/Drupal/Core/Cache/Context/CalculatedCacheContextInterface.php index 38114c363cf5716692eef149244c5b5094ad6b5b..4242109227ee76f286235c4a12156a0aafdcff7a 100644 --- a/core/lib/Drupal/Core/Cache/CalculatedCacheContextInterface.php +++ b/core/lib/Drupal/Core/Cache/Context/CalculatedCacheContextInterface.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\CacheContextInterface. + * Contains \Drupal\Core\Cache\Context\CacheContextInterface. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; /** * Provides an interface for defining a calculated cache context service. diff --git a/core/lib/Drupal/Core/Cache/CookiesCacheContext.php b/core/lib/Drupal/Core/Cache/Context/CookiesCacheContext.php similarity index 86% rename from core/lib/Drupal/Core/Cache/CookiesCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/CookiesCacheContext.php index 6760b1b5c5a69e5fdc044705f650677b0e4f5456..e7850b8c8cbc2404e49474f9fbc6b1fccb3d68c8 100644 --- a/core/lib/Drupal/Core/Cache/CookiesCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/CookiesCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\CookiesCacheContext. + * Contains \Drupal\Core\Cache\Context\CookiesCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; /** * Defines the CookiesCacheContext service, for "per cookie" caching. diff --git a/core/lib/Drupal/Core/Cache/HeadersCacheContext.php b/core/lib/Drupal/Core/Cache/Context/HeadersCacheContext.php similarity index 86% rename from core/lib/Drupal/Core/Cache/HeadersCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/HeadersCacheContext.php index e2b8932dab244e56c103fceeae7f1ffc4446f42c..1644aa09c84269b81ccb5f593bc75bcfb376a751 100644 --- a/core/lib/Drupal/Core/Cache/HeadersCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/HeadersCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\HeadersCacheContext. + * Contains \Drupal\Core\Cache\Context\HeadersCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; /** * Defines the HeadersCacheContext service, for "per header" caching. diff --git a/core/lib/Drupal/Core/Cache/IpCacheContext.php b/core/lib/Drupal/Core/Cache/Context/IpCacheContext.php similarity index 81% rename from core/lib/Drupal/Core/Cache/IpCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/IpCacheContext.php index c0c2e08020fb08a30a73be9e500a9921d3146044..4841482f6bae1d95d576a93831e4e923f0e9b080 100644 --- a/core/lib/Drupal/Core/Cache/IpCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/IpCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\IpCacheContext. + * Contains \Drupal\Core\Cache\Context\IpCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; /** * Defines the IpCacheContext service, for "per IP address" caching. diff --git a/core/lib/Drupal/Core/Cache/IsSuperUserCacheContext.php b/core/lib/Drupal/Core/Cache/Context/IsSuperUserCacheContext.php similarity index 80% rename from core/lib/Drupal/Core/Cache/IsSuperUserCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/IsSuperUserCacheContext.php index 65697155357f7b0725573b3fb08be24141205195..3f27059638d073416b198a556c9dcdcf2ccd5392 100644 --- a/core/lib/Drupal/Core/Cache/IsSuperUserCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/IsSuperUserCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\IsSuperUserCacheContext. + * Contains \Drupal\Core\Cache\Context\IsSuperUserCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; /** * Defines the IsSuperUserCacheContext service, for "super user or not" caching. diff --git a/core/lib/Drupal/Core/Cache/LanguagesCacheContext.php b/core/lib/Drupal/Core/Cache/Context/LanguagesCacheContext.php similarity index 95% rename from core/lib/Drupal/Core/Cache/LanguagesCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/LanguagesCacheContext.php index b9b888345d014dbdfd7258d210b9f79b3a74214a..2bf9a2f68c3c3530597bedb8ade75ac8ea7b9689 100644 --- a/core/lib/Drupal/Core/Cache/LanguagesCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/LanguagesCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\LanguagesCacheContext. + * Contains \Drupal\Core\Cache\Context\LanguagesCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; use Drupal\Core\Language\LanguageManagerInterface; diff --git a/core/lib/Drupal/Core/Cache/MenuActiveTrailsCacheContext.php b/core/lib/Drupal/Core/Cache/Context/MenuActiveTrailsCacheContext.php similarity index 87% rename from core/lib/Drupal/Core/Cache/MenuActiveTrailsCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/MenuActiveTrailsCacheContext.php index 3b43178a31b8c0dbc37db1355e92b82212d244cd..40cc077b5aa78a50d562e2335f02c775b3737a5d 100644 --- a/core/lib/Drupal/Core/Cache/MenuActiveTrailsCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/MenuActiveTrailsCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\MenuActiveTrailsCacheContext. + * Contains \Drupal\Core\Cache\Context\MenuActiveTrailsCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; use Symfony\Component\DependencyInjection\ContainerAware; diff --git a/core/lib/Drupal/Core/Cache/PagersCacheContext.php b/core/lib/Drupal/Core/Cache/Context/PagersCacheContext.php similarity index 88% rename from core/lib/Drupal/Core/Cache/PagersCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/PagersCacheContext.php index cd9bb98895e3509f585ea5d70b5cd77b6201caab..23bdb7c99dc5e60abffd9bf9ee71926fc345819d 100644 --- a/core/lib/Drupal/Core/Cache/PagersCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/PagersCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\PagersCacheContext. + * Contains \Drupal\Core\Cache\Context\PagersCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; /** * Defines a cache context for "per page in a pager" caching. diff --git a/core/lib/Drupal/Core/Cache/QueryArgsCacheContext.php b/core/lib/Drupal/Core/Cache/Context/QueryArgsCacheContext.php similarity index 88% rename from core/lib/Drupal/Core/Cache/QueryArgsCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/QueryArgsCacheContext.php index 4c34721d74d7aa51b8a206cfe165b2d601f1d7f7..e9a76649836c06a7be0038d3f1c72cd65346bef7 100644 --- a/core/lib/Drupal/Core/Cache/QueryArgsCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/QueryArgsCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\QueryArgsCacheContext. + * Contains \Drupal\Core\Cache\Context\QueryArgsCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; /** * Defines the QueryArgsCacheContext service, for "per query args" caching. diff --git a/core/lib/Drupal/Core/Cache/RequestFormatCacheContext.php b/core/lib/Drupal/Core/Cache/Context/RequestFormatCacheContext.php similarity index 80% rename from core/lib/Drupal/Core/Cache/RequestFormatCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/RequestFormatCacheContext.php index 397384fbcf7c033cbc2cdf53a4aa097f9f9fce9a..c3e544d83490280dfc0355af1a6f64df808ba359 100644 --- a/core/lib/Drupal/Core/Cache/RequestFormatCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/RequestFormatCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\RequestFormatCacheContext. + * Contains \Drupal\Core\Cache\Context\RequestFormatCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; /** * Defines the RequestFormatCacheContext service, for "per format" caching. diff --git a/core/lib/Drupal/Core/Cache/RequestStackCacheContextBase.php b/core/lib/Drupal/Core/Cache/Context/RequestStackCacheContextBase.php similarity index 86% rename from core/lib/Drupal/Core/Cache/RequestStackCacheContextBase.php rename to core/lib/Drupal/Core/Cache/Context/RequestStackCacheContextBase.php index 34e3560c2ba596a29e33c7789811ed907403689c..2a8f22d1f980f0b392ed16b3d4d23c381e5a9c3c 100644 --- a/core/lib/Drupal/Core/Cache/RequestStackCacheContextBase.php +++ b/core/lib/Drupal/Core/Cache/Context/RequestStackCacheContextBase.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\RequestStackCacheContextBase. + * Contains \Drupal\Core\Cache\Context\RequestStackCacheContextBase. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; use Symfony\Component\HttpFoundation\RequestStack; diff --git a/core/lib/Drupal/Core/Cache/RouteCacheContext.php b/core/lib/Drupal/Core/Cache/Context/RouteCacheContext.php similarity index 90% rename from core/lib/Drupal/Core/Cache/RouteCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/RouteCacheContext.php index 486cdefe32744099fb63e0ea6e3161d01ecb405e..0643d8bf0ffded4e63ad8bbe1dd2826dbc8ef54e 100644 --- a/core/lib/Drupal/Core/Cache/RouteCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/RouteCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\RouteCacheContext. + * Contains \Drupal\Core\Cache\Context\RouteCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; use Drupal\Core\Routing\RouteMatchInterface; diff --git a/core/lib/Drupal/Core/Cache/RouteNameCacheContext.php b/core/lib/Drupal/Core/Cache/Context/RouteNameCacheContext.php similarity index 79% rename from core/lib/Drupal/Core/Cache/RouteNameCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/RouteNameCacheContext.php index f0bd93788108f8ff908705fcaffbdeedc09922dc..dcca18b8ff1834a215db8fcad65c651ffa70216f 100644 --- a/core/lib/Drupal/Core/Cache/RouteNameCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/RouteNameCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\RouteNameCacheContext. + * Contains \Drupal\Core\Cache\Context\RouteNameCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; /** * Defines the RouteCacheContext service, for "per route name" caching. diff --git a/core/lib/Drupal/Core/Cache/SiteCacheContext.php b/core/lib/Drupal/Core/Cache/Context/SiteCacheContext.php similarity index 90% rename from core/lib/Drupal/Core/Cache/SiteCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/SiteCacheContext.php index febbc0ed0f27c159325e937fb086d8a0b539e93c..4e0c123f51191303d03ce1fad1efe226f63469ac 100644 --- a/core/lib/Drupal/Core/Cache/SiteCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/SiteCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\SiteCacheContext. + * Contains \Drupal\Core\Cache\Context\SiteCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; /** * Defines the SiteCacheContext service, for "per site" caching. diff --git a/core/lib/Drupal/Core/Cache/ThemeCacheContext.php b/core/lib/Drupal/Core/Cache/Context/ThemeCacheContext.php similarity index 90% rename from core/lib/Drupal/Core/Cache/ThemeCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/ThemeCacheContext.php index ad0249acc6e2fdd1190a6f4c91b57eeb64bd81a9..5f478ec7049bd6741acd0b2966308ddc4e05f890 100644 --- a/core/lib/Drupal/Core/Cache/ThemeCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/ThemeCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\LanguageCacheContext. + * Contains \Drupal\Core\Cache\Context\LanguageCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Theme\ThemeManagerInterface; diff --git a/core/lib/Drupal/Core/Cache/TimeZoneCacheContext.php b/core/lib/Drupal/Core/Cache/Context/TimeZoneCacheContext.php similarity index 85% rename from core/lib/Drupal/Core/Cache/TimeZoneCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/TimeZoneCacheContext.php index ae0621c48b5b33ac2dfcb8d42cb0bb8d7ab1e8e1..7e5b7c5c94d9734cdaa2423bfe50adf15fa458e0 100644 --- a/core/lib/Drupal/Core/Cache/TimeZoneCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/TimeZoneCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\TimeZoneCacheContext. + * Contains \Drupal\Core\Cache\Context\TimeZoneCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; /** * Defines the TimeZoneCacheContext service, for "per time zone" caching. diff --git a/core/lib/Drupal/Core/Cache/UrlCacheContext.php b/core/lib/Drupal/Core/Cache/Context/UrlCacheContext.php similarity index 80% rename from core/lib/Drupal/Core/Cache/UrlCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/UrlCacheContext.php index 138109317d3890d95073ec030656d356b979e280..1ea0bf03ebdf9c0783519dfe41c248eb280eac3a 100644 --- a/core/lib/Drupal/Core/Cache/UrlCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/UrlCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\UrlCacheContext. + * Contains \Drupal\Core\Cache\Context\UrlCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; /** * Defines the UrlCacheContext service, for "per page" caching. diff --git a/core/lib/Drupal/Core/Cache/UserCacheContext.php b/core/lib/Drupal/Core/Cache/Context/UserCacheContext.php similarity index 87% rename from core/lib/Drupal/Core/Cache/UserCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/UserCacheContext.php index d5e282553979221d5b0fd6951950f69df64ce80b..80ad5191e60febce0499c08b6ddb1a95ab189eb1 100644 --- a/core/lib/Drupal/Core/Cache/UserCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/UserCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\UserCacheContext. + * Contains \Drupal\Core\Cache\Context\UserCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; use Drupal\Core\Session\AccountInterface; diff --git a/core/lib/Drupal/Core/Cache/UserRolesCacheContext.php b/core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php similarity index 85% rename from core/lib/Drupal/Core/Cache/UserRolesCacheContext.php rename to core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php index cf7b4507b0f21521a1f590738cd9b60fc1ae9143..375d80bb0d9d43c5cf946e01c9a1926c8b829eb1 100644 --- a/core/lib/Drupal/Core/Cache/UserRolesCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Cache\UserRolesCacheContext. + * Contains \Drupal\Core\Cache\Context\UserRolesCacheContext. */ -namespace Drupal\Core\Cache; +namespace Drupal\Core\Cache\Context; /** * Defines the UserRolesCacheContext service, for "per role" caching. diff --git a/core/lib/Drupal/Core/CoreServiceProvider.php b/core/lib/Drupal/Core/CoreServiceProvider.php index 75d8ec582611074a173ac3daba0d49c1121cb5b8..64a9aee1bc6b390900293f9af60047159ca1815f 100644 --- a/core/lib/Drupal/Core/CoreServiceProvider.php +++ b/core/lib/Drupal/Core/CoreServiceProvider.php @@ -7,7 +7,7 @@ namespace Drupal\Core; -use Drupal\Core\Cache\CacheContextsPass; +use Drupal\Core\Cache\Context\CacheContextsPass; use Drupal\Core\Cache\ListCacheBinsPass; use Drupal\Core\DependencyInjection\Compiler\BackendCompilerPass; use Drupal\Core\DependencyInjection\Compiler\RegisterLazyRouteEnhancers; diff --git a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php index bee69a151c4a1d38f5801bd2c7c5ac81371475ad..944653a389a7dd2ecfd2409c9f517058d4493ed3 100644 --- a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php @@ -9,7 +9,7 @@ use Drupal\Component\Datetime\DateTimePlus; use Drupal\Core\Cache\CacheableResponseInterface; -use Drupal\Core\Cache\CacheContextsManager; +use Drupal\Core\Cache\Context\CacheContextsManager; use Drupal\Core\Config\Config; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Language\LanguageManagerInterface; @@ -61,7 +61,7 @@ class FinishResponseSubscriber implements EventSubscriberInterface { /** * The cache contexts manager service. * - * @var \Drupal\Core\Cache\CacheContextsManager + * @var \Drupal\Core\Cache\Context\CacheContextsManager */ protected $cacheContexts; @@ -76,7 +76,7 @@ class FinishResponseSubscriber implements EventSubscriberInterface { * A policy rule determining the cacheability of a request. * @param \Drupal\Core\PageCache\ResponsePolicyInterface $response_policy * A policy rule determining the cacheability of a response. - * @param \Drupal\Core\Cache\CacheContextsManager $cache_contexts_manager + * @param \Drupal\Core\Cache\Context\CacheContextsManager $cache_contexts_manager * The cache contexts manager service. */ public function __construct(LanguageManagerInterface $language_manager, ConfigFactoryInterface $config_factory, RequestPolicyInterface $request_policy, ResponsePolicyInterface $response_policy, CacheContextsManager $cache_contexts_manager) { diff --git a/core/lib/Drupal/Core/Render/RenderCache.php b/core/lib/Drupal/Core/Render/RenderCache.php index cba983d434f7144f0e2758aa93045f5bcd8e76f2..776bfd49ad554ac92deaa8048d469e6a71bb190c 100644 --- a/core/lib/Drupal/Core/Render/RenderCache.php +++ b/core/lib/Drupal/Core/Render/RenderCache.php @@ -8,7 +8,7 @@ namespace Drupal\Core\Render; use Drupal\Core\Cache\Cache; -use Drupal\Core\Cache\CacheContextsManager; +use Drupal\Core\Cache\Context\CacheContextsManager; use Drupal\Core\Cache\CacheFactoryInterface; use Symfony\Component\HttpFoundation\RequestStack; @@ -34,7 +34,7 @@ class RenderCache implements RenderCacheInterface { /** * The cache contexts manager. * - * @var \Drupal\Core\Cache\CacheContextsManager + * @var \Drupal\Core\Cache\Context\CacheContextsManager */ protected $cacheContextsManager; @@ -45,7 +45,7 @@ class RenderCache implements RenderCacheInterface { * The request stack. * @param \Drupal\Core\Cache\CacheFactoryInterface $cache_factory * The cache factory. - * @param \Drupal\Core\Cache\CacheContextsManager $cache_contexts_manager + * @param \Drupal\Core\Cache\Context\CacheContextsManager $cache_contexts_manager * The cache contexts manager. */ public function __construct(RequestStack $request_stack, CacheFactoryInterface $cache_factory, CacheContextsManager $cache_contexts_manager) { diff --git a/core/modules/block/src/Tests/BlockViewBuilderTest.php b/core/modules/block/src/Tests/BlockViewBuilderTest.php index 02fec0f616225a441e0ef2358197e6abad3ef8fc..7a7aa64d7f415d7eaa7f69f0129c428bef3ecb0e 100644 --- a/core/modules/block/src/Tests/BlockViewBuilderTest.php +++ b/core/modules/block/src/Tests/BlockViewBuilderTest.php @@ -9,7 +9,7 @@ use Drupal\Component\Utility\Html; use Drupal\Core\Cache\Cache; -use Drupal\Core\Cache\UrlCacheContext; +use Drupal\Core\Cache\Context\UrlCacheContext; use Drupal\simpletest\KernelTestBase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; diff --git a/core/modules/book/src/Cache/BookNavigationCacheContext.php b/core/modules/book/src/Cache/BookNavigationCacheContext.php index 531611f0ceb4c1b6603d607eda3ee04b559c4443..15ce15ad85a1bb737f22a125c8d090835dc7dab8 100644 --- a/core/modules/book/src/Cache/BookNavigationCacheContext.php +++ b/core/modules/book/src/Cache/BookNavigationCacheContext.php @@ -7,7 +7,7 @@ namespace Drupal\book\Cache; -use Drupal\Core\Cache\CacheContextInterface; +use Drupal\Core\Cache\Context\CacheContextInterface; use Symfony\Component\DependencyInjection\ContainerAware; use Symfony\Component\HttpFoundation\RequestStack; diff --git a/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php b/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php index df7554124c26b4cf71bea830875a6d5f4e363b88..76d72b5521472d4d555b79f67e4a42d5f6d04be9 100644 --- a/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php +++ b/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php @@ -57,7 +57,7 @@ protected function setUp() { $this->user = $this->getMockBuilder('Drupal\Core\Session\AccountInterface') ->getMock(); - $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\CacheContextsManager') + $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager') ->disableOriginalConstructor() ->getMock(); $container = new ContainerBuilder(); diff --git a/core/modules/node/src/Cache/NodeAccessGrantsCacheContext.php b/core/modules/node/src/Cache/NodeAccessGrantsCacheContext.php index e892212174763707ca457860cd03cd817439c9bc..13ce366a0c9a6bf4519fbecee38e6aa1a4fb1f1c 100644 --- a/core/modules/node/src/Cache/NodeAccessGrantsCacheContext.php +++ b/core/modules/node/src/Cache/NodeAccessGrantsCacheContext.php @@ -7,8 +7,8 @@ namespace Drupal\node\Cache; -use Drupal\Core\Cache\CalculatedCacheContextInterface; -use Drupal\Core\Cache\UserCacheContext; +use Drupal\Core\Cache\Context\CalculatedCacheContextInterface; +use Drupal\Core\Cache\Context\UserCacheContext; /** * Defines the node access view cache context service. diff --git a/core/modules/system/tests/modules/entity_test/src/Cache/EntityTestViewGrantsCacheContext.php b/core/modules/system/tests/modules/entity_test/src/Cache/EntityTestViewGrantsCacheContext.php index 53649f5f6c6b254befe5bb1a5ce4b18efbc0c164..1bc28f11c89ab4021f93a95aaffd2803e1427bb6 100644 --- a/core/modules/system/tests/modules/entity_test/src/Cache/EntityTestViewGrantsCacheContext.php +++ b/core/modules/system/tests/modules/entity_test/src/Cache/EntityTestViewGrantsCacheContext.php @@ -7,7 +7,7 @@ namespace Drupal\entity_test\Cache; -use Drupal\Core\Cache\CacheContextInterface; +use Drupal\Core\Cache\Context\CacheContextInterface; /** * Defines the entity_test view grants cache context service. diff --git a/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php b/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php index d699a8e4e1205694a3d6b4a9be00906780005d76..5e7f2a2faf66e7b3c08e8e858492f7f49a0a29f7 100644 --- a/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php +++ b/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php @@ -44,7 +44,7 @@ protected function setUp() { $this->getMock('\Drupal\Core\Controller\ControllerResolverInterface') ); - $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\CacheContextsManager') + $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager') ->disableOriginalConstructor() ->getMock(); $container = new ContainerBuilder(); diff --git a/core/modules/views/tests/modules/views_test_data/src/Cache/ViewsTestCacheContext.php b/core/modules/views/tests/modules/views_test_data/src/Cache/ViewsTestCacheContext.php index abc456bd46e4ac39e1662a391eb15ef2c894b194..b66ba3830a536a3558f4047194ac0b2aa44ef255 100644 --- a/core/modules/views/tests/modules/views_test_data/src/Cache/ViewsTestCacheContext.php +++ b/core/modules/views/tests/modules/views_test_data/src/Cache/ViewsTestCacheContext.php @@ -7,7 +7,7 @@ namespace Drupal\views_test_data\Cache; -use Drupal\Core\Cache\CacheContextInterface; +use Drupal\Core\Cache\Context\CacheContextInterface; /** * Test cache context which uses a dynamic context coming from state. diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php index ccbb7d6b7f6181498b94a5b8cc8392f04d374762..f2dbd3e284223d2fc66d0918f1afe14131a0b97a 100644 --- a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php @@ -32,7 +32,7 @@ class CacheableMetadataTest extends UnitTestCase { * @see \Drupal\Tests\Core\Cache\CacheContextsTest */ public function testMerge(CacheableMetadata $a, CacheableMetadata $b, CacheableMetadata $expected) { - $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\CacheContextsManager') + $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager') ->disableOriginalConstructor() ->getMock(); $container = new ContainerBuilder(); diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheContextsManagerTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php similarity index 96% rename from core/tests/Drupal/Tests/Core/Cache/CacheContextsManagerTest.php rename to core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php index 859aee65693efcdd6faa20019b5a2c9cd8b0d544..b4f5a2dfbcd373092401e8ad4cc1dd1431a2bf7c 100644 --- a/core/tests/Drupal/Tests/Core/Cache/CacheContextsManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php @@ -5,17 +5,17 @@ * Contains \Drupal\Tests\Core\Cache\CacheContextsTest. */ -namespace Drupal\Tests\Core\Cache; +namespace Drupal\Tests\Core\Cache\Context; -use Drupal\Core\Cache\CacheContextsManager; -use Drupal\Core\Cache\CacheContextInterface; -use Drupal\Core\Cache\CalculatedCacheContextInterface; +use Drupal\Core\Cache\Context\CacheContextsManager; +use Drupal\Core\Cache\Context\CacheContextInterface; +use Drupal\Core\Cache\Context\CalculatedCacheContextInterface; use Drupal\Core\DependencyInjection\ContainerBuilder; use Drupal\Tests\UnitTestCase; use Symfony\Component\DependencyInjection\Container; /** - * @coversDefaultClass \Drupal\Core\Cache\CacheContextsManager + * @coversDefaultClass \Drupal\Core\Cache\Context\CacheContextsManager * @group Cache */ class CacheContextsManagerTest extends UnitTestCase { diff --git a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php index 51ff5062e8daf3504294a88ee168b8384b3db105..644df8aabf98f5be15b096cd6047a6b7e9d31dab 100644 --- a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php +++ b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php @@ -53,7 +53,7 @@ public function testMerge(BubbleableMetadata $a, CacheableMetadata $b, Bubbleabl ->getMock(); } - $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\CacheContextsManager') + $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager') ->disableOriginalConstructor() ->getMock(); $container = new ContainerBuilder(); diff --git a/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php b/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php index 1ccdd2a354458b6d799d82c18ece0d19cfe3c87c..7388c6123b08e91b6ab9c0f64a7f489d00bf9aef 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php @@ -48,7 +48,7 @@ class RendererTestBase extends UnitTestCase { protected $cacheFactory; /** - * @var \Drupal\Core\Cache\CacheContextsManager|\PHPUnit_Framework_MockObject_MockObject + * @var \Drupal\Core\Cache\Context\CacheContextsManager|\PHPUnit_Framework_MockObject_MockObject */ protected $cacheContexts; @@ -101,7 +101,7 @@ protected function setUp() { $this->elementInfo = $this->getMock('Drupal\Core\Render\ElementInfoManagerInterface'); $this->requestStack = new RequestStack(); $this->cacheFactory = $this->getMock('Drupal\Core\Cache\CacheFactoryInterface'); - $this->cacheContextsManager = $this->getMockBuilder('Drupal\Core\Cache\CacheContextsManager') + $this->cacheContextsManager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager') ->disableOriginalConstructor() ->getMock(); $this->cacheContextsManager->expects($this->any()) diff --git a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php index 677d21461e431c7974ea478094e8fe642d9a72ec..f4e90de34db18ce4ae7113abd8568b2f8409ebc1 100644 --- a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php @@ -59,7 +59,7 @@ class UrlGeneratorTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp() { - $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\CacheContextsManager') + $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager') ->disableOriginalConstructor() ->getMock(); $container = new ContainerBuilder();