Skip to content
Snippets Groups Projects
Unverified Commit 27987af5 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3107155 by catch, effulgentsia, andypost, xjm, daffie, Gábor Hojtsy,...

Issue #3107155 by catch, effulgentsia, andypost, xjm, daffie, Gábor Hojtsy, alexpott, mondrake: Raise SQLite version requirement to 3.26 in Drupal 9
parent 28b8b4e4
No related branches found
No related tags found
6 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!144Issue #2666286: Clean up menu_ui to conform to Drupal coding standards
...@@ -57,7 +57,7 @@ Drupal requires: ...@@ -57,7 +57,7 @@ Drupal requires:
- Percona Server 5.7.8 (or greater) (http://www.percona.com/). Percona - Percona Server 5.7.8 (or greater) (http://www.percona.com/). Percona
Server is a backwards-compatible replacement for MySQL. Server is a backwards-compatible replacement for MySQL.
- PostgreSQL 9.1.2 (or greater) (http://www.postgresql.org/). - 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 For more detailed information about Drupal requirements, including a list of
PHP extensions and configurations that are required, see "System requirements" PHP extensions and configurations that are required, see "System requirements"
......
...@@ -12,6 +12,14 @@ ...@@ -12,6 +12,14 @@
*/ */
class Tasks extends InstallTasks { 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} * {@inheritdoc}
*/ */
...@@ -28,7 +36,7 @@ public function name() { ...@@ -28,7 +36,7 @@ public function name() {
* {@inheritdoc} * {@inheritdoc}
*/ */
public function minimumVersion() { public function minimumVersion() {
return '3.7.11'; return static::SQLITE_MINIMUM_VERSION;
} }
/** /**
......
...@@ -3,10 +3,12 @@ ...@@ -3,10 +3,12 @@
namespace Drupal\BuildTests\Framework\Tests; namespace Drupal\BuildTests\Framework\Tests;
use Drupal\BuildTests\QuickStart\QuickStartTestBase; use Drupal\BuildTests\QuickStart\QuickStartTestBase;
use Drupal\Core\Database\Driver\sqlite\Install\Tasks;
/** /**
* @coversDefaultClass \Drupal\BuildTests\Framework\BuildTestBase * @coversDefaultClass \Drupal\BuildTests\Framework\BuildTestBase
* @group Build * @group Build
* @requires extension pdo_sqlite
*/ */
class HtRouterTest extends QuickStartTestBase { class HtRouterTest extends QuickStartTestBase {
...@@ -14,6 +16,10 @@ class HtRouterTest extends QuickStartTestBase { ...@@ -14,6 +16,10 @@ class HtRouterTest extends QuickStartTestBase {
* @covers ::instantiateServer * @covers ::instantiateServer
*/ */
public function testHtRouter() { public function testHtRouter() {
if (version_compare(\SQLite3::version()['versionString'], Tasks::SQLITE_MINIMUM_VERSION) < 0) {
$this->markTestSkipped();
}
$this->copyCodebase(); $this->copyCodebase();
$this->executeCommand('COMPOSER_DISCARD_CHANGES=true composer install --no-dev --no-interaction'); $this->executeCommand('COMPOSER_DISCARD_CHANGES=true composer install --no-dev --no-interaction');
$this->assertErrorOutputContains('Generating autoload files'); $this->assertErrorOutputContains('Generating autoload files');
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace Drupal\Tests\Core\Command; namespace Drupal\Tests\Core\Command;
use Drupal\Core\Database\Driver\sqlite\Install\Tasks;
use Drupal\Core\Test\TestDatabase; use Drupal\Core\Test\TestDatabase;
use Drupal\Tests\BrowserTestBase; use Drupal\Tests\BrowserTestBase;
use GuzzleHttp\Client; use GuzzleHttp\Client;
...@@ -18,6 +19,7 @@ ...@@ -18,6 +19,7 @@
* *
* @runTestsInSeparateProcesses * @runTestsInSeparateProcesses
* @preserveGlobalState disabled * @preserveGlobalState disabled
* @requires extension pdo_sqlite
* *
* @group Command * @group Command
*/ */
...@@ -87,6 +89,9 @@ public function testQuickStartCommand() { ...@@ -87,6 +89,9 @@ public function testQuickStartCommand() {
if (version_compare(phpversion(), DRUPAL_MINIMUM_SUPPORTED_PHP) < 0) { if (version_compare(phpversion(), DRUPAL_MINIMUM_SUPPORTED_PHP) < 0) {
$this->markTestSkipped(); $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 // Install a site using the standard profile to ensure the one time login
// link generation works. // link generation works.
...@@ -177,6 +182,9 @@ public function testQuickStartInstallAndServerCommands() { ...@@ -177,6 +182,9 @@ public function testQuickStartInstallAndServerCommands() {
if (version_compare(phpversion(), DRUPAL_MINIMUM_SUPPORTED_PHP) < 0) { if (version_compare(phpversion(), DRUPAL_MINIMUM_SUPPORTED_PHP) < 0) {
$this->markTestSkipped(); $this->markTestSkipped();
} }
if (version_compare(\SQLite3::version()['versionString'], Tasks::SQLITE_MINIMUM_VERSION) < 0) {
$this->markTestSkipped();
}
// Install a site. // Install a site.
$install_command = [ $install_command = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment