diff -u b/core/modules/mysql/mysql.install b/core/modules/mysql/mysql.install --- b/core/modules/mysql/mysql.install +++ b/core/modules/mysql/mysql.install @@ -46,11 +46,11 @@ } } - $tables_missing_key_text = 'For this to work properly all tables should have a primary key. The following table(s) do no have a primary key: '. implode(', ', $tables_missing_key); + $tables_missing_key_text = 'For this to work properly all tables should have a primary key. The following table(s) do no have a primary key: ' . implode(', ', $tables_missing_key); if ($isolation_level == 'READ-COMMITTED' && $missing_primary_key) { $severity_level = REQUIREMENT_ERROR; - $description = 'This site is using the database transaction level "READ COMMITTED". '. $tables_missing_key_text; + $description = 'This site is using the database transaction level "READ COMMITTED". ' . $tables_missing_key_text; } elseif ($isolation_level == 'REPEATABLE-READ') { $severity_level = REQUIREMENT_WARNING; @@ -61,14 +61,14 @@ } elseif ($isolation_level == 'READ-UNCOMMITTED' || $isolation_level == 'SERIALIZED') { $severity_level = REQUIREMENT_ERROR; - $description = 'This site is using the database transaction level "'.$isolation_level. '". This database transaction level is not supported by Drupal. The recommended database transaction level for Drupal is "READ COMMITTED".'; + $description = 'This site is using the database transaction level "' . $isolation_level . '". This database transaction level is not supported by Drupal. The recommended database transaction level for Drupal is "READ COMMITTED".'; } $requirements['mysql_transaction_level'] = [ 'title' => t('Database Isolation Level'), 'severity' => $severity_level, 'value' => $isolation_level, - 'description' => t($description. ' See the setting MySQL transaction isolation level page for more information.', [ + 'description' => t($description . ' See the setting MySQL transaction isolation level page for more information.', [ ':performance_doc' => 'https://www.drupal.org/docs/system-requirements/setting-the-mysql-transaction-isolation-level', ]), ]; diff -u b/core/modules/mysql/tests/src/Functional/RequirementsTest.php b/core/modules/mysql/tests/src/Functional/RequirementsTest.php --- b/core/modules/mysql/tests/src/Functional/RequirementsTest.php +++ b/core/modules/mysql/tests/src/Functional/RequirementsTest.php @@ -57,7 +57,7 @@ $this->assertCount(1, $elements); $this->assertStringStartsWith('REPEATABLE-READ', $elements[0]->getParent()->getText()); // Ensure it is a warning. - $this->assertStringContainsString('warning', $elements[0]->getParent()->getParent()->find('css', 'summary')->getAttribute('class')); // Set the isolation level to a level that produces a warning. + $this->assertStringContainsString('warning', $elements[0]->getParent()->getParent()->find('css', 'summary')->getAttribute('class')); // Rollback the isolation level to read committed. $this->writeIsolationLevelSettings('READ COMMITTED'); @@ -94,7 +94,7 @@ $this->assertCount(1, $elements); $this->assertStringStartsWith('REPEATABLE-READ', $elements[0]->getParent()->getText()); // Ensure it is a warning. - $this->assertStringContainsString('warning', $elements[0]->getParent()->getParent()->find('css', 'summary')->getAttribute('class')); // Set the isolation level to a level that produces a warning. + $this->assertStringContainsString('warning', $elements[0]->getParent()->getParent()->find('css', 'summary')->getAttribute('class')); // Rollback the isolation level to read committed. $this->writeIsolationLevelSettings('READ COMMITTED'); @@ -106,7 +106,7 @@ ]); $this->assertCount(1, $elements); $this->assertStringStartsWith('READ-COMMITTED', $elements[0]->getParent()->getText()); - // Ensure it is a not a warning. + // Ensure it is an error. $this->assertStringContainsString('error', $elements[0]->getParent()->getParent()->find('css', 'summary')->getAttribute('class')); }