diff -u b/core/modules/user/tests/src/Functional/Update/UserUpdateUserOneAdminTest.php b/core/modules/user/tests/src/Functional/Update/UserUpdateUserOneAdminTest.php --- b/core/modules/user/tests/src/Functional/Update/UserUpdateUserOneAdminTest.php +++ b/core/modules/user/tests/src/Functional/Update/UserUpdateUserOneAdminTest.php @@ -94,13 +94,13 @@ * * By default this is administrator_legacy but in the rare event of a naming * collision, people may choose an ID themselves by setting it to the - * user_update_8101_legacy_admin_role setting in settings.php. + * user_update_9201_legacy_admin_role setting in settings.php. * * @return string * The legacy administrator role ID. */ protected function getLegacyAdminRoleId() { - return Settings::get('user_update_8101_legacy_admin_role', 'administrator_legacy'); + return Settings::get('user_update_9201_legacy_admin_role', 'administrator_legacy'); } } diff -u b/core/modules/user/tests/src/Kernel/UserInstallTest.php b/core/modules/user/tests/src/Kernel/UserInstallTest.php --- b/core/modules/user/tests/src/Kernel/UserInstallTest.php +++ b/core/modules/user/tests/src/Kernel/UserInstallTest.php @@ -51,7 +51,11 @@ $this->assertTrue($anon->isBlocked()); // Verify that UID 1 gets the administrator role. - $rids = \Drupal::database()->query('SELECT roles_target_id FROM {user__roles} WHERE entity_id = 1')->fetchCol(); + $rids = \Drupal::database()->select('user__roles', 'r') + ->fields('r', ['roles_target_id']) + ->condition('entity_id', 1) + ->execute() + ->fetchCol(); $this->assertEquals([AccountInterface::ADMINISTRATOR_ROLE], $rids, 'Admin user has administrator role'); } diff -u b/core/modules/user/user.install b/core/modules/user/user.install --- b/core/modules/user/user.install +++ b/core/modules/user/user.install @@ -108,7 +108,7 @@ /** * Ensure the presence of the administrator role. */ -function user_update_8101() { +function user_update_9201() { $config_factory = \Drupal::configFactory(); $config_name = 'user.role.administrator'; $role = $config_factory->getEditable($config_name); @@ -116,7 +116,7 @@ // We need to be careful not to grant people more access all of the sudden. // Migrate the administrator role to a new administrator_legacy role. We will // assign old administrators that role in the post update hook. - $legacy_admin_role = Settings::get('user_update_8101_legacy_admin_role', 'administrator_legacy'); + $legacy_admin_role = Settings::get('user_update_9201_legacy_admin_role', 'administrator_legacy'); if (!$role->isNew() && !$role->get('is_admin')) { $legacy_role = $config_factory->getEditable('user.role.' . $legacy_admin_role); $legacy_role->setData($role->getRawData()); diff -u b/core/modules/user/user.post_update.php b/core/modules/user/user.post_update.php --- b/core/modules/user/user.post_update.php +++ b/core/modules/user/user.post_update.php @@ -24,7 +24,7 @@ function user_post_update_change_user_1_and_admin_role() { // If we have a legacy administrator role, we need to update all users who had // the original administrator role to now have the legacy role. - $legacy_admin_role = Settings::get('user_update_8101_legacy_admin_role', 'administrator_legacy'); + $legacy_admin_role = Settings::get('user_update_9201_legacy_admin_role', 'administrator_legacy'); if ($role = Role::load($legacy_admin_role)) { $uids = Drupal::entityQuery('user') ->condition('roles', 'administrator') only in patch2: unchanged: --- a/core/modules/views/tests/src/Kernel/Handler/FieldFieldAccessTestBase.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldFieldAccessTestBase.php @@ -42,7 +42,7 @@ protected function setUp($import_test_views = TRUE) { $role_with_access = Role::create([ 'id' => 'with_access', - 'permissions' => ['view test entity field'], + 'permissions' => ['access content', 'view test entity field'], ]); $role_with_access->save(); $role_without_access = Role::create([ only in patch2: unchanged: --- a/core/modules/workspaces/workspaces.install +++ b/core/modules/workspaces/workspaces.install @@ -65,8 +65,8 @@ function workspaces_install() { $result = $query->execute(); } - // Default to user ID 1 if we could not find any other administrator users. - $owner_id = !empty($result) ? reset($result) : 1; + // Default to user ID 0 if we could not find any other administrator users. + $owner_id = !empty($result) ? reset($result) : 0; // Create a 'stage' workspace by default. Workspace::create([ only in patch2: unchanged: --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php @@ -48,7 +48,7 @@ public function testConfigSync() { parent::testConfigSync(); // Ensure that menu blocks have been created correctly. $this->assertSession()->responseNotContains('This block is broken or missing.'); - $this->assertSession()->linkExists('Add content'); + $this->assertSession()->responseContains('Congratulations, you installed Drupal!'); } } only in patch2: unchanged: --- a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php +++ b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php @@ -55,6 +55,7 @@ public function testModuleConfig($module) { // other modules. Therefore they are put into static::$modules, which though // doesn't install config files, so import those config files explicitly. Do // this for all tests in case optional configuration depends on it. + $this->installEntitySchema('user'); $this->installConfig(['system', 'user']); $module_path = drupal_get_path('module', $module) . '/';