diff --git a/core/INSTALL.txt b/core/INSTALL.txt index 1b2707da826a93d512ef0b157c0ab68e31e7e1b0..0cb34b897908e71e2bc405038396165b14d0ec3a 100644 --- a/core/INSTALL.txt +++ b/core/INSTALL.txt @@ -57,7 +57,7 @@ Drupal requires: - Percona Server 5.7.8 (or greater) (http://www.percona.com/). Percona Server is a backwards-compatible replacement for MySQL. - PostgreSQL 9.1.2 (or greater) (http://www.postgresql.org/). - - SQLite 3.7.11 (or greater) (http://www.sqlite.org/). + - SQLite 3.26 (or greater) (http://www.sqlite.org/). For more detailed information about Drupal requirements, including a list of PHP extensions and configurations that are required, see "System requirements" diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Install/Tasks.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Install/Tasks.php index 76616244b718b5f4d9b5d9febd113c3003c230d3..81bdea39bbb4c66ea2448890440071d43d133bf9 100644 --- a/core/lib/Drupal/Core/Database/Driver/sqlite/Install/Tasks.php +++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Install/Tasks.php @@ -12,6 +12,14 @@ */ class Tasks extends InstallTasks { + /** + * Minimum required SQLite version. + * + * Use to build sqlite library with json1 option for JSON datatype support. + * @see https://www.sqlite.org/json1.html + */ + const SQLITE_MINIMUM_VERSION = '3.26'; + /** * {@inheritdoc} */ @@ -28,7 +36,7 @@ public function name() { * {@inheritdoc} */ public function minimumVersion() { - return '3.7.11'; + return static::SQLITE_MINIMUM_VERSION; } /** diff --git a/core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php b/core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php index f356fe8f6914ec21e2621063021f7f86e1424bca..c96a0f194744676e48fd2b99a0a6f8dd63367c16 100644 --- a/core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php +++ b/core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php @@ -3,10 +3,12 @@ namespace Drupal\BuildTests\Framework\Tests; use Drupal\BuildTests\QuickStart\QuickStartTestBase; +use Drupal\Core\Database\Driver\sqlite\Install\Tasks; /** * @coversDefaultClass \Drupal\BuildTests\Framework\BuildTestBase * @group Build + * @requires extension pdo_sqlite */ class HtRouterTest extends QuickStartTestBase { @@ -14,6 +16,10 @@ class HtRouterTest extends QuickStartTestBase { * @covers ::instantiateServer */ public function testHtRouter() { + if (version_compare(\SQLite3::version()['versionString'], Tasks::SQLITE_MINIMUM_VERSION) < 0) { + $this->markTestSkipped(); + } + $this->copyCodebase(); $this->executeCommand('COMPOSER_DISCARD_CHANGES=true composer install --no-dev --no-interaction'); $this->assertErrorOutputContains('Generating autoload files'); diff --git a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php index 9ba14675dd84dd62683d03e9c89b954da45fb484..bc219a41d9ed4611a1be65efa058e2d77fcb6a36 100644 --- a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php +++ b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\Core\Command; +use Drupal\Core\Database\Driver\sqlite\Install\Tasks; use Drupal\Core\Test\TestDatabase; use Drupal\Tests\BrowserTestBase; use GuzzleHttp\Client; @@ -18,6 +19,7 @@ * * @runTestsInSeparateProcesses * @preserveGlobalState disabled + * @requires extension pdo_sqlite * * @group Command */ @@ -87,6 +89,9 @@ public function testQuickStartCommand() { if (version_compare(phpversion(), DRUPAL_MINIMUM_SUPPORTED_PHP) < 0) { $this->markTestSkipped(); } + if (version_compare(\SQLite3::version()['versionString'], Tasks::SQLITE_MINIMUM_VERSION) < 0) { + $this->markTestSkipped(); + } // Install a site using the standard profile to ensure the one time login // link generation works. @@ -177,6 +182,9 @@ public function testQuickStartInstallAndServerCommands() { if (version_compare(phpversion(), DRUPAL_MINIMUM_SUPPORTED_PHP) < 0) { $this->markTestSkipped(); } + if (version_compare(\SQLite3::version()['versionString'], Tasks::SQLITE_MINIMUM_VERSION) < 0) { + $this->markTestSkipped(); + } // Install a site. $install_command = [