diff options
-rw-r--r-- | core/MAINTAINERS.txt | 3 | ||||
-rw-r--r-- | core/lib/Drupal/Core/Theme/Registry.php | 14 | ||||
-rw-r--r-- | core/phpstan.neon.dist | 2 | ||||
-rw-r--r-- | core/profiles/demo_umami/tests/src/FunctionalJavascript/AssetAggregationAcrossPagesTest.php | 2 | ||||
-rw-r--r-- | core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php | 4 |
5 files changed, 13 insertions, 12 deletions
diff --git a/core/MAINTAINERS.txt b/core/MAINTAINERS.txt index 0ef1dde096fe..075ea1b1e4ae 100644 --- a/core/MAINTAINERS.txt +++ b/core/MAINTAINERS.txt @@ -338,7 +338,7 @@ Page Cache - Fabian Franz 'Fabianx' https://www.drupal.org/u/fabianx Path -- Nathaniel Catchpole 'catch' https://www.drupal.org/u/catch +- ? Path Alias - Nathaniel Catchpole 'catch' https://www.drupal.org/u/catch @@ -402,7 +402,6 @@ System (module) Taxonomy - Jess Myrbo 'xjm' https://www.drupal.org/u/xjm -- Nathaniel Catchpole 'catch' https://www.drupal.org/u/catch Telephone - Stephen Mustgrave 'smustgrave' https://www.drupal.org/u/smustgrave diff --git a/core/lib/Drupal/Core/Theme/Registry.php b/core/lib/Drupal/Core/Theme/Registry.php index 3568c8b37d7d..0ad83cff2814 100644 --- a/core/lib/Drupal/Core/Theme/Registry.php +++ b/core/lib/Drupal/Core/Theme/Registry.php @@ -424,9 +424,9 @@ class Registry implements DestructableInterface { } else { $cache = [ - static::PREPROCESS_INVOKES => [], + self::PREPROCESS_INVOKES => [], ]; - $cache[static::GLOBAL_PREPROCESS] = $this->collectModulePreprocess($cache, 'preprocess'); + $cache[self::GLOBAL_PREPROCESS] = $this->collectModulePreprocess($cache, 'preprocess'); if (defined('MAINTENANCE_MODE') && constant('MAINTENANCE_MODE') === 'install') { // System is still set here so preprocess can be updated in install. $this->processExtension($cache, 'system', 'install', 'system', $this->moduleList->getPath('system')); @@ -672,7 +672,7 @@ class Registry implements DestructableInterface { // template. if ($type == 'theme' || $type == 'base_theme') { foreach ($cache as $hook => $info) { - if ($hook == static::PREPROCESS_INVOKES) { + if ($hook == self::PREPROCESS_INVOKES) { continue; } // Check only if not registered by the theme or engine. @@ -824,7 +824,7 @@ class Registry implements DestructableInterface { // Add missing preprocessor to existing hook. $cache[$hook]['preprocess functions'][] = $preprocessor; if (isset($invokes[$preprocessor])) { - $cache[static::PREPROCESS_INVOKES][$preprocessor] = $invokes[$preprocessor]; + $cache[self::PREPROCESS_INVOKES][$preprocessor] = $invokes[$preprocessor]; } } elseif (!isset($cache[$hook]) && strpos($hook, '__')) { @@ -834,7 +834,7 @@ class Registry implements DestructableInterface { $this->completeSuggestion($hook, $cache); $cache[$hook]['preprocess functions'][] = $preprocessor; if (isset($invokes[$preprocessor])) { - $cache[static::PREPROCESS_INVOKES][$preprocessor] = $invokes[$preprocessor]; + $cache[self::PREPROCESS_INVOKES][$preprocessor] = $invokes[$preprocessor]; } } } @@ -843,7 +843,7 @@ class Registry implements DestructableInterface { // hooks. This ensures that derivative hooks have a complete set of variable // preprocess functions. foreach ($cache as $hook => $info) { - if ($hook == static::PREPROCESS_INVOKES) { + if ($hook == self::PREPROCESS_INVOKES) { continue; } // The 'base hook' is only applied to derivative hooks already registered @@ -959,7 +959,7 @@ class Registry implements DestructableInterface { // implementations are not executed. $this->moduleHandler->invokeAllWith($hook, function (callable $callable, string $module) use ($hook, &$cache, &$preprocess_functions) { $function = $module . '_' . $hook; - $cache[static::PREPROCESS_INVOKES][$function] = ['module' => $module, 'hook' => $hook]; + $cache[self::PREPROCESS_INVOKES][$function] = ['module' => $module, 'hook' => $hook]; $preprocess_functions[] = $function; }); return $preprocess_functions; diff --git a/core/phpstan.neon.dist b/core/phpstan.neon.dist index 40e1c821d029..e7a42b88cdee 100644 --- a/core/phpstan.neon.dist +++ b/core/phpstan.neon.dist @@ -58,3 +58,5 @@ rules: - Drupal\PHPStan\Rules\ComponentTestDoesNotExtendCoreTest - PHPStan\Rules\Functions\MissingFunctionReturnTypehintRule - PHPStan\Rules\Methods\MissingMethodReturnTypehintRule + # The rule below can be removed when we increase level to 2. + - PHPStan\Rules\Classes\AccessPrivateConstantThroughStaticRule diff --git a/core/profiles/demo_umami/tests/src/FunctionalJavascript/AssetAggregationAcrossPagesTest.php b/core/profiles/demo_umami/tests/src/FunctionalJavascript/AssetAggregationAcrossPagesTest.php index bab70e05e2ac..3580284a4c76 100644 --- a/core/profiles/demo_umami/tests/src/FunctionalJavascript/AssetAggregationAcrossPagesTest.php +++ b/core/profiles/demo_umami/tests/src/FunctionalJavascript/AssetAggregationAcrossPagesTest.php @@ -69,7 +69,7 @@ class AssetAggregationAcrossPagesTest extends PerformanceTestBase { }, 'umamiFrontAndRecipePagesEditor'); $expected = [ 'ScriptCount' => 5, - 'ScriptBytes' => 335637, + 'ScriptBytes' => 335003, 'StylesheetCount' => 5, 'StylesheetBytes' => 205100, ]; diff --git a/core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php b/core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php index 7ecc4518d714..569a6e3fd18e 100644 --- a/core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php +++ b/core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php @@ -27,7 +27,7 @@ class RowCountExceptionTest extends UnitTestCase { */ public static function providerTestExceptionMessage() { return [ - [static::DEFAULT_EXCEPTION_MESSAGE, ''], + [self::DEFAULT_EXCEPTION_MESSAGE, ''], ['test', 'test'], ]; } @@ -47,7 +47,7 @@ class RowCountExceptionTest extends UnitTestCase { */ public function testExceptionMessageNull(): void { $e = new RowCountException(NULL); - $this->assertSame(static::DEFAULT_EXCEPTION_MESSAGE, $e->getMessage()); + $this->assertSame(self::DEFAULT_EXCEPTION_MESSAGE, $e->getMessage()); } } |