diff --git a/core/lib/Drupal/Core/Database/Connection.php b/core/lib/Drupal/Core/Database/Connection.php index 2bb3c057b4..5f84c1c4b4 100644 --- a/core/lib/Drupal/Core/Database/Connection.php +++ b/core/lib/Drupal/Core/Database/Connection.php @@ -1663,6 +1663,11 @@ public function commit() { * @return int|string * An integer number larger than any number returned by earlier calls and * also larger than the $existing_id if one was passed in. + * + * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Modules + * should use instead the keyvalue storage for the last used id. + * + * @see https://www.drupal.org/node/3220378 */ abstract public function nextId($existing_id = 0); diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php index 1db8a0e220..3b51b60c45 100644 --- a/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php +++ b/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php @@ -59,7 +59,6 @@ class BlockContentAccessHandlerTest extends KernelTestBase { */ protected function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->installSchema('user', ['users_data']); $this->installEntitySchema('user'); $this->installEntitySchema('block_content'); diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php index 53d9562cec..daeace75e2 100644 --- a/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php +++ b/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php @@ -67,7 +67,6 @@ class BlockContentEntityReferenceSelectionTest extends KernelTestBase { */ protected function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); $this->installEntitySchema('block_content'); diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentPermissionsTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentPermissionsTest.php index eba2cf4d1c..2a84840c76 100644 --- a/core/modules/block_content/tests/src/Kernel/BlockContentPermissionsTest.php +++ b/core/modules/block_content/tests/src/Kernel/BlockContentPermissionsTest.php @@ -37,7 +37,6 @@ class BlockContentPermissionsTest extends KernelTestBase { */ public function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); $this->installEntitySchema('block_content'); diff --git a/core/modules/book/tests/src/Kernel/BookMultilingualTest.php b/core/modules/book/tests/src/Kernel/BookMultilingualTest.php index 033b9ae65b..5b6b9cd645 100644 --- a/core/modules/book/tests/src/Kernel/BookMultilingualTest.php +++ b/core/modules/book/tests/src/Kernel/BookMultilingualTest.php @@ -85,7 +85,6 @@ protected function setUp(): void { $this->installEntitySchema('user'); $this->installSchema('book', ['book']); $this->installSchema('node', ['node_access']); - $this->installSchema('system', ['sequences']); $this->installConfig(['node', 'book', 'field']); $node_type = NodeType::create([ 'type' => $this->randomMachineName(), diff --git a/core/modules/comment/tests/src/Kernel/CommentBaseFieldTest.php b/core/modules/comment/tests/src/Kernel/CommentBaseFieldTest.php index 4aeac696e6..ed6d4b2520 100644 --- a/core/modules/comment/tests/src/Kernel/CommentBaseFieldTest.php +++ b/core/modules/comment/tests/src/Kernel/CommentBaseFieldTest.php @@ -33,7 +33,6 @@ protected function setUp(): void { parent::setUp(); $this->installEntitySchema('comment_test_base_field'); $this->installEntitySchema('comment'); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); } diff --git a/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php b/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php index 5dd07655ca..c098c0ccf3 100644 --- a/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php +++ b/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php @@ -42,7 +42,6 @@ protected function setUp(): void { $this->installEntitySchema('user'); $this->installEntitySchema('comment'); $this->installSchema('dblog', ['watchdog']); - $this->installSchema('system', ['sequences']); // Create a new 'comment' comment-type. CommentType::create([ diff --git a/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php b/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php index c906281836..96d8f1f714 100644 --- a/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php +++ b/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php @@ -28,7 +28,6 @@ protected function setUp(): void { parent::setUp(); $this->installEntitySchema('comment'); $this->installEntitySchema('node'); - $this->installSchema('system', ['sequences']); // Make sure uid 0 is created (default uid for comments is 0). $storage = \Drupal::entityTypeManager()->getStorage('user'); diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentFieldNameTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentFieldNameTest.php index deee1956a2..00d2af8717 100644 --- a/core/modules/comment/tests/src/Kernel/Views/CommentFieldNameTest.php +++ b/core/modules/comment/tests/src/Kernel/Views/CommentFieldNameTest.php @@ -57,7 +57,6 @@ public function testCommentFieldName() { $this->installEntitySchema('user'); $this->installEntitySchema('node'); $this->installEntitySchema('comment'); - $this->installSchema('system', ['sequences']); $this->installSchema('comment', ['comment_entity_statistics']); $this->installConfig(['filter']); diff --git a/core/modules/comment/tests/src/Kernel/Views/FilterAndArgumentUserUidTest.php b/core/modules/comment/tests/src/Kernel/Views/FilterAndArgumentUserUidTest.php index 7dfc6896ff..e82288b231 100644 --- a/core/modules/comment/tests/src/Kernel/Views/FilterAndArgumentUserUidTest.php +++ b/core/modules/comment/tests/src/Kernel/Views/FilterAndArgumentUserUidTest.php @@ -52,7 +52,6 @@ class FilterAndArgumentUserUidTest extends KernelTestBase { */ public function testHandlers() { $this->installEntitySchema('user'); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('node'); $this->installEntitySchema('comment'); $this->installSchema('comment', ['comment_entity_statistics']); diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php index 66186f9d3f..34328741a0 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php @@ -44,7 +44,6 @@ protected function setUp(): void { $this->installEntitySchema('node'); $this->installEntitySchema('user'); $this->installConfig(['content_moderation', 'filter']); - $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); // Add a moderated node type. diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php index 100b95b1e3..f526dc1467 100644 --- a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php @@ -49,7 +49,6 @@ protected function setUp(): void { $this->installEntitySchema('user'); $this->installEntitySchema('content_moderation_state'); $this->installConfig('content_moderation'); - $this->installSchema('system', ['sequences']); $this->adminUser = $this->createUser(array_keys($this->container->get('user.permissions')->getPermissions())); } diff --git a/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php b/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php index 623534e722..a2946cf915 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php @@ -44,7 +44,6 @@ protected function setUp(): void { parent::setUp(); $this->installSchema('node', 'node_access'); - $this->installSchema('system', 'sequences'); $this->installEntitySchema('node'); $this->installEntitySchema('user'); $this->installEntitySchema('content_moderation_state'); diff --git a/core/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php b/core/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php index 751c190e71..6485813a58 100644 --- a/core/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php @@ -49,7 +49,6 @@ protected function setUp(): void { $this->installEntitySchema('node'); $this->installEntitySchema('user'); $this->installConfig(['content_moderation', 'filter']); - $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); // Add a moderated node type. diff --git a/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php b/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php index ce47308201..055b4d7670 100644 --- a/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php @@ -43,8 +43,6 @@ class WorkspacesContentModerationStateTest extends ContentModerationStateTest { protected function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); - $this->initializeWorkspacesModule(); $this->switchToWorkspace('stage'); } diff --git a/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php b/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php index 898127519d..9810511f85 100644 --- a/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php +++ b/core/modules/datetime/tests/src/Kernel/DateTimeFormInjectionTest.php @@ -32,14 +32,6 @@ class DateTimeFormInjectionTest extends KernelTestBase implements FormInterface */ protected static $modules = ['system', 'datetime']; - /** - * {@inheritdoc} - */ - protected function setUp(): void { - parent::setUp(); - $this->installSchema('system', ['sequences']); - } - /** * {@inheritdoc} */ diff --git a/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php b/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php index e4134c601a..74e4fc6301 100644 --- a/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php +++ b/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php @@ -54,7 +54,6 @@ protected function setUp(): void { $this->installEntitySchema('entity_test'); $this->installEntitySchema('user'); $this->installConfig(['system']); - $this->installSchema('system', ['sequences']); // Add a datetime range field. $this->fieldStorage = FieldStorageConfig::create([ diff --git a/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php b/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php index 66f69641c7..778315048c 100644 --- a/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php +++ b/core/modules/dblog/tests/src/Kernel/DbLogFormInjectionTest.php @@ -78,7 +78,6 @@ public function submitForm(array &$form, FormStateInterface $form_state) { protected function setUp(): void { parent::setUp(); $this->installSchema('dblog', ['watchdog']); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); $this->logger = \Drupal::logger('test_logger'); $test_user = User::create([ diff --git a/core/modules/dblog/tests/src/Kernel/DbLogTest.php b/core/modules/dblog/tests/src/Kernel/DbLogTest.php index 4d96dbc4a0..08d4c37173 100644 --- a/core/modules/dblog/tests/src/Kernel/DbLogTest.php +++ b/core/modules/dblog/tests/src/Kernel/DbLogTest.php @@ -28,7 +28,6 @@ protected function setUp(): void { parent::setUp(); $this->installSchema('dblog', ['watchdog']); - $this->installSchema('system', ['sequences']); $this->installConfig(['system']); } diff --git a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php index 5ed8ec985e..614989bb9e 100644 --- a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php +++ b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php @@ -59,7 +59,6 @@ protected function setUp(): void { $this->installEntitySchema('entity_test'); $this->installEntitySchema('user'); - $this->installSchema('system', ['sequences']); // Set default storage backend and configure the theme system. $this->installConfig(['field', 'system']); diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php index 95ff3db1ed..004b5d3e2a 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php @@ -36,7 +36,6 @@ protected function setUp(): void { $this->installEntitySchema('node'); $this->installConfig(['node']); $this->installSchema('node', ['node_access']); - $this->installSchema('system', ['sequences']); $this->executeMigration('language'); $this->executeMigration('d6_field_instance_label_description_translation'); } diff --git a/core/modules/file/tests/src/Kernel/AccessTest.php b/core/modules/file/tests/src/Kernel/AccessTest.php index d7bc06e0c2..34077d48e9 100644 --- a/core/modules/file/tests/src/Kernel/AccessTest.php +++ b/core/modules/file/tests/src/Kernel/AccessTest.php @@ -34,7 +34,6 @@ protected function setUp(): void { $this->installEntitySchema('file'); $this->installEntitySchema('user'); $this->installSchema('file', ['file_usage']); - $this->installSchema('system', 'sequences'); } /** diff --git a/core/modules/file/tests/src/Kernel/FileItemValidationTest.php b/core/modules/file/tests/src/Kernel/FileItemValidationTest.php index b9a9bd574c..300658f703 100644 --- a/core/modules/file/tests/src/Kernel/FileItemValidationTest.php +++ b/core/modules/file/tests/src/Kernel/FileItemValidationTest.php @@ -46,7 +46,6 @@ protected function setUp(): void { $this->installEntitySchema('user'); $this->installEntitySchema('file'); $this->installSchema('file', 'file_usage'); - $this->installSchema('system', 'sequences'); $this->user = User::create([ 'name' => 'username', diff --git a/core/modules/file/tests/src/Kernel/FileManagedAccessTest.php b/core/modules/file/tests/src/Kernel/FileManagedAccessTest.php index a9eda570fc..18d22020f5 100644 --- a/core/modules/file/tests/src/Kernel/FileManagedAccessTest.php +++ b/core/modules/file/tests/src/Kernel/FileManagedAccessTest.php @@ -31,7 +31,6 @@ class FileManagedAccessTest extends KernelTestBase { * Tests if public file is always accessible. */ public function testFileAccess() { - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); $this->installEntitySchema('file'); $this->installSchema('file', ['file_usage']); diff --git a/core/modules/file/tests/src/Kernel/Views/RelationshipUserFileDataTest.php b/core/modules/file/tests/src/Kernel/Views/RelationshipUserFileDataTest.php index 1a3a61bb05..a608171ac3 100644 --- a/core/modules/file/tests/src/Kernel/Views/RelationshipUserFileDataTest.php +++ b/core/modules/file/tests/src/Kernel/Views/RelationshipUserFileDataTest.php @@ -46,7 +46,6 @@ class RelationshipUserFileDataTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->installSchema('file', ['file_usage']); $this->installEntitySchema('user'); $this->installEntitySchema('file'); diff --git a/core/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php b/core/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php index 061b5896d6..ec19466d24 100644 --- a/core/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php +++ b/core/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php @@ -42,7 +42,6 @@ class TextFormatElementFormTest extends KernelTestBase implements FormInterface protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); - $this->installSchema('system', ['sequences']); $this->installConfig(['filter', 'filter_test']); // Create user 1 so that the user created later in the test has a different diff --git a/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php b/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php index c2f417923f..4369c2263b 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php @@ -106,7 +106,6 @@ protected function setUp(): void { $this->installEntitySchema('node'); $this->installEntitySchema('user'); // Add the additional table schemas. - $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); $this->installSchema('user', ['users_data']); NodeType::create([ diff --git a/core/modules/jsonapi/tests/src/Kernel/Controller/TemporaryJsonapiFileFieldUploaderTest.php b/core/modules/jsonapi/tests/src/Kernel/Controller/TemporaryJsonapiFileFieldUploaderTest.php index 38ed155285..0418ed9749 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Controller/TemporaryJsonapiFileFieldUploaderTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Controller/TemporaryJsonapiFileFieldUploaderTest.php @@ -37,7 +37,6 @@ protected function setUp(): void { $this->installEntitySchema('node'); $this->installEntitySchema('user'); // Add the additional table schemas. - $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); $this->installSchema('user', ['users_data']); NodeType::create([ diff --git a/core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php b/core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php index 2d213e970f..f3f6c20689 100644 --- a/core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php @@ -61,7 +61,6 @@ protected function setUp(): void { // Add the entity schemas. $this->installEntitySchema('user'); // Add the additional table schemas. - $this->installSchema('system', ['sequences']); $this->installSchema('user', ['users_data']); $this->resourceTypeRepository = $this->container->get('jsonapi.resource_type.repository'); $this->serializer = $this->container->get('jsonapi.serializer'); diff --git a/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php b/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php index 6134c0871f..fba4b5af93 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php @@ -135,7 +135,6 @@ protected function setUp(): void { $this->installEntitySchema('taxonomy_term'); $this->installEntitySchema('file'); // Add the additional table schemas. - $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); $this->installSchema('user', ['users_data']); $this->installSchema('file', ['file_usage']); diff --git a/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php b/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php index 9a8d96d31e..a6b834b17b 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php @@ -63,7 +63,6 @@ protected function setUp(): void { // Add the entity schemas. $this->installEntitySchema('user'); // Add the additional table schemas. - $this->installSchema('system', ['sequences']); $this->installSchema('user', ['users_data']); // Set the user IDs to something higher than 1 so these users cannot be // mistaken for the site admin. diff --git a/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php b/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php index 5687b3b5e1..66c70f1fd9 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php @@ -150,7 +150,6 @@ protected function setUp(): void { $this->installEntitySchema('file'); // Add the additional table schemas. - $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); $this->installSchema('file', ['file_usage']); NodeType::create([ diff --git a/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php b/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php index c9bae28c11..1d070b3a6a 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php @@ -270,7 +270,6 @@ protected function queryConditionData() { * Sets up the schemas. */ protected function setUpSchemas() { - $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); $this->installSchema('user', ['users_data']); diff --git a/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php b/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php index 3ee33a9c6e..f424e3934b 100644 --- a/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php @@ -58,7 +58,6 @@ protected function setUp(): void { $this->installEntitySchema('user'); // Add the additional table schemas. - $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); $this->installSchema('user', ['users_data']); diff --git a/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php b/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php index 5503967191..50b630c3cc 100644 --- a/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php @@ -43,7 +43,6 @@ protected function setUp(): void { $this->installEntitySchema('node'); $this->installEntitySchema('user'); // Add the additional table schemas. - $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); $this->installSchema('user', ['users_data']); NodeType::create([ diff --git a/core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php b/core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php index ce8fabf3df..21767a67ba 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php @@ -75,7 +75,6 @@ protected function setUp(): void { $this->installEntitySchema('node'); $this->installEntitySchema('user'); // Add the additional table schemas. - $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); $this->installSchema('user', ['users_data']); $type = NodeType::create([ diff --git a/core/modules/jsonapi/tests/src/Kernel/Serializer/SerializerTest.php b/core/modules/jsonapi/tests/src/Kernel/Serializer/SerializerTest.php index f12534282f..72c3841ae5 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Serializer/SerializerTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Serializer/SerializerTest.php @@ -72,7 +72,6 @@ protected function setUp(): void { $this->installEntitySchema('node'); $this->installEntitySchema('user'); // Add the additional table schemas. - $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); $this->installSchema('user', ['users_data']); $this->user = User::create([ diff --git a/core/modules/media/tests/src/Kernel/MediaEmbedFilterTestBase.php b/core/modules/media/tests/src/Kernel/MediaEmbedFilterTestBase.php index 46c327def2..1f39eef6db 100644 --- a/core/modules/media/tests/src/Kernel/MediaEmbedFilterTestBase.php +++ b/core/modules/media/tests/src/Kernel/MediaEmbedFilterTestBase.php @@ -71,7 +71,6 @@ protected function setUp(): void { parent::setUp(); $this->installSchema('file', ['file_usage']); - $this->installSchema('system', 'sequences'); $this->installEntitySchema('file'); $this->installEntitySchema('media'); $this->installEntitySchema('user'); diff --git a/core/modules/media/tests/src/Kernel/MediaKernelTestBase.php b/core/modules/media/tests/src/Kernel/MediaKernelTestBase.php index 34219df620..38bc2330f4 100644 --- a/core/modules/media/tests/src/Kernel/MediaKernelTestBase.php +++ b/core/modules/media/tests/src/Kernel/MediaKernelTestBase.php @@ -62,7 +62,6 @@ protected function setUp(): void { $this->installEntitySchema('user'); $this->installEntitySchema('file'); $this->installSchema('file', 'file_usage'); - $this->installSchema('system', 'sequences'); $this->installEntitySchema('media'); $this->installConfig(['field', 'system', 'image', 'file', 'media']); diff --git a/core/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php b/core/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php index 2b582a8263..5216256918 100644 --- a/core/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php +++ b/core/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php @@ -51,7 +51,6 @@ protected function setUp(): void { $this->installEntitySchema('user'); $this->installEntitySchema('file'); $this->installSchema('file', 'file_usage'); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('entity_test'); $this->installEntitySchema('filter_format'); $this->installEntitySchema('media'); diff --git a/core/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php b/core/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php index 02628d22bc..c4b258813c 100644 --- a/core/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php +++ b/core/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php @@ -44,7 +44,6 @@ protected function setUp(): void { $this->installEntitySchema('user'); $this->installEntitySchema('file'); $this->installSchema('file', 'file_usage'); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('media'); $this->installConfig([ 'field', diff --git a/core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php b/core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php index b2a7e97352..f174f01413 100644 --- a/core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php +++ b/core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php @@ -44,7 +44,6 @@ protected function setUp(): void { $this->installEntitySchema('user'); $this->installEntitySchema('file'); $this->installSchema('file', 'file_usage'); - $this->installSchema('system', 'sequences'); $this->installEntitySchema('media'); $this->installConfig([ 'field', diff --git a/core/modules/media_library/tests/src/Kernel/MediaLibraryWidgetTest.php b/core/modules/media_library/tests/src/Kernel/MediaLibraryWidgetTest.php index a8f923c847..1da7afbcc2 100644 --- a/core/modules/media_library/tests/src/Kernel/MediaLibraryWidgetTest.php +++ b/core/modules/media_library/tests/src/Kernel/MediaLibraryWidgetTest.php @@ -70,7 +70,6 @@ protected function setUp(): void { $this->installEntitySchema('entity_test'); $this->installEntitySchema('entity_test_rev'); $this->installEntitySchema('user'); - $this->installSchema('system', ['sequences']); $this->installConfig([ 'system', 'image', diff --git a/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php b/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php index 13da7d23af..dafe492281 100644 --- a/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php +++ b/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php @@ -44,7 +44,6 @@ protected function setUp(): void { $this->menuLinkManager = \Drupal::service('plugin.manager.menu.link'); - $this->installSchema('system', ['sequences']); $this->installSchema('user', ['users_data']); $this->installEntitySchema('entity_test_external'); $this->installEntitySchema('menu_link_content'); diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php index b2ad9d4e35..ef53d918ca 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php @@ -52,7 +52,6 @@ protected function setUp(): void { $this->installEntitySchema('user'); $this->installEntitySchema('user_role'); $this->installEntitySchema('entity_test'); - $this->installSchema('system', ['sequences']); $this->installConfig(['field', 'filter_test', 'system', 'user']); $this->container diff --git a/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php b/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php index f7e8ffae3a..f658020e32 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php @@ -33,7 +33,6 @@ class MigrateExternalTranslatedTest extends MigrateTestBase { */ protected function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); $this->installEntitySchema('user'); $this->installEntitySchema('node'); diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/EntityExistsTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/EntityExistsTest.php index 6e111e2537..08125bb311 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/EntityExistsTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/EntityExistsTest.php @@ -24,7 +24,6 @@ class EntityExistsTest extends KernelTestBase { */ protected function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); } diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php index eab0aedb21..ea13633341 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php @@ -94,7 +94,6 @@ protected function setUp(): void { $this->installEntitySchema('media'); $this->installEntitySchema('taxonomy_term'); $this->installEntitySchema('user'); - $this->installSchema('system', ['sequences']); $this->installSchema('user', 'users_data'); $this->installSchema('file', 'file_usage'); $this->installSchema('node', ['node_access']); diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php index 9567e17135..ad70d88e0e 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php @@ -39,7 +39,6 @@ protected function setUp(): void { $this->installSchema('forum', ['forum_index']); $this->installSchema('node', ['node_access']); $this->installSchema('search', ['search_dataset']); - $this->installSchema('system', ['sequences']); // @todo Remove tracker in https://www.drupal.org/project/drupal/issues/3261452 $this->installSchema('tracker', ['tracker_node', 'tracker_user']); diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php index 8dbc363eb6..d87377d913 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php @@ -39,7 +39,6 @@ protected function setUp(): void { $this->installSchema('forum', ['forum_index']); $this->installSchema('node', ['node_access']); $this->installSchema('search', ['search_dataset']); - $this->installSchema('system', ['sequences']); // @todo Remove tracker in https://www.drupal.org/project/drupal/issues/3261452 $this->installSchema('tracker', ['tracker_node', 'tracker_user']); diff --git a/core/modules/mysql/src/Driver/Database/mysql/Connection.php b/core/modules/mysql/src/Driver/Database/mysql/Connection.php index a041385405..3bb666d564 100644 --- a/core/modules/mysql/src/Driver/Database/mysql/Connection.php +++ b/core/modules/mysql/src/Driver/Database/mysql/Connection.php @@ -349,7 +349,11 @@ public function mapConditionOperator($operator) { return NULL; } + /** + * {@inheritdoc} + */ public function nextId($existing_id = 0) { + @trigger_error('Drupal\Core\Database\Connection::nextId() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Modules should use instead the keyvalue storage for the last used id. See https://www.drupal.org/node/3220378', E_USER_DEPRECATED); $this->query('INSERT INTO {sequences} () VALUES ()'); $new_id = $this->lastInsertId(); // This should only happen after an import or similar event. diff --git a/core/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php b/core/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php index e8b3ae4eb9..308d481372 100644 --- a/core/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php +++ b/core/modules/mysql/tests/src/Kernel/mysql/DbDumpTest.php @@ -92,7 +92,6 @@ protected function setUp(): void { $this->installEntitySchema('file'); $this->installEntitySchema('menu_link_content'); $this->installEntitySchema('path_alias'); - $this->installSchema('system', 'sequences'); // Place some sample config to test for in the export. $this->data = [ @@ -130,7 +129,6 @@ protected function setUp(): void { 'menu_link_content_data', 'menu_link_content_revision', 'menu_link_content_field_revision', - 'sequences', 'sessions', 'path_alias', 'path_alias_revision', diff --git a/core/modules/mysql/tests/src/Kernel/mysql/NextIdTest.php b/core/modules/mysql/tests/src/Kernel/mysql/NextIdTest.php index ea7f3523c4..fd92dacd6a 100644 --- a/core/modules/mysql/tests/src/Kernel/mysql/NextIdTest.php +++ b/core/modules/mysql/tests/src/Kernel/mysql/NextIdTest.php @@ -9,6 +9,7 @@ * Tests the sequences API. * * @group Database + * @group legacy */ class NextIdTest extends DriverSpecificDatabaseTestBase { @@ -24,7 +25,20 @@ class NextIdTest extends DriverSpecificDatabaseTestBase { */ protected function setUp(): void { parent::setUp(); - $this->installSchema('system', 'sequences'); + + $table_specification = [ + 'description' => 'Stores IDs.', + 'fields' => [ + 'value' => [ + 'description' => 'The value of the sequence.', + 'type' => 'serial', + 'unsigned' => TRUE, + 'not null' => TRUE, + ], + ], + 'primary key' => ['value'], + ]; + $this->connection->schema()->createTable('sequences', $table_specification); } /** @@ -33,6 +47,8 @@ protected function setUp(): void { * @see \Drupal\mysql\Driver\Database\mysql\Connection::__destruct() */ public function testDbNextIdClosedConnection() { + $this->expectDeprecation('Drupal\Core\Database\Connection::nextId::nextId() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Modules should use instead the keyvalue storage for the last used id. See https://www.drupal.org/node/3220378'); + // Create an additional connection to test closing the connection. $connection_info = Database::getConnectionInfo(); Database::addConnectionInfo('default', 'next_id', $connection_info['default']); diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTestBase.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTestBase.php index f6a0c3893e..f7150b7beb 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTestBase.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTestBase.php @@ -19,7 +19,6 @@ protected function setUp(): void { $this->installEntitySchema('node'); $this->installConfig(['node']); $this->installSchema('node', ['node_access']); - $this->installSchema('system', ['sequences']); // Create a new user which needs to have UID 1, because that is expected by // the assertions from diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php index 381513ed0a..3fb3d6ded6 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php @@ -62,7 +62,6 @@ protected function setUp(): void { $this->installEntitySchema('taxonomy_term'); $this->installSchema('comment', ['comment_entity_statistics']); $this->installSchema('node', ['node_access']); - $this->installSchema('system', ['sequences']); $this->createContent(); diff --git a/core/modules/node/tests/src/Kernel/NodeAccessTestBase.php b/core/modules/node/tests/src/Kernel/NodeAccessTestBase.php index c3ff1d6c1c..bce5391b19 100644 --- a/core/modules/node/tests/src/Kernel/NodeAccessTestBase.php +++ b/core/modules/node/tests/src/Kernel/NodeAccessTestBase.php @@ -54,7 +54,6 @@ abstract class NodeAccessTestBase extends KernelTestBase { */ protected function setUp(): void { parent::setUp(); - $this->installSchema('system', 'sequences'); $this->installSchema('node', 'node_access'); $this->installEntitySchema('user'); $this->installEntitySchema('node'); diff --git a/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php b/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php index 7c973fc7e7..659f8ffa3e 100644 --- a/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php +++ b/core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php @@ -33,7 +33,6 @@ class NodeBodyFieldStorageTest extends KernelTestBase { */ protected function setUp(): void { parent::setUp(); - $this->installSchema('system', 'sequences'); // Necessary for module uninstall. $this->installSchema('user', 'users_data'); $this->installEntitySchema('user'); diff --git a/core/modules/node/tests/src/Kernel/SummaryLengthTest.php b/core/modules/node/tests/src/Kernel/SummaryLengthTest.php index 38fb4b2971..00445bcf7e 100644 --- a/core/modules/node/tests/src/Kernel/SummaryLengthTest.php +++ b/core/modules/node/tests/src/Kernel/SummaryLengthTest.php @@ -51,7 +51,6 @@ class SummaryLengthTest extends KernelTestBase { */ protected function setUp(): void { parent::setUp(); - $this->installSchema('system', 'sequences'); $this->installSchema('node', 'node_access'); $this->installEntitySchema('user'); $this->installEntitySchema('node'); diff --git a/core/modules/node/tests/src/Kernel/Views/FilterUidRevisionTest.php b/core/modules/node/tests/src/Kernel/Views/FilterUidRevisionTest.php index d0fc212d8e..05a9e71acc 100644 --- a/core/modules/node/tests/src/Kernel/Views/FilterUidRevisionTest.php +++ b/core/modules/node/tests/src/Kernel/Views/FilterUidRevisionTest.php @@ -45,7 +45,6 @@ class FilterUidRevisionTest extends KernelTestBase { public function testFilter() { $this->installEntitySchema('user'); $this->installEntitySchema('node'); - $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); $this->installConfig(['filter']); ViewTestData::createTestViews(static::class, ['node_test_views']); diff --git a/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php b/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php index c5d53e29f1..0d654006c7 100644 --- a/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php +++ b/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php @@ -268,7 +268,7 @@ public function mapConditionOperator($operator) { * and updating a sequences table. */ public function nextId($existing = 0) { - + @trigger_error('Drupal\Core\Database\Connection::nextId() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Modules should use instead the keyvalue storage for the last used id. See https://www.drupal.org/node/3220378', E_USER_DEPRECATED); // Retrieve the name of the sequence. This information cannot be cached // because the prefix may change, for example, like it does in tests. $sequence_name = $this->makeSequenceName('sequences', 'value'); diff --git a/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php b/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php index 46efba468c..1122b340b9 100644 --- a/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php +++ b/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php @@ -76,9 +76,6 @@ class EntitySerializationTest extends NormalizerTestBase { protected function setUp(): void { parent::setUp(); - // User create needs sequence table. - $this->installSchema('system', ['sequences']); - FilterFormat::create([ 'format' => 'my_text_format', 'name' => 'My Text Format', diff --git a/core/modules/sqlite/src/Driver/Database/sqlite/Connection.php b/core/modules/sqlite/src/Driver/Database/sqlite/Connection.php index 72a0cb5b68..9e87c7212e 100644 --- a/core/modules/sqlite/src/Driver/Database/sqlite/Connection.php +++ b/core/modules/sqlite/src/Driver/Database/sqlite/Connection.php @@ -416,7 +416,11 @@ public function prepareStatement(string $query, array $options, bool $allow_row_ return $statement; } + /** + * {@inheritdoc} + */ public function nextId($existing_id = 0) { + @trigger_error('Drupal\Core\Database\Connection::nextId() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Modules should use instead the keyvalue storage for the last used id. See https://www.drupal.org/node/3220378', E_USER_DEPRECATED); try { $this->startTransaction(); } diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 30aa5b5870..161cea979f 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1557,6 +1557,9 @@ function system_install() { * Implements hook_schema(). */ function system_schema() { + // @deprecated The sequences table has been deprecated in drupal:10.1.0 and is + // removed from drupal:12.0.0. See https://www.drupal.org/node/3220378. + // @todo: Remove sequences table in Drupal 12. See https://www.drupal.org/i/3335756 $schema['sequences'] = [ 'description' => 'Stores IDs.', 'fields' => [ diff --git a/core/modules/system/tests/src/Functional/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php b/core/modules/system/tests/src/Functional/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php index 8f6a4fcaa3..cbf13bad31 100644 --- a/core/modules/system/tests/src/Functional/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php +++ b/core/modules/system/tests/src/Functional/Entity/EntityReferenceSelection/EntityReferenceSelectionAccessTest.php @@ -55,7 +55,6 @@ class EntityReferenceSelectionAccessTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); - $this->installSchema('system', 'sequences'); $this->installSchema('comment', ['comment_entity_statistics']); $this->installSchema('file', ['file_usage']); diff --git a/core/modules/system/tests/src/Kernel/Action/ActionTest.php b/core/modules/system/tests/src/Kernel/Action/ActionTest.php index becf628e64..63460935c7 100644 --- a/core/modules/system/tests/src/Kernel/Action/ActionTest.php +++ b/core/modules/system/tests/src/Kernel/Action/ActionTest.php @@ -34,7 +34,6 @@ protected function setUp(): void { $this->actionManager = $this->container->get('plugin.manager.action'); $this->installEntitySchema('user'); - $this->installSchema('system', ['sequences']); } /** diff --git a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php index 8872978fee..8e860fb2ee 100644 --- a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php +++ b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php @@ -82,7 +82,6 @@ class SystemMenuBlockTest extends KernelTestBase { */ protected function setUp(): void { parent::setUp(); - $this->installSchema('system', 'sequences'); $this->installEntitySchema('user'); $this->installEntitySchema('menu_link_content'); diff --git a/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php b/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php index dd1c96b020..80c909581d 100644 --- a/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php +++ b/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php @@ -42,7 +42,6 @@ class DateFormatAccessControlHandlerTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); - $this->installSchema('system', 'sequences'); $this->accessControlHandler = $this->container->get('entity_type.manager')->getAccessControlHandler('date_format'); } diff --git a/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php b/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php index 0f4975c16a..88427a276b 100644 --- a/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php +++ b/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php @@ -42,7 +42,6 @@ class MenuAccessControlHandlerTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); - $this->installSchema('system', 'sequences'); $this->accessControlHandler = $this->container->get('entity_type.manager')->getAccessControlHandler('menu'); } diff --git a/core/modules/system/tests/src/Kernel/TimezoneResolverTest.php b/core/modules/system/tests/src/Kernel/TimezoneResolverTest.php index 1b7bfc0205..6a6678b93e 100644 --- a/core/modules/system/tests/src/Kernel/TimezoneResolverTest.php +++ b/core/modules/system/tests/src/Kernel/TimezoneResolverTest.php @@ -29,7 +29,6 @@ class TimezoneResolverTest extends KernelTestBase { */ public function testGetTimeZone() { $this->installEntitySchema('user'); - $this->installSchema('system', ['sequences']); $this->installConfig(['system']); // Check the default test timezone. diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTranslationTest.php index 83f019f5af..dff00e0cd2 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTranslationTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTranslationTest.php @@ -33,7 +33,6 @@ protected function setUp(): void { $this->installEntitySchema('node'); $this->installConfig(['node']); $this->installSchema('node', ['node_access']); - $this->installSchema('system', ['sequences']); $this->executeMigration('language'); $this->executeMigration('d6_node_settings'); diff --git a/core/modules/tracker/tests/src/Kernel/Views/TrackerUserUidTest.php b/core/modules/tracker/tests/src/Kernel/Views/TrackerUserUidTest.php index 7c29b1ae6f..ed1fb77e71 100644 --- a/core/modules/tracker/tests/src/Kernel/Views/TrackerUserUidTest.php +++ b/core/modules/tracker/tests/src/Kernel/Views/TrackerUserUidTest.php @@ -45,7 +45,6 @@ class TrackerUserUidTest extends KernelTestBase { * Tests the user uid filter and argument. */ public function testUserUid() { - $this->installSchema('system', ['sequences']); $this->installConfig(['filter']); $this->installEntitySchema('user'); $this->installEntitySchema('node'); diff --git a/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php b/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php index 31298d2dc2..a82e53b9e1 100644 --- a/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php +++ b/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php @@ -56,7 +56,6 @@ class UserRoleConditionTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); - $this->installSchema('system', 'sequences'); $this->installEntitySchema('user'); $this->manager = $this->container->get('plugin.manager.condition'); diff --git a/core/modules/user/tests/src/Kernel/ContextProvider/CurrentUserContextTest.php b/core/modules/user/tests/src/Kernel/ContextProvider/CurrentUserContextTest.php index 67922c2246..ee5b71708f 100644 --- a/core/modules/user/tests/src/Kernel/ContextProvider/CurrentUserContextTest.php +++ b/core/modules/user/tests/src/Kernel/ContextProvider/CurrentUserContextTest.php @@ -24,7 +24,6 @@ class CurrentUserContextTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); } diff --git a/core/modules/user/tests/src/Kernel/Field/UserNameFormatterTest.php b/core/modules/user/tests/src/Kernel/Field/UserNameFormatterTest.php index 26e51cf49a..779963d5b2 100644 --- a/core/modules/user/tests/src/Kernel/Field/UserNameFormatterTest.php +++ b/core/modules/user/tests/src/Kernel/Field/UserNameFormatterTest.php @@ -44,7 +44,6 @@ protected function setUp(): void { $this->installConfig(['field']); $this->installEntitySchema('user'); - $this->installSchema('system', ['sequences']); $this->entityType = 'user'; $this->bundle = $this->entityType; diff --git a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserStubTest.php b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserStubTest.php index aa8c1b3972..a04489acc4 100644 --- a/core/modules/user/tests/src/Kernel/Migrate/MigrateUserStubTest.php +++ b/core/modules/user/tests/src/Kernel/Migrate/MigrateUserStubTest.php @@ -25,7 +25,6 @@ class MigrateUserStubTest extends MigrateDrupalTestBase { protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); - $this->installSchema('system', ['sequences']); } /** diff --git a/core/modules/user/tests/src/Kernel/UserAccountFormPasswordResetTest.php b/core/modules/user/tests/src/Kernel/UserAccountFormPasswordResetTest.php index 703775bdd5..4079226901 100644 --- a/core/modules/user/tests/src/Kernel/UserAccountFormPasswordResetTest.php +++ b/core/modules/user/tests/src/Kernel/UserAccountFormPasswordResetTest.php @@ -34,7 +34,6 @@ protected function setUp(): void { parent::setUp(); // Install default configuration; required for AccountFormController. $this->installConfig(['user']); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); // Create an user to login. diff --git a/core/modules/user/tests/src/Kernel/UserDeleteTest.php b/core/modules/user/tests/src/Kernel/UserDeleteTest.php index 74ce534041..1e4ae296bf 100644 --- a/core/modules/user/tests/src/Kernel/UserDeleteTest.php +++ b/core/modules/user/tests/src/Kernel/UserDeleteTest.php @@ -28,7 +28,6 @@ class UserDeleteTest extends KernelTestBase { * Tests deleting multiple users. */ public function testUserDeleteMultiple() { - $this->installSchema('system', ['sequences']); $this->installSchema('user', ['users_data']); $this->installEntitySchema('user'); diff --git a/core/modules/user/tests/src/Kernel/UserEntityLabelTest.php b/core/modules/user/tests/src/Kernel/UserEntityLabelTest.php index 625631e0ef..2fb88d47ab 100644 --- a/core/modules/user/tests/src/Kernel/UserEntityLabelTest.php +++ b/core/modules/user/tests/src/Kernel/UserEntityLabelTest.php @@ -28,7 +28,6 @@ class UserEntityLabelTest extends KernelTestBase { * Tests label callback. */ public function testLabelCallback() { - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); $account = $this->createUser(); diff --git a/core/modules/user/tests/src/Kernel/UserSaveTest.php b/core/modules/user/tests/src/Kernel/UserSaveTest.php index dfdd13a5be..ea2f03f5a4 100644 --- a/core/modules/user/tests/src/Kernel/UserSaveTest.php +++ b/core/modules/user/tests/src/Kernel/UserSaveTest.php @@ -24,7 +24,6 @@ class UserSaveTest extends KernelTestBase { * Ensures that an existing password is unset after the user was saved. */ public function testExistingPasswordRemoval() { - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); /** @var \Drupal\user\Entity\User $user */ diff --git a/core/modules/user/tests/src/Kernel/UserValidationTest.php b/core/modules/user/tests/src/Kernel/UserValidationTest.php index 579b8b4be0..79c594cf8d 100644 --- a/core/modules/user/tests/src/Kernel/UserValidationTest.php +++ b/core/modules/user/tests/src/Kernel/UserValidationTest.php @@ -30,7 +30,6 @@ class UserValidationTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); - $this->installSchema('system', ['sequences']); // Make sure that the default roles exist. $this->installConfig(['user']); diff --git a/core/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php b/core/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php index 8b71ab8ca9..fc12d23e8a 100644 --- a/core/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php +++ b/core/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php @@ -56,7 +56,6 @@ class AccessPermissionTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); $this->installEntitySchema('node'); diff --git a/core/modules/user/tests/src/Kernel/Views/ArgumentDefaultTest.php b/core/modules/user/tests/src/Kernel/Views/ArgumentDefaultTest.php index ec2ebe6e8c..fe8d8fbb86 100644 --- a/core/modules/user/tests/src/Kernel/Views/ArgumentDefaultTest.php +++ b/core/modules/user/tests/src/Kernel/Views/ArgumentDefaultTest.php @@ -38,7 +38,6 @@ class ArgumentDefaultTest extends KernelTestBase { * Tests the current user with argument default. */ public function testPluginArgumentDefaultCurrentUser() { - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); ViewTestData::createTestViews(static::class, ['user_test_views']); diff --git a/core/modules/user/tests/src/Kernel/Views/HandlerArgumentUserUidTest.php b/core/modules/user/tests/src/Kernel/Views/HandlerArgumentUserUidTest.php index 0e01571f9f..ea82939b41 100644 --- a/core/modules/user/tests/src/Kernel/Views/HandlerArgumentUserUidTest.php +++ b/core/modules/user/tests/src/Kernel/Views/HandlerArgumentUserUidTest.php @@ -38,7 +38,6 @@ class HandlerArgumentUserUidTest extends KernelTestBase { * Tests the generated title of a user: uid argument. */ public function testArgumentTitle() { - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); $this->installConfig(['user']); User::create(['uid' => 0, 'name' => ''])->save(); diff --git a/core/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php b/core/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php index 6a067f259e..6bf3c09cf1 100644 --- a/core/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php +++ b/core/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php @@ -43,7 +43,6 @@ class RelationshipRepresentativeNodeTest extends KernelTestBase { * Tests the relationship. */ public function testRelationship() { - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); $this->installEntitySchema('node'); $this->installConfig(['filter']); diff --git a/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php b/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php index d7d7856a37..74c81d39cb 100644 --- a/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php +++ b/core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php @@ -45,7 +45,6 @@ class WhosOnlineBlockTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); $this->installConfig(['system', 'block', 'views', 'user']); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); $this->controller = $this->container diff --git a/core/modules/user/tests/src/Traits/UserCreationTrait.php b/core/modules/user/tests/src/Traits/UserCreationTrait.php index 92a3101e18..1e5a43ee56 100644 --- a/core/modules/user/tests/src/Traits/UserCreationTrait.php +++ b/core/modules/user/tests/src/Traits/UserCreationTrait.php @@ -4,7 +4,6 @@ use Drupal\Component\Render\FormattableMarkup; use Drupal\Core\Database\DatabaseExceptionWrapper; -use Drupal\Core\Database\SchemaObjectExistsException; use Drupal\Core\Entity\EntityStorageException; use Drupal\Core\Session\AccountInterface; use Drupal\KernelTests\KernelTestBase; @@ -57,13 +56,6 @@ protected function setUpCurrentUser(array $values = [], array $permissions = [], if (!\Drupal::moduleHandler()->moduleExists('system')) { $values['uid'] = 0; } - if ($this instanceof KernelTestBase && (!isset($values['uid']) || $values['uid'])) { - try { - $this->installSchema('system', ['sequences']); - } - catch (SchemaObjectExistsException $e) { - } - } // Creating an administrator or assigning custom permissions would result in // creating and assigning a new role to the user. This is not possible with diff --git a/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php b/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php index 3ab59f3c93..5d8c23f228 100644 --- a/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php +++ b/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php @@ -47,7 +47,6 @@ abstract class ViewsKernelTestBase extends KernelTestBase { protected function setUp($import_test_views = TRUE): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->setUpFixtures(); if ($import_test_views) { diff --git a/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php b/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php index 8367356926..abec309910 100644 --- a/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php +++ b/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php @@ -55,7 +55,6 @@ protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); - $this->installSchema('system', ['sequences']); $this->accessControlHandler = $this->container->get('entity_type.manager')->getAccessControlHandler('workflow'); diff --git a/core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php b/core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php index 9568ec1a07..4f92e74a3d 100644 --- a/core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php +++ b/core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php @@ -43,7 +43,6 @@ protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); - $this->installSchema('system', ['sequences']); $this->createUser(); $fields['supported_reference'] = BaseFieldDefinition::create('entity_reference')->setSetting('target_type', 'entity_test_mulrevpub'); diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php index 4519266333..aa973224b5 100644 --- a/core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php +++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php @@ -34,7 +34,6 @@ class WorkspaceAccessTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->installSchema('workspaces', ['workspace_association']); $this->installEntitySchema('workspace'); diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php index 5cfe9a6418..c11dcfcdd9 100644 --- a/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php +++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php @@ -86,7 +86,6 @@ protected function setUp(): void { $this->installConfig(['filter', 'node', 'system', 'language', 'content_translation']); - $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); $language = ConfigurableLanguage::createFromLangcode('de'); diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceMergerTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceMergerTest.php index d8aff40638..f80be7eb19 100644 --- a/core/modules/workspaces/tests/src/Kernel/WorkspaceMergerTest.php +++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceMergerTest.php @@ -61,7 +61,6 @@ protected function setUp(): void { $this->installConfig(['filter', 'node', 'system']); - $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); $this->createContentType(['type' => 'article']); diff --git a/core/tests/Drupal/KernelTests/Core/Action/DeleteActionTest.php b/core/tests/Drupal/KernelTests/Core/Action/DeleteActionTest.php index 186cb468af..c669acd195 100644 --- a/core/tests/Drupal/KernelTests/Core/Action/DeleteActionTest.php +++ b/core/tests/Drupal/KernelTests/Core/Action/DeleteActionTest.php @@ -27,7 +27,6 @@ protected function setUp(): void { parent::setUp(); $this->installEntitySchema('entity_test_mulrevpub'); $this->installEntitySchema('user'); - $this->installSchema('system', ['sequences']); $this->testUser = User::create([ 'name' => 'foobar', diff --git a/core/tests/Drupal/KernelTests/Core/Cache/CacheContextOptimizationTest.php b/core/tests/Drupal/KernelTests/Core/Cache/CacheContextOptimizationTest.php index 24a3cd0922..6a42a83308 100644 --- a/core/tests/Drupal/KernelTests/Core/Cache/CacheContextOptimizationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Cache/CacheContextOptimizationTest.php @@ -29,7 +29,6 @@ protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); $this->installConfig(['user']); - $this->installSchema('system', ['sequences']); } /** diff --git a/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php b/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php index 46f5a37638..8d8b1a1400 100644 --- a/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php +++ b/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php @@ -34,7 +34,6 @@ class EndOfTransactionQueriesTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); - $this->installSchema('system', 'sequences'); $this->installEntitySchema('entity_test'); $this->installEntitySchema('user'); diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php index 9ef75f587e..b81b679f32 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php @@ -39,7 +39,6 @@ class ConfigImporterMissingContentTest extends KernelTestBase { */ protected function setUp(): void { parent::setUp(); - $this->installSchema('system', 'sequences'); $this->installEntitySchema('entity_test'); $this->installEntitySchema('user'); $this->installConfig(['system', 'config_test']); diff --git a/core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php b/core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php index 4da2cb3bfb..780db5fff2 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/NextIdTest.php @@ -6,6 +6,7 @@ * Tests the sequences API. * * @group Database + * @group legacy */ class NextIdTest extends DatabaseTestBase { @@ -21,13 +22,28 @@ class NextIdTest extends DatabaseTestBase { */ protected function setUp(): void { parent::setUp(); - $this->installSchema('system', 'sequences'); + + $table_specification = [ + 'description' => 'Stores IDs.', + 'fields' => [ + 'value' => [ + 'description' => 'The value of the sequence.', + 'type' => 'serial', + 'unsigned' => TRUE, + 'not null' => TRUE, + ], + ], + 'primary key' => ['value'], + ]; + $this->connection->schema()->createTable('sequences', $table_specification); } /** * Tests that the sequences API works. */ public function testDbNextId() { + $this->expectDeprecation('Connection::nextId() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Modules should use instead the keyvalue storage for the last used id. See https://www.drupal.org/node/3220378'); + $first = $this->connection->nextId(); $second = $this->connection->nextId(); // We can test for exact increase in here because we know there is no diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php index 9a57bb226a..83d880f944 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php @@ -347,8 +347,6 @@ public function testJoinTwice() { * Tests that we can join on a query. */ public function testJoinSubquery() { - $this->installSchema('system', 'sequences'); - $account = User::create([ 'name' => $this->randomMachineName(), 'mail' => $this->randomMachineName() . '@example.com', diff --git a/core/tests/Drupal/KernelTests/Core/Element/PathElementFormTest.php b/core/tests/Drupal/KernelTests/Core/Element/PathElementFormTest.php index 7167eb13ff..088bd65893 100644 --- a/core/tests/Drupal/KernelTests/Core/Element/PathElementFormTest.php +++ b/core/tests/Drupal/KernelTests/Core/Element/PathElementFormTest.php @@ -37,7 +37,6 @@ class PathElementFormTest extends KernelTestBase implements FormInterface { */ protected function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); /** @var \Drupal\user\RoleInterface $role */ $role = Role::create([ diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityHasChangesTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityHasChangesTest.php index 033d01fed3..cd29ff5a7d 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityHasChangesTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityHasChangesTest.php @@ -32,7 +32,6 @@ protected function setUp(): void { $this->installEntitySchema('user'); $this->installEntitySchema('entity_test_mulrev_changed_rev'); - $this->installSchema('system', 'sequences'); } /** diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php index 3bd7a1b1c9..18495fbb83 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php @@ -64,8 +64,6 @@ protected function setUp(): void { $this->entityTypeManager = $this->container->get('entity_type.manager'); $this->state = $this->container->get('state'); - $this->installSchema('system', 'sequences'); - $this->installEntitySchema('user'); $this->installEntitySchema('entity_test'); diff --git a/core/tests/Drupal/KernelTests/Core/Form/ExternalFormUrlTest.php b/core/tests/Drupal/KernelTests/Core/Form/ExternalFormUrlTest.php index 77d4b832da..b248620289 100644 --- a/core/tests/Drupal/KernelTests/Core/Form/ExternalFormUrlTest.php +++ b/core/tests/Drupal/KernelTests/Core/Form/ExternalFormUrlTest.php @@ -53,7 +53,6 @@ public function submitForm(array &$form, FormStateInterface $form_state) {} */ protected function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); $test_user = User::create([ diff --git a/core/tests/Drupal/KernelTests/Core/Form/FormActionXssTest.php b/core/tests/Drupal/KernelTests/Core/Form/FormActionXssTest.php index 0f6ab138ed..fc67b354e9 100644 --- a/core/tests/Drupal/KernelTests/Core/Form/FormActionXssTest.php +++ b/core/tests/Drupal/KernelTests/Core/Form/FormActionXssTest.php @@ -55,7 +55,6 @@ public function submitForm(array &$form, FormStateInterface $form_state) {} */ protected function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); $test_user = User::create([ diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php index e96f650cde..1d8267f443 100644 --- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php +++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php @@ -38,7 +38,6 @@ class ConditionTestDualUserTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); - $this->installSchema('system', 'sequences'); $this->installEntitySchema('user'); $this->anonymous = User::create(['uid' => 0]); diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/RequestPathTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/RequestPathTest.php index be6ec023ee..40c737ac89 100644 --- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/RequestPathTest.php +++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/RequestPathTest.php @@ -57,7 +57,6 @@ class RequestPathTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->installConfig('system'); $this->pluginManager = $this->container->get('plugin.manager.condition'); diff --git a/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php b/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php index 39697f977c..398050d76b 100644 --- a/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php @@ -76,7 +76,6 @@ public function submitForm(array &$form, FormStateInterface $form_state) { */ protected function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); // We only need a valid \Drupal\Core\Queue\DatabaseQueue object here, not // an actual valid queue. diff --git a/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php b/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php index 683fa8ad5d..919c18be6b 100644 --- a/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php +++ b/core/tests/Drupal/KernelTests/Core/Render/RenderCacheTest.php @@ -28,7 +28,6 @@ protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); $this->installConfig(['user']); - $this->installSchema('system', ['sequences']); } /** diff --git a/core/tests/Drupal/KernelTests/Core/Theme/TwigWhiteListTest.php b/core/tests/Drupal/KernelTests/Core/Theme/TwigWhiteListTest.php index 8eb1a60aa4..75123e45b0 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/TwigWhiteListTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigWhiteListTest.php @@ -50,7 +50,6 @@ class TwigWhiteListTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); \Drupal::service('theme_installer')->install(['test_theme']); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('node'); $this->installEntitySchema('user'); $this->installEntitySchema('taxonomy_term'); diff --git a/core/tests/Drupal/KernelTests/KernelTestBase.php b/core/tests/Drupal/KernelTests/KernelTestBase.php index da2b8fa120..0dd153eaf2 100644 --- a/core/tests/Drupal/KernelTests/KernelTestBase.php +++ b/core/tests/Drupal/KernelTests/KernelTestBase.php @@ -739,6 +739,9 @@ protected function installSchema($module, $tables) { $schema = $this->container->get('database')->schema(); $tables = (array) $tables; foreach ($tables as $table) { + if ($module === 'system' && $table === 'sequences') { + @trigger_error('Installing the table sequences with the method KernelTestBase::installSchema() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/3143286', E_USER_DEPRECATED); + } if (empty($specification[$table])) { throw new \LogicException("$module module does not define a schema for table '$table'."); } diff --git a/core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php b/core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php index 9834c7a40c..aee435e215 100644 --- a/core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php +++ b/core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php @@ -85,6 +85,7 @@ public function mapConditionOperator($operator) { * {@inheritdoc} */ public function nextId($existing_id = 0) { + @trigger_error('Drupal\Core\Database\Connection::nextId() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Modules should use instead the keyvalue storage for the last used id. See https://www.drupal.org/node/3220378', E_USER_DEPRECATED); return 0; } diff --git a/core/tests/fixtures/database_drivers/custom/fake/Connection.php b/core/tests/fixtures/database_drivers/custom/fake/Connection.php index 5d3312650d..36790b0b57 100644 --- a/core/tests/fixtures/database_drivers/custom/fake/Connection.php +++ b/core/tests/fixtures/database_drivers/custom/fake/Connection.php @@ -54,6 +54,7 @@ public function mapConditionOperator($operator) { * {@inheritdoc} */ public function nextId($existing_id = 0) { + @trigger_error('Drupal\Core\Database\Connection::nextId() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Modules should use instead the keyvalue storage for the last used id. See https://www.drupal.org/node/3220378', E_USER_DEPRECATED); return 0; }