summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/system
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/system')
-rw-r--r--core/modules/system/css/components/system-status-report-counters.css2
-rw-r--r--core/modules/system/src/Hook/SystemHooks.php4
-rw-r--r--core/modules/system/system.module4
-rw-r--r--core/modules/system/tests/modules/delay_cache_tags_invalidation/src/Hook/DelayCacheTagsInvalidationHooks.php12
-rw-r--r--core/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php114
-rw-r--r--core/modules/system/tests/modules/module_test/module_test.file.inc14
-rw-r--r--core/modules/system/tests/modules/sdc_test/components/my-banner/my-banner.component.yml4
-rw-r--r--core/modules/system/tests/modules/sdc_test/components/my-button/my-button.component.yml4
-rw-r--r--core/modules/system/tests/modules/sdc_test/components/my-cta/my-cta.component.yml13
-rw-r--r--core/modules/system/tests/modules/sdc_test_replacements/components/my-button/my-button.component.yml4
-rw-r--r--core/modules/system/tests/modules/theme_suggestions_test/src/Hook/ThemeSuggestionsTestHooks.php4
-rw-r--r--core/modules/system/tests/modules/theme_test/src/EventSubscriber/ThemeTestSubscriber.php3
-rw-r--r--core/modules/system/tests/modules/theme_test/src/Hook/ThemeTestHooks.php4
-rw-r--r--core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php56
-rw-r--r--core/modules/system/tests/src/Functional/Menu/LinksetControllerMultiLingualTest.php6
-rw-r--r--core/modules/system/tests/src/Functional/Module/VersionTest.php1
-rw-r--r--core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php2
-rw-r--r--core/modules/system/tests/src/Kernel/System/CronQueueTest.php3
-rw-r--r--core/modules/system/tests/themes/test_theme/test_theme.theme4
19 files changed, 149 insertions, 109 deletions
diff --git a/core/modules/system/css/components/system-status-report-counters.css b/core/modules/system/css/components/system-status-report-counters.css
index 7040c257a0f2..54ffabe5fc1c 100644
--- a/core/modules/system/css/components/system-status-report-counters.css
+++ b/core/modules/system/css/components/system-status-report-counters.css
@@ -9,7 +9,7 @@
padding: 0.5em 0;
text-align: center;
white-space: nowrap;
- background-color: rgba(0, 0, 0, 0.063);
+ background-color: rgb(0, 0, 0, 0.063);
}
@media screen and (min-width: 60em) {
diff --git a/core/modules/system/src/Hook/SystemHooks.php b/core/modules/system/src/Hook/SystemHooks.php
index 86d181646239..800a1d718f37 100644
--- a/core/modules/system/src/Hook/SystemHooks.php
+++ b/core/modules/system/src/Hook/SystemHooks.php
@@ -159,10 +159,6 @@ class SystemHooks {
}
/**
- * @} End of "defgroup authorize".
- */
-
- /**
* Implements hook_updater_info().
*/
#[Hook('updater_info')]
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index dbda1e1b6b4b..0fbcf9b6c1fd 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -307,6 +307,10 @@ function system_authorized_batch_process() {
}
/**
+ * @} End of "defgroup authorize".
+ */
+
+/**
* Implements hook_preprocess_HOOK() for block templates.
*/
function system_preprocess_block(&$variables): void {
diff --git a/core/modules/system/tests/modules/delay_cache_tags_invalidation/src/Hook/DelayCacheTagsInvalidationHooks.php b/core/modules/system/tests/modules/delay_cache_tags_invalidation/src/Hook/DelayCacheTagsInvalidationHooks.php
index c543a1d3e533..f444b69a427b 100644
--- a/core/modules/system/tests/modules/delay_cache_tags_invalidation/src/Hook/DelayCacheTagsInvalidationHooks.php
+++ b/core/modules/system/tests/modules/delay_cache_tags_invalidation/src/Hook/DelayCacheTagsInvalidationHooks.php
@@ -25,11 +25,11 @@ class DelayCacheTagsInvalidationHooks {
}
// Read the pre-transaction cache writes.
// @see \Drupal\KernelTests\Core\Cache\EndOfTransactionQueriesTest::testEntitySave()
- \Drupal::state()->set('delay_cache_tags_invalidation_entity_test_insert' . '__pre-transaction_foobar', \Drupal::cache()->get('test_cache_pre-transaction_foobar'));
- \Drupal::state()->set('delay_cache_tags_invalidation_entity_test_insert' . '__pre-transaction_entity_test_list', \Drupal::cache()->get('test_cache_pre-transaction_entity_test_list'));
+ \Drupal::state()->set('delay_cache_tags_invalidation_entity_test_insert__pre-transaction_foobar', \Drupal::cache()->get('test_cache_pre-transaction_foobar'));
+ \Drupal::state()->set('delay_cache_tags_invalidation_entity_test_insert__pre-transaction_entity_test_list', \Drupal::cache()->get('test_cache_pre-transaction_entity_test_list'));
// Write during the transaction.
- \Drupal::cache()->set('delay_cache_tags_invalidation_entity_test_insert' . '__during_transaction_foobar', 'something', Cache::PERMANENT, ['foobar']);
- \Drupal::cache()->set('delay_cache_tags_invalidation_entity_test_insert' . '__during_transaction_entity_test_list', 'something', Cache::PERMANENT, ['entity_test_list']);
+ \Drupal::cache()->set('delay_cache_tags_invalidation_entity_test_insert__during_transaction_foobar', 'something', Cache::PERMANENT, ['foobar']);
+ \Drupal::cache()->set('delay_cache_tags_invalidation_entity_test_insert__during_transaction_entity_test_list', 'something', Cache::PERMANENT, ['entity_test_list']);
// Trigger a nested entity save and hence a nested transaction.
User::create(['name' => 'john doe', 'status' => 1])->save();
}
@@ -42,8 +42,8 @@ class DelayCacheTagsInvalidationHooks {
if ($entity->getAccountName() === 'john doe') {
// Read the in-transaction cache writes.
// @see delay_cache_tags_invalidation_entity_test_insert()
- \Drupal::state()->set('delay_cache_tags_invalidation_user_insert' . '__during_transaction_foobar', \Drupal::cache()->get('delay_cache_tags_invalidation_entity_test_insert__during_transaction_foobar'));
- \Drupal::state()->set('delay_cache_tags_invalidation_user_insert' . '__during_transaction_entity_test_list', \Drupal::cache()->get('delay_cache_tags_invalidation_entity_test_insert__during_transaction_entity_test_list'));
+ \Drupal::state()->set('delay_cache_tags_invalidation_user_insert__during_transaction_foobar', \Drupal::cache()->get('delay_cache_tags_invalidation_entity_test_insert__during_transaction_foobar'));
+ \Drupal::state()->set('delay_cache_tags_invalidation_user_insert__during_transaction_entity_test_list', \Drupal::cache()->get('delay_cache_tags_invalidation_entity_test_insert__during_transaction_entity_test_list'));
}
}
diff --git a/core/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php b/core/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php
index c552a268952a..8e16b55b4c69 100644
--- a/core/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php
+++ b/core/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php
@@ -17,7 +17,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('entity_create')]
public function entityCreate(EntityInterface $entity): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_create' . ' called for type ' . $entity->getEntityTypeId();
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_create called for type ' . $entity->getEntityTypeId();
}
/**
@@ -25,7 +25,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('block_create')]
public function blockCreate(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_create' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_create called';
}
/**
@@ -33,7 +33,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('comment_create')]
public function commentCreate(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_create' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_create called';
}
/**
@@ -41,7 +41,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('file_create')]
public function fileCreate(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_create' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_create called';
}
/**
@@ -49,7 +49,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('node_create')]
public function nodeCreate(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_create' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_create called';
}
/**
@@ -57,7 +57,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('taxonomy_term_create')]
public function taxonomyTermCreate(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_create' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_create called';
}
/**
@@ -65,7 +65,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('taxonomy_vocabulary_create')]
public function taxonomyVocabularyCreate(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_create' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_create called';
}
/**
@@ -73,7 +73,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('user_create')]
public function userCreate(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_create' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_create called';
}
/**
@@ -81,7 +81,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('entity_presave')]
public function entityPresave(EntityInterface $entity): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_presave' . ' called for type ' . $entity->getEntityTypeId();
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_presave called for type ' . $entity->getEntityTypeId();
}
/**
@@ -89,7 +89,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('block_presave')]
public function blockPresave(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_presave' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_presave called';
}
/**
@@ -97,7 +97,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('comment_presave')]
public function commentPresave(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_presave' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_presave called';
}
/**
@@ -105,7 +105,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('file_presave')]
public function filePresave(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_presave' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_presave called';
}
/**
@@ -113,7 +113,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('node_presave')]
public function nodePresave(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_presave' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_presave called';
}
/**
@@ -121,7 +121,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('taxonomy_term_presave')]
public function taxonomyTermPresave(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_presave' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_presave called';
}
/**
@@ -129,7 +129,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('taxonomy_vocabulary_presave')]
public function taxonomyVocabularyPresave(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_presave' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_presave called';
}
/**
@@ -137,7 +137,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('user_presave')]
public function userPresave(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_presave' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_presave called';
}
/**
@@ -145,7 +145,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('entity_insert')]
public function entityInsert(EntityInterface $entity): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_insert' . ' called for type ' . $entity->getEntityTypeId();
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_insert called for type ' . $entity->getEntityTypeId();
}
/**
@@ -153,7 +153,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('block_insert')]
public function blockInsert(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_insert' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_insert called';
}
/**
@@ -161,7 +161,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('comment_insert')]
public function commentInsert(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_insert' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_insert called';
}
/**
@@ -169,7 +169,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('file_insert')]
public function fileInsert(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_insert' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_insert called';
}
/**
@@ -177,7 +177,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('node_insert')]
public function nodeInsert(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_insert' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_insert called';
}
/**
@@ -185,7 +185,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('taxonomy_term_insert')]
public function taxonomyTermInsert(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_insert' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_insert called';
}
/**
@@ -193,7 +193,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('taxonomy_vocabulary_insert')]
public function taxonomyVocabularyInsert(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_insert' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_insert called';
}
/**
@@ -201,7 +201,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('user_insert')]
public function userInsert(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_insert' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_insert called';
}
/**
@@ -209,7 +209,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('entity_preload')]
public function entityPreload(array $entities, $type): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_preload' . ' called for type ' . $type;
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_preload called for type ' . $type;
}
/**
@@ -217,7 +217,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('entity_load')]
public function entityLoad(array $entities, $type): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_load' . ' called for type ' . $type;
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_load called for type ' . $type;
}
/**
@@ -225,7 +225,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('block_load')]
public function blockLoad(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_load' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_load called';
}
/**
@@ -233,7 +233,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('comment_load')]
public function commentLoad(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_load' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_load called';
}
/**
@@ -241,7 +241,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('file_load')]
public function fileLoad(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_load' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_load called';
}
/**
@@ -249,7 +249,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('node_load')]
public function nodeLoad(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_load' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_load called';
}
/**
@@ -257,7 +257,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('taxonomy_term_load')]
public function taxonomyTermLoad(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_load' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_load called';
}
/**
@@ -265,7 +265,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('taxonomy_vocabulary_load')]
public function taxonomyVocabularyLoad(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_load' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_load called';
}
/**
@@ -273,7 +273,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('user_load')]
public function userLoad(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_load' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_load called';
}
/**
@@ -281,7 +281,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('entity_update')]
public function entityUpdate(EntityInterface $entity): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_update' . ' called for type ' . $entity->getEntityTypeId();
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_update called for type ' . $entity->getEntityTypeId();
}
/**
@@ -289,7 +289,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('block_update')]
public function blockUpdate(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_update' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_update called';
}
/**
@@ -297,7 +297,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('comment_update')]
public function commentUpdate(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_update' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_update called';
}
/**
@@ -305,7 +305,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('file_update')]
public function fileUpdate(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_update' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_update called';
}
/**
@@ -313,7 +313,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('node_update')]
public function nodeUpdate(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_update' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_update called';
}
/**
@@ -321,7 +321,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('taxonomy_term_update')]
public function taxonomyTermUpdate(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_update' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_update called';
}
/**
@@ -329,7 +329,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('taxonomy_vocabulary_update')]
public function taxonomyVocabularyUpdate(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_update' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_update called';
}
/**
@@ -337,7 +337,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('user_update')]
public function userUpdate(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_update' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_update called';
}
/**
@@ -345,7 +345,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('entity_predelete')]
public function entityPredelete(EntityInterface $entity): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_predelete' . ' called for type ' . $entity->getEntityTypeId();
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_predelete called for type ' . $entity->getEntityTypeId();
}
/**
@@ -353,7 +353,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('block_predelete')]
public function blockPredelete(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_predelete' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_predelete called';
}
/**
@@ -361,7 +361,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('comment_predelete')]
public function commentPredelete(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_predelete' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_predelete called';
}
/**
@@ -369,7 +369,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('file_predelete')]
public function filePredelete(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_predelete' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_predelete called';
}
/**
@@ -377,7 +377,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('node_predelete')]
public function nodePredelete(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_predelete' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_predelete called';
}
/**
@@ -385,7 +385,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('taxonomy_term_predelete')]
public function taxonomyTermPredelete(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_predelete' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_predelete called';
}
/**
@@ -393,7 +393,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('taxonomy_vocabulary_predelete')]
public function taxonomyVocabularyPredelete(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_predelete' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_predelete called';
}
/**
@@ -401,7 +401,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('user_predelete')]
public function userPredelete(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_predelete' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_predelete called';
}
/**
@@ -409,7 +409,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('entity_delete')]
public function entityDelete(EntityInterface $entity): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_delete' . ' called for type ' . $entity->getEntityTypeId();
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_delete called for type ' . $entity->getEntityTypeId();
}
/**
@@ -417,7 +417,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('block_delete')]
public function blockDelete(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_delete' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_delete called';
}
/**
@@ -425,7 +425,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('comment_delete')]
public function commentDelete(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_delete' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_delete called';
}
/**
@@ -433,7 +433,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('file_delete')]
public function fileDelete(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_delete' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_delete called';
}
/**
@@ -441,7 +441,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('node_delete')]
public function nodeDelete(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_delete' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_delete called';
}
/**
@@ -449,7 +449,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('taxonomy_term_delete')]
public function taxonomyTermDelete(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_delete' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_delete called';
}
/**
@@ -457,7 +457,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('taxonomy_vocabulary_delete')]
public function taxonomyVocabularyDelete(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_delete' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_delete called';
}
/**
@@ -465,7 +465,7 @@ class EntityCrudHookTestHooks {
*/
#[Hook('user_delete')]
public function userDelete(): void {
- $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_delete' . ' called';
+ $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_delete called';
}
}
diff --git a/core/modules/system/tests/modules/module_test/module_test.file.inc b/core/modules/system/tests/modules/module_test/module_test.file.inc
index c0cee6f1905e..5ba5f5614ca7 100644
--- a/core/modules/system/tests/modules/module_test/module_test.file.inc
+++ b/core/modules/system/tests/modules/module_test/module_test.file.inc
@@ -16,3 +16,17 @@ declare(strict_types=1);
function module_test_test_hook(): array {
return ['module_test' => 'success!'];
}
+
+/**
+ * Implements hook_test_reset_implementations_hook().
+ */
+function module_test_test_reset_implementations_hook(): string {
+ return __FUNCTION__;
+}
+
+/**
+ * Implements hook_test_reset_implementations_alter().
+ */
+function module_test_test_reset_implementations_alter(array &$data): void {
+ $data[] = __FUNCTION__;
+}
diff --git a/core/modules/system/tests/modules/sdc_test/components/my-banner/my-banner.component.yml b/core/modules/system/tests/modules/sdc_test/components/my-banner/my-banner.component.yml
index 195903e9ee74..0c89a0740a6b 100644
--- a/core/modules/system/tests/modules/sdc_test/components/my-banner/my-banner.component.yml
+++ b/core/modules/system/tests/modules/sdc_test/components/my-banner/my-banner.component.yml
@@ -29,6 +29,10 @@ props:
enum:
- ''
- _blank
+ meta:enum:
+ '': 'Open in same window'
+ _blank: 'Open in a new window'
+ x-translation-context: Banner link target
image:
title: Media Image
description: Background image for the banner.
diff --git a/core/modules/system/tests/modules/sdc_test/components/my-button/my-button.component.yml b/core/modules/system/tests/modules/sdc_test/components/my-button/my-button.component.yml
index 65b3c472096b..d0d4f8c73b46 100644
--- a/core/modules/system/tests/modules/sdc_test/components/my-button/my-button.component.yml
+++ b/core/modules/system/tests/modules/sdc_test/components/my-button/my-button.component.yml
@@ -24,3 +24,7 @@ props:
- power
- like
- external
+ meta:enum:
+ power: 'Power'
+ like: 'Like'
+ external: 'External'
diff --git a/core/modules/system/tests/modules/sdc_test/components/my-cta/my-cta.component.yml b/core/modules/system/tests/modules/sdc_test/components/my-cta/my-cta.component.yml
index 889dfe885205..6d16be49cf74 100644
--- a/core/modules/system/tests/modules/sdc_test/components/my-cta/my-cta.component.yml
+++ b/core/modules/system/tests/modules/sdc_test/components/my-cta/my-cta.component.yml
@@ -17,12 +17,23 @@ props:
type: string
title: URL
format: uri
+ examples:
+ - https://drupal.org
target:
type: string
title: Target
+ description: The target for opening the link.
enum:
- ''
- - _blank
+ - '_blank'
+ meta:enum:
+ '': 'Open in same window'
+ _blank: 'Open in a new window'
+ x-translation-context: CTA link target
+ default: ''
+ examples:
+ - ''
+ - '_blank'
attributes:
type: Drupal\Core\Template\Attribute
name: Attributes
diff --git a/core/modules/system/tests/modules/sdc_test_replacements/components/my-button/my-button.component.yml b/core/modules/system/tests/modules/sdc_test_replacements/components/my-button/my-button.component.yml
index b87f1180111e..053387cf9c4f 100644
--- a/core/modules/system/tests/modules/sdc_test_replacements/components/my-button/my-button.component.yml
+++ b/core/modules/system/tests/modules/sdc_test_replacements/components/my-button/my-button.component.yml
@@ -24,3 +24,7 @@ props:
- power
- like
- external
+ meta:enum:
+ power: 'Power'
+ like: 'Like'
+ external: 'External'
diff --git a/core/modules/system/tests/modules/theme_suggestions_test/src/Hook/ThemeSuggestionsTestHooks.php b/core/modules/system/tests/modules/theme_suggestions_test/src/Hook/ThemeSuggestionsTestHooks.php
index 8f5d5ee18a8f..ff4086a0c2a8 100644
--- a/core/modules/system/tests/modules/theme_suggestions_test/src/Hook/ThemeSuggestionsTestHooks.php
+++ b/core/modules/system/tests/modules/theme_suggestions_test/src/Hook/ThemeSuggestionsTestHooks.php
@@ -16,7 +16,7 @@ class ThemeSuggestionsTestHooks {
*/
#[Hook('theme_suggestions_alter')]
public function themeSuggestionsAlter(array &$suggestions, array &$variables, $hook): void {
- \Drupal::messenger()->addStatus('theme_suggestions_test_theme_suggestions_alter' . '() executed.');
+ \Drupal::messenger()->addStatus('theme_suggestions_test_theme_suggestions_alter() executed.');
if ($hook == 'theme_test_general_suggestions') {
$suggestions[] = $hook . '__module_override';
$variables['module_hook'] = 'theme_suggestions_test_theme_suggestions_alter';
@@ -28,7 +28,7 @@ class ThemeSuggestionsTestHooks {
*/
#[Hook('theme_suggestions_theme_test_suggestions_alter')]
public function themeSuggestionsThemeTestSuggestionsAlter(array &$suggestions, array $variables): void {
- \Drupal::messenger()->addStatus('theme_suggestions_test_theme_suggestions_theme_test_suggestions_alter' . '() executed.');
+ \Drupal::messenger()->addStatus('theme_suggestions_test_theme_suggestions_theme_test_suggestions_alter() executed.');
$suggestions[] = 'theme_test_suggestions__module_override';
}
diff --git a/core/modules/system/tests/modules/theme_test/src/EventSubscriber/ThemeTestSubscriber.php b/core/modules/system/tests/modules/theme_test/src/EventSubscriber/ThemeTestSubscriber.php
index 00b51bc72b57..6c6f67d77eb8 100644
--- a/core/modules/system/tests/modules/theme_test/src/EventSubscriber/ThemeTestSubscriber.php
+++ b/core/modules/system/tests/modules/theme_test/src/EventSubscriber/ThemeTestSubscriber.php
@@ -19,10 +19,11 @@ class ThemeTestSubscriber implements EventSubscriberInterface {
/**
* The used container.
*
+ * @var object
+ *
* @todo This variable is never initialized, so we don't know what it is.
* See https://www.drupal.org/node/2721315
*/
- // phpcs:ignore Drupal.Commenting.VariableComment.Missing, Drupal.Commenting.VariableComment.MissingVar
protected $container;
/**
diff --git a/core/modules/system/tests/modules/theme_test/src/Hook/ThemeTestHooks.php b/core/modules/system/tests/modules/theme_test/src/Hook/ThemeTestHooks.php
index 8e27524449f1..9b3fe6cd66a5 100644
--- a/core/modules/system/tests/modules/theme_test/src/Hook/ThemeTestHooks.php
+++ b/core/modules/system/tests/modules/theme_test/src/Hook/ThemeTestHooks.php
@@ -85,7 +85,7 @@ class ThemeTestHooks {
*/
#[Hook('theme_suggestions_alter')]
public function themeSuggestionsAlter(array &$suggestions, array $variables, $hook): void {
- \Drupal::messenger()->addStatus('theme_test_theme_suggestions_alter' . '() executed for ' . $hook . '.');
+ \Drupal::messenger()->addStatus('theme_test_theme_suggestions_alter() executed for ' . $hook . '.');
}
/**
@@ -93,7 +93,7 @@ class ThemeTestHooks {
*/
#[Hook('theme_suggestions_theme_test_suggestions_alter')]
public function themeSuggestionsThemeTestSuggestionsAlter(array &$suggestions, array $variables): void {
- \Drupal::messenger()->addStatus('theme_test_theme_suggestions_theme_test_suggestions_alter' . '() executed.');
+ \Drupal::messenger()->addStatus('theme_test_theme_suggestions_theme_test_suggestions_alter() executed.');
}
/**
diff --git a/core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php b/core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php
index e130b89bf327..94221d8165fe 100644
--- a/core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php
+++ b/core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php
@@ -24,7 +24,7 @@ trait EntityDefinitionTestTrait {
* (optional) Applies changes only for the specified entity type ID.
* Defaults to NULL.
*/
- protected function applyEntityUpdates($entity_type_id = NULL) {
+ protected function applyEntityUpdates($entity_type_id = NULL): void {
$complete_change_list = \Drupal::entityDefinitionUpdateManager()->getChangeList();
if ($complete_change_list) {
// In case there are changes, explicitly invalidate caches.
@@ -68,7 +68,7 @@ trait EntityDefinitionTestTrait {
* @param string $entity_type_id
* The entity type ID.
*/
- protected function doEntityUpdate($op, $entity_type_id) {
+ protected function doEntityUpdate($op, $entity_type_id): void {
$entity_type = \Drupal::entityTypeManager()->getDefinition($entity_type_id);
$field_storage_definitions = \Drupal::service('entity_field.manager')->getFieldStorageDefinitions($entity_type_id);
switch ($op) {
@@ -96,7 +96,7 @@ trait EntityDefinitionTestTrait {
* @param array|null $original_storage_definition
* The original field storage definition.
*/
- protected function doFieldUpdate($op, $storage_definition = NULL, $original_storage_definition = NULL) {
+ protected function doFieldUpdate($op, $storage_definition = NULL, $original_storage_definition = NULL): void {
switch ($op) {
case EntityDefinitionUpdateManagerInterface::DEFINITION_CREATED:
\Drupal::service('field_storage_definition.listener')->onFieldStorageDefinitionCreate($storage_definition);
@@ -115,7 +115,7 @@ trait EntityDefinitionTestTrait {
/**
* Enables a new entity type definition.
*/
- protected function enableNewEntityType() {
+ protected function enableNewEntityType(): void {
$this->state->set('entity_test_new', TRUE);
$this->applyEntityUpdates('entity_test_new');
}
@@ -123,7 +123,7 @@ trait EntityDefinitionTestTrait {
/**
* Resets the entity type definition.
*/
- protected function resetEntityType() {
+ protected function resetEntityType(): void {
$updated_entity_type = $this->getUpdatedEntityTypeDefinition(FALSE, FALSE);
$updated_field_storage_definitions = $this->getUpdatedFieldStorageDefinitions(FALSE, FALSE);
$this->entityDefinitionUpdateManager->updateFieldableEntityType($updated_entity_type, $updated_field_storage_definitions);
@@ -136,7 +136,7 @@ trait EntityDefinitionTestTrait {
* (optional) Whether the change should be performed by the entity
* definition update manager.
*/
- protected function updateEntityTypeToRevisionable($perform_update = FALSE) {
+ protected function updateEntityTypeToRevisionable($perform_update = FALSE): void {
$translatable = $this->entityDefinitionUpdateManager->getEntityType('entity_test_update')->isTranslatable();
$updated_entity_type = $this->getUpdatedEntityTypeDefinition(TRUE, $translatable);
@@ -154,7 +154,7 @@ trait EntityDefinitionTestTrait {
* (optional) Whether the change should be performed by the entity
* definition update manager.
*/
- protected function updateEntityTypeToNotRevisionable($perform_update = FALSE) {
+ protected function updateEntityTypeToNotRevisionable($perform_update = FALSE): void {
$translatable = $this->entityDefinitionUpdateManager->getEntityType('entity_test_update')->isTranslatable();
$updated_entity_type = $this->getUpdatedEntityTypeDefinition(FALSE, $translatable);
@@ -172,7 +172,7 @@ trait EntityDefinitionTestTrait {
* (optional) Whether the change should be performed by the entity
* definition update manager.
*/
- protected function updateEntityTypeToTranslatable($perform_update = FALSE) {
+ protected function updateEntityTypeToTranslatable($perform_update = FALSE): void {
$revisionable = $this->entityDefinitionUpdateManager->getEntityType('entity_test_update')->isRevisionable();
$updated_entity_type = $this->getUpdatedEntityTypeDefinition($revisionable, TRUE);
@@ -190,7 +190,7 @@ trait EntityDefinitionTestTrait {
* (optional) Whether the change should be performed by the entity
* definition update manager.
*/
- protected function updateEntityTypeToNotTranslatable($perform_update = FALSE) {
+ protected function updateEntityTypeToNotTranslatable($perform_update = FALSE): void {
$revisionable = $this->entityDefinitionUpdateManager->getEntityType('entity_test_update')->isRevisionable();
$updated_entity_type = $this->getUpdatedEntityTypeDefinition($revisionable, FALSE);
@@ -208,7 +208,7 @@ trait EntityDefinitionTestTrait {
* (optional) Whether the change should be performed by the entity
* definition update manager.
*/
- protected function updateEntityTypeToRevisionableAndTranslatable($perform_update = FALSE) {
+ protected function updateEntityTypeToRevisionableAndTranslatable($perform_update = FALSE): void {
$updated_entity_type = $this->getUpdatedEntityTypeDefinition(TRUE, TRUE);
$updated_field_storage_definitions = $this->getUpdatedFieldStorageDefinitions(TRUE, TRUE);
@@ -235,7 +235,7 @@ trait EntityDefinitionTestTrait {
* (optional) If the base field should be translatable or not. Defaults to
* FALSE.
*/
- protected function addBaseField($type = 'string', $entity_type_id = 'entity_test_update', $is_revisionable = FALSE, $set_label = TRUE, $is_translatable = FALSE) {
+ protected function addBaseField($type = 'string', $entity_type_id = 'entity_test_update', $is_revisionable = FALSE, $set_label = TRUE, $is_translatable = FALSE): void {
$definitions['new_base_field'] = BaseFieldDefinition::create($type)
->setName('new_base_field')
->setRevisionable($is_revisionable)
@@ -251,7 +251,7 @@ trait EntityDefinitionTestTrait {
/**
* Adds a long-named base field to the 'entity_test_update' entity type.
*/
- protected function addLongNameBaseField() {
+ protected function addLongNameBaseField(): void {
$key = 'entity_test_update.additional_base_field_definitions';
$definitions = $this->state->get($key, []);
$definitions['new_long_named_entity_reference_base_field'] = BaseFieldDefinition::create('entity_reference')
@@ -268,7 +268,7 @@ trait EntityDefinitionTestTrait {
* @param string $type
* (optional) The field type for the new field. Defaults to 'string'.
*/
- protected function addRevisionableBaseField($type = 'string') {
+ protected function addRevisionableBaseField($type = 'string'): void {
$definitions['new_base_field'] = BaseFieldDefinition::create($type)
->setName('new_base_field')
->setLabel(t('A new revisionable base field'))
@@ -279,14 +279,14 @@ trait EntityDefinitionTestTrait {
/**
* Modifies the new base field from 'string' to 'text'.
*/
- protected function modifyBaseField() {
+ protected function modifyBaseField(): void {
$this->addBaseField('text');
}
/**
* Promotes a field to an entity key.
*/
- protected function makeBaseFieldEntityKey() {
+ protected function makeBaseFieldEntityKey(): void {
$entity_type = clone \Drupal::entityTypeManager()->getDefinition('entity_test_update');
$entity_keys = $entity_type->getKeys();
$entity_keys['new_base_field'] = 'new_base_field';
@@ -300,21 +300,21 @@ trait EntityDefinitionTestTrait {
* @param string $entity_type_id
* (optional) The entity type ID the base field should be attached to.
*/
- protected function removeBaseField($entity_type_id = 'entity_test_update') {
+ protected function removeBaseField($entity_type_id = 'entity_test_update'): void {
$this->state->delete($entity_type_id . '.additional_base_field_definitions');
}
/**
* Adds a single-field index to the base field.
*/
- protected function addBaseFieldIndex() {
+ protected function addBaseFieldIndex(): void {
$this->state->set('entity_test_update.additional_field_index.entity_test_update.new_base_field', TRUE);
}
/**
* Removes the index added in addBaseFieldIndex().
*/
- protected function removeBaseFieldIndex() {
+ protected function removeBaseFieldIndex(): void {
$this->state->delete('entity_test_update.additional_field_index.entity_test_update.new_base_field');
}
@@ -328,7 +328,7 @@ trait EntityDefinitionTestTrait {
* @param bool $translatable
* (optional) Whether the field should be translatable. Defaults to FALSE.
*/
- protected function addBundleField($type = 'string', $revisionable = FALSE, $translatable = FALSE) {
+ protected function addBundleField($type = 'string', $revisionable = FALSE, $translatable = FALSE): void {
$definitions['new_bundle_field'] = FieldStorageDefinition::create($type)
->setName('new_bundle_field')
->setLabel(t('A new bundle field'))
@@ -342,14 +342,14 @@ trait EntityDefinitionTestTrait {
/**
* Modifies the new bundle field from 'string' to 'text'.
*/
- protected function modifyBundleField() {
+ protected function modifyBundleField(): void {
$this->addBundleField('text');
}
/**
* Removes the new bundle field from the 'entity_test_update' entity type.
*/
- protected function removeBundleField() {
+ protected function removeBundleField(): void {
$this->state->delete('entity_test_update.additional_field_storage_definitions');
$this->state->delete('entity_test_update.additional_bundle_field_definitions.test_bundle');
}
@@ -359,7 +359,7 @@ trait EntityDefinitionTestTrait {
*
* @see \Drupal\entity_test\EntityTestStorageSchema::getEntitySchema()
*/
- protected function addEntityIndex() {
+ protected function addEntityIndex(): void {
$indexes = [
'entity_test_update__new_index' => ['name', 'test_single_property'],
];
@@ -369,14 +369,14 @@ trait EntityDefinitionTestTrait {
/**
* Removes the index added in addEntityIndex().
*/
- protected function removeEntityIndex() {
+ protected function removeEntityIndex(): void {
$this->state->delete('entity_test_update.additional_entity_indexes');
}
/**
* Renames the base table to 'entity_test_update_new'.
*/
- protected function renameBaseTable() {
+ protected function renameBaseTable(): void {
$entity_type = clone \Drupal::entityTypeManager()->getDefinition('entity_test_update');
$entity_type->set('base_table', 'entity_test_update_new');
@@ -387,7 +387,7 @@ trait EntityDefinitionTestTrait {
/**
* Renames the data table to 'entity_test_update_data_new'.
*/
- protected function renameDataTable() {
+ protected function renameDataTable(): void {
$entity_type = clone \Drupal::entityTypeManager()->getDefinition('entity_test_update');
$entity_type->set('data_table', 'entity_test_update_data_new');
@@ -398,7 +398,7 @@ trait EntityDefinitionTestTrait {
/**
* Renames the revision table to 'entity_test_update_revision_new'.
*/
- protected function renameRevisionBaseTable() {
+ protected function renameRevisionBaseTable(): void {
$entity_type = clone \Drupal::entityTypeManager()->getDefinition('entity_test_update');
$entity_type->set('revision_table', 'entity_test_update_revision_new');
@@ -409,7 +409,7 @@ trait EntityDefinitionTestTrait {
/**
* Renames the revision data table to 'entity_test_update_revision_data_new'.
*/
- protected function renameRevisionDataTable() {
+ protected function renameRevisionDataTable(): void {
$entity_type = clone \Drupal::entityTypeManager()->getDefinition('entity_test_update');
$entity_type->set('revision_data_table', 'entity_test_update_revision_data_new');
@@ -420,7 +420,7 @@ trait EntityDefinitionTestTrait {
/**
* Removes the entity type.
*/
- protected function deleteEntityType() {
+ protected function deleteEntityType(): void {
$this->state->set('entity_test_update.entity_type', 'null');
}
diff --git a/core/modules/system/tests/src/Functional/Menu/LinksetControllerMultiLingualTest.php b/core/modules/system/tests/src/Functional/Menu/LinksetControllerMultiLingualTest.php
index d6b44d4bb9d9..b5e208474668 100644
--- a/core/modules/system/tests/src/Functional/Menu/LinksetControllerMultiLingualTest.php
+++ b/core/modules/system/tests/src/Functional/Menu/LinksetControllerMultiLingualTest.php
@@ -151,7 +151,7 @@ final class LinksetControllerMultiLingualTest extends LinksetControllerTestBase
]);
foreach (['aa', 'bb', 'cc'] as $language_code) {
$multi_lingual_menu_item->addTranslation($language_code, [
- 'title' => $language_code . '|' . 'A multi-lingual-node',
+ 'title' => $language_code . '|A multi-lingual-node',
]);
$multi_lingual_menu_item->save();
}
@@ -170,7 +170,7 @@ final class LinksetControllerMultiLingualTest extends LinksetControllerTestBase
]);
foreach (['aa', 'bb'] as $language_code) {
$multi_lingual_menu_item->addTranslation($language_code, [
- 'title' => $language_code . '|' . 'Second multi-lingual-node',
+ 'title' => $language_code . '|Second multi-lingual-node',
]);
$multi_lingual_menu_item->save();
}
@@ -189,7 +189,7 @@ final class LinksetControllerMultiLingualTest extends LinksetControllerTestBase
]);
foreach (['aa', 'bb'] as $language_code) {
$multi_lingual_menu_item->addTranslation($language_code, [
- 'title' => $language_code . '|' . 'Third multi-lingual-node',
+ 'title' => $language_code . '|Third multi-lingual-node',
]);
$multi_lingual_menu_item->save();
}
diff --git a/core/modules/system/tests/src/Functional/Module/VersionTest.php b/core/modules/system/tests/src/Functional/Module/VersionTest.php
index 7f3af598cfb8..1a98b7f246fa 100644
--- a/core/modules/system/tests/src/Functional/Module/VersionTest.php
+++ b/core/modules/system/tests/src/Functional/Module/VersionTest.php
@@ -8,6 +8,7 @@ namespace Drupal\Tests\system\Functional\Module;
* Tests module version dependencies.
*
* @group Module
+ * @group #slow
*/
class VersionTest extends ModuleTestBase {
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php
index ffaaba1119aa..32ca94f100b0 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php
@@ -50,7 +50,7 @@ class UpdatePathTestJavaScriptTest extends BrowserTestBase {
}
// Source is a root-relative URL. Transform it to an absolute URL to allow
// file_get_contents() to access the file.
- $src = preg_replace('#^' . $GLOBALS['base_path'] . '(.*)#i', $GLOBALS['base_url'] . '/' . '${1}', $script->getAttribute('src'));
+ $src = preg_replace('#^' . $GLOBALS['base_path'] . '(.*)#i', $GLOBALS['base_url'] . '/${1}', $script->getAttribute('src'));
$file_content = file_get_contents($src);
if (str_contains($file_content, 'window.drupalSettings =')) {
diff --git a/core/modules/system/tests/src/Kernel/System/CronQueueTest.php b/core/modules/system/tests/src/Kernel/System/CronQueueTest.php
index 96a02f8f1644..069a26c3eb5f 100644
--- a/core/modules/system/tests/src/Kernel/System/CronQueueTest.php
+++ b/core/modules/system/tests/src/Kernel/System/CronQueueTest.php
@@ -70,7 +70,6 @@ class CronQueueTest extends KernelTestBase {
parent::setUp();
$this->connection = Database::getConnection();
- $this->cron = \Drupal::service('cron');
$time = $this->prophesize('Drupal\Component\Datetime\TimeInterface');
$time->getCurrentTime()->willReturn($this->currentTime);
@@ -91,6 +90,8 @@ class CronQueueTest extends KernelTestBase {
});
$this->container->set('queue', $queue_factory->reveal());
+ // Instantiate the `cron` service after the mock queue factory is set.
+ $this->cron = \Drupal::service('cron');
}
/**
diff --git a/core/modules/system/tests/themes/test_theme/test_theme.theme b/core/modules/system/tests/themes/test_theme/test_theme.theme
index 80214af02d0b..d0b3b2b71bf1 100644
--- a/core/modules/system/tests/themes/test_theme/test_theme.theme
+++ b/core/modules/system/tests/themes/test_theme/test_theme.theme
@@ -54,7 +54,7 @@ function test_theme_theme_suggestions_alter(array &$suggestions, array &$variabl
// the theme_suggestions_test module can be picked up when that module is
// enabled.
if ($hook == 'theme_test_general_suggestions') {
- array_unshift($suggestions, 'theme_test_general_suggestions__' . 'theme_override');
+ array_unshift($suggestions, 'theme_test_general_suggestions__theme_override');
$variables['theme_hook'] = 'test_theme_theme_suggestions_alter';
}
}
@@ -68,7 +68,7 @@ function test_theme_theme_suggestions_theme_test_suggestions_alter(array &$sugge
// suggestion to the beginning of the array so that the suggestion added by
// the theme_suggestions_test module can be picked up when that module is
// enabled.
- array_unshift($suggestions, 'theme_test_suggestions__' . 'theme_override');
+ array_unshift($suggestions, 'theme_test_suggestions__theme_override');
}
/**