From 8e70ad96ec827c4439a478db393e42f3c889dd32 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Wed, 27 Nov 2019 17:21:38 -0800 Subject: [PATCH 1/8] Locked the PHP_CodeSniffer version to 3.5 for better compatibility with PHP 7.4 --- composer.lock | 12 ++++++------ phpcs.xml.dist | 6 ++++++ .../Tests/DBAL/Functional/ResultCacheTest.php | 2 +- .../Functional/Schema/DrizzleSchemaManagerTest.php | 2 +- .../Functional/Schema/MySqlSchemaManagerTest.php | 2 +- .../DBAL/Platforms/SQLServer2012PlatformTest.php | 1 - 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/composer.lock b/composer.lock index aa0428c2019..e79f9dad815 100644 --- a/composer.lock +++ b/composer.lock @@ -2621,16 +2621,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.4.0", + "version": "3.5.3", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "379deb987e26c7cd103a7b387aea178baec96e48" + "reference": "557a1fc7ac702c66b0bbfe16ab3d55839ef724cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/379deb987e26c7cd103a7b387aea178baec96e48", - "reference": "379deb987e26c7cd103a7b387aea178baec96e48", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/557a1fc7ac702c66b0bbfe16ab3d55839ef724cb", + "reference": "557a1fc7ac702c66b0bbfe16ab3d55839ef724cb", "shasum": "" }, "require": { @@ -2663,12 +2663,12 @@ } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ "phpcs", "standards" ], - "time": "2018-12-19T23:57:18+00:00" + "time": "2019-12-04T04:46:47+00:00" }, { "name": "symfony/console", diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 482519c1b72..a60da30be43 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -79,4 +79,10 @@ lib/Doctrine/DBAL/Types/ObjectType.php tests/Doctrine/Tests/DBAL/Driver/Mysqli/MysqliConnectionTest.php + + + + lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php + diff --git a/tests/Doctrine/Tests/DBAL/Functional/ResultCacheTest.php b/tests/Doctrine/Tests/DBAL/Functional/ResultCacheTest.php index 8d0a17c9b43..9514506b31a 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/ResultCacheTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/ResultCacheTest.php @@ -43,7 +43,7 @@ protected function setUp() : void $this->connection->insert('caching', $row); } - $config = $this->connection->getConfiguration(); + $config = $this->connection->getConfiguration(); $config->setSQLLogger($this->sqlLogger = new DebugStack()); $cache = new ArrayCache(); diff --git a/tests/Doctrine/Tests/DBAL/Functional/Schema/DrizzleSchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Functional/Schema/DrizzleSchemaManagerTest.php index 422740476da..b1a47bc417c 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Schema/DrizzleSchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Schema/DrizzleSchemaManagerTest.php @@ -30,7 +30,7 @@ public function testListTableWithBinary() : void public function testColumnCollation() : void { - $table = new Table('test_collation'); + $table = new Table('test_collation'); $table->addOption('collate', $collation = 'utf8_unicode_ci'); $table->addColumn('id', 'integer'); $table->addColumn('text', 'text'); diff --git a/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php index cf636a797ff..1e3d620c02a 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php @@ -269,7 +269,7 @@ public function testColumnCharsetChange() : void public function testColumnCollation() : void { - $table = new Table('test_collation'); + $table = new Table('test_collation'); $table->addOption('collate', $collation = 'latin1_swedish_ci'); $table->addOption('charset', 'latin1'); $table->addColumn('id', 'integer'); diff --git a/tests/Doctrine/Tests/DBAL/Platforms/SQLServer2012PlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/SQLServer2012PlatformTest.php index 18a8a0ef1d2..e6d4975daed 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/SQLServer2012PlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/SQLServer2012PlatformTest.php @@ -170,7 +170,6 @@ public function testModifyLimitQueryWithSubSelectInSelectList() : void ); self::assertEquals( - 'SELECT ' . 'u.id, ' . '(u.foo/2) foodiv, ' . From 167032e1a73499245309a218533e3e43f8873cf1 Mon Sep 17 00:00:00 2001 From: Michael Moravec Date: Fri, 16 Mar 2018 18:30:16 +0100 Subject: [PATCH 2/8] Drop support for PostgreSQL <9.3 --- .scrutinizer.yml | 2 +- .travis.yml | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index a3b8a5621ca..031103d47d8 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -21,7 +21,7 @@ before_commands: tools: external_code_coverage: timeout: 3600 - runs: 30 # 25x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 2x ContinuousPHP + runs: 29 # 24x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 2x ContinuousPHP filter: excluded_paths: diff --git a/.travis.yml b/.travis.yml index cac4d984d59..85476a88d86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -183,13 +183,6 @@ jobs: env: DB=mariadb.mysqli MARIADB_VERSION=10.3 COVERAGE=yes addons: mariadb: 10.3 - - stage: Test - php: 7.3 - env: DB=pgsql POSTGRESQL_VERSION=9.2 COVERAGE=yes - services: - - postgresql - addons: - postgresql: "9.2" - stage: Test php: 7.3 env: DB=pgsql POSTGRESQL_VERSION=9.3 COVERAGE=yes From bcd5085fdd3ad59cad17ebc95b916084edfefb0e Mon Sep 17 00:00:00 2001 From: Claudio Zizza Date: Thu, 13 Jun 2019 23:11:19 +0200 Subject: [PATCH 3/8] Remove Postgres 9.3 and MariaDB 10.0 support --- .scrutinizer.yml | 2 +- .travis.yml | 19 +------------------ 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 031103d47d8..c8831b78bcb 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -21,7 +21,7 @@ before_commands: tools: external_code_coverage: timeout: 3600 - runs: 29 # 24x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 2x ContinuousPHP + runs: 26 # 21x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 2x ContinuousPHP filter: excluded_paths: diff --git a/.travis.yml b/.travis.yml index 85476a88d86..c4075ab40e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -143,11 +143,6 @@ jobs: - docker before_script: - bash ./tests/travis/install-mysql-8.0.sh - - stage: Test - php: 7.3 - env: DB=mariadb MARIADB_VERSION=10.0 COVERAGE=yes - addons: - mariadb: 10.0 - stage: Test php: 7.3 env: DB=mariadb MARIADB_VERSION=10.1 COVERAGE=yes @@ -163,11 +158,6 @@ jobs: env: DB=mariadb MARIADB_VERSION=10.3 COVERAGE=yes addons: mariadb: 10.3 - - stage: Test - php: 7.3 - env: DB=mariadb.mysqli MARIADB_VERSION=10.0 COVERAGE=yes - addons: - mariadb: 10.0 - stage: Test php: 7.3 env: DB=mariadb.mysqli MARIADB_VERSION=10.1 COVERAGE=yes @@ -183,13 +173,6 @@ jobs: env: DB=mariadb.mysqli MARIADB_VERSION=10.3 COVERAGE=yes addons: mariadb: 10.3 - - stage: Test - php: 7.3 - env: DB=pgsql POSTGRESQL_VERSION=9.3 COVERAGE=yes - services: - - postgresql - addons: - postgresql: "9.3" - stage: Test php: 7.3 env: DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes @@ -218,7 +201,7 @@ jobs: services: - postgresql addons: - postgresql: "9.6" + postgresql: "10.0" before_script: - bash ./tests/travis/install-postgres-10.sh - stage: Test From c64ca260ee663603413ea7f7f4222f42cb40491d Mon Sep 17 00:00:00 2001 From: Andrey Bolonin Date: Mon, 16 Dec 2019 09:34:01 +0200 Subject: [PATCH 4/8] Use PHP 7.4 instead of a snapshot on Travis --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index c4075ab40e9..aeb5d26b4b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -247,7 +247,7 @@ jobs: install: - travis_retry composer update --prefer-dist --prefer-lowest - stage: Test - php: 7.4snapshot + php: 7.4 env: DB=mysql.docker MYSQL_VERSION=8.0 sudo: required services: @@ -255,7 +255,7 @@ jobs: before_script: - bash ./tests/travis/install-mysql-8.0.sh - stage: Test - php: 7.4snapshot + php: 7.4 env: DB=mysqli.docker MYSQL_VERSION=8.0 sudo: required services: @@ -263,17 +263,17 @@ jobs: before_script: - bash ./tests/travis/install-mysql-8.0.sh - stage: Test - php: 7.4snapshot + php: 7.4 env: DB=mariadb MARIADB_VERSION=10.3 addons: mariadb: 10.3 - stage: Test - php: 7.4snapshot + php: 7.4 env: DB=mariadb.mysqli MARIADB_VERSION=10.3 addons: mariadb: 10.3 - stage: Test - php: 7.4snapshot + php: 7.4 env: DB=pgsql POSTGRESQL_VERSION=11.0 sudo: required services: @@ -281,10 +281,10 @@ jobs: before_script: - bash ./tests/travis/install-postgres-11.sh - stage: Test - php: 7.4snapshot + php: 7.4 env: DB=sqlite - stage: Test - php: 7.4snapshot + php: 7.4 env: DB=sqlsrv sudo: required services: @@ -294,7 +294,7 @@ jobs: - bash ./tests/travis/install-mssql-sqlsrv.sh - bash ./tests/travis/install-mssql.sh - stage: Test - php: 7.4snapshot + php: 7.4 env: DB=pdo_sqlsrv sudo: required services: From 3165b3f8438579b6bd8f66ab7c215f8e2bf4be5f Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Tue, 17 Dec 2019 18:15:19 -0800 Subject: [PATCH 5/8] Test primarily against PHP 7.4 on Travis --- .travis.yml | 170 ++++++++++++++++++++++++++-------------------------- 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/.travis.yml b/.travis.yml index aeb5d26b4b3..417ba560cc7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ before_install: - phpenv config-rm xdebug.ini || true - | if [ "x$COVERAGE" == "xyes" ]; then - pecl install pcov-1.0.0 + pecl install pcov-1.0.6 fi before_script: @@ -39,15 +39,15 @@ jobs: include: - stage: Smoke Testing - php: 7.3 + php: 7.4 env: DB=sqlite COVERAGE=yes - stage: Smoke Testing - php: 7.3 + php: 7.4 env: PHPStan install: travis_retry composer install --prefer-dist script: vendor/bin/phpstan analyse - stage: Smoke Testing - php: 7.3 + php: 7.4 env: PHP_CodeSniffer install: travis_retry composer install --prefer-dist script: vendor/bin/phpcs @@ -109,17 +109,79 @@ jobs: - bash ./tests/travis/install-sqlsrv-dependencies.sh - bash ./tests/travis/install-mssql-pdo_sqlsrv.sh - bash ./tests/travis/install-mssql.sh + - stage: Test + php: 7.2 + env: DB=sqlite DEPENDENCIES=low + install: + - travis_retry composer update --prefer-dist --prefer-lowest - stage: Test php: 7.3 - env: DB=mysql COVERAGE=yes + env: DB=mysql.docker MYSQL_VERSION=8.0 + sudo: required + services: + - docker + before_script: + - bash ./tests/travis/install-mysql-8.0.sh + - stage: Test + php: 7.3 + env: DB=mysqli.docker MYSQL_VERSION=8.0 + sudo: required + services: + - docker + before_script: + - bash ./tests/travis/install-mysql-8.0.sh + - stage: Test + php: 7.3 + env: DB=mariadb MARIADB_VERSION=10.3 + addons: + mariadb: 10.3 + - stage: Test + php: 7.3 + env: DB=mariadb.mysqli MARIADB_VERSION=10.3 + addons: + mariadb: 10.3 + - stage: Test + php: 7.3 + env: DB=pgsql POSTGRESQL_VERSION=11.0 + sudo: required + services: + - docker + before_script: + - bash ./tests/travis/install-postgres-11.sh + - stage: Test + php: 7.3 + env: DB=sqlite - stage: Test php: 7.3 + env: DB=sqlsrv + sudo: required + services: + - docker + before_script: + - bash ./tests/travis/install-sqlsrv-dependencies.sh + - bash ./tests/travis/install-mssql-sqlsrv.sh + - bash ./tests/travis/install-mssql.sh + - stage: Test + php: 7.3 + env: DB=pdo_sqlsrv + sudo: required + services: + - docker + before_script: + - bash ./tests/travis/install-sqlsrv-dependencies.sh + - bash ./tests/travis/install-mssql-pdo_sqlsrv.sh + - bash ./tests/travis/install-mssql.sh + - stage: Test + php: 7.4 + env: DB=mysql COVERAGE=yes + - stage: Test + php: 7.4 env: DB=mysql.docker MYSQL_VERSION=5.7 COVERAGE=yes sudo: required before_script: - bash ./tests/travis/install-mysql-5.7.sh - stage: Test - php: 7.3 + php: 7.4 env: DB=mysql.docker MYSQL_VERSION=8.0 COVERAGE=yes sudo: required services: @@ -127,16 +189,16 @@ jobs: before_script: - bash ./tests/travis/install-mysql-8.0.sh - stage: Test - php: 7.3 + php: 7.4 env: DB=mysqli COVERAGE=yes - stage: Test - php: 7.3 + php: 7.4 env: DB=mysqli.docker MYSQL_VERSION=5.7 COVERAGE=yes sudo: required before_script: - bash ./tests/travis/install-mysql-5.7.sh - stage: Test - php: 7.3 + php: 7.4 env: DB=mysqli.docker MYSQL_VERSION=8.0 COVERAGE=yes sudo: required services: @@ -144,58 +206,58 @@ jobs: before_script: - bash ./tests/travis/install-mysql-8.0.sh - stage: Test - php: 7.3 + php: 7.4 env: DB=mariadb MARIADB_VERSION=10.1 COVERAGE=yes addons: mariadb: 10.1 - stage: Test - php: 7.3 + php: 7.4 env: DB=mariadb MARIADB_VERSION=10.2 COVERAGE=yes addons: mariadb: 10.2 - stage: Test - php: 7.3 + php: 7.4 env: DB=mariadb MARIADB_VERSION=10.3 COVERAGE=yes addons: mariadb: 10.3 - stage: Test - php: 7.3 + php: 7.4 env: DB=mariadb.mysqli MARIADB_VERSION=10.1 COVERAGE=yes addons: mariadb: 10.1 - stage: Test - php: 7.3 + php: 7.4 env: DB=mariadb.mysqli MARIADB_VERSION=10.2 COVERAGE=yes addons: mariadb: 10.2 - stage: Test - php: 7.3 + php: 7.4 env: DB=mariadb.mysqli MARIADB_VERSION=10.3 COVERAGE=yes addons: mariadb: 10.3 - stage: Test - php: 7.3 + php: 7.4 env: DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes services: - postgresql addons: postgresql: "9.4" - stage: Test - php: 7.3 + php: 7.4 env: DB=pgsql POSTGRESQL_VERSION=9.5 COVERAGE=yes services: - postgresql addons: postgresql: "9.5" - stage: Test - php: 7.3 + php: 7.4 env: DB=pgsql POSTGRESQL_VERSION=9.6 COVERAGE=yes services: - postgresql addons: postgresql: "9.6" - stage: Test - php: 7.3 + php: 7.4 env: DB=pgsql POSTGRESQL_VERSION=10.0 COVERAGE=yes sudo: required services: @@ -205,7 +267,7 @@ jobs: before_script: - bash ./tests/travis/install-postgres-10.sh - stage: Test - php: 7.3 + php: 7.4 env: DB=pgsql POSTGRESQL_VERSION=11.0 COVERAGE=yes sudo: required services: @@ -213,7 +275,7 @@ jobs: before_script: - bash ./tests/travis/install-postgres-11.sh - stage: Test - php: 7.3 + php: 7.4 env: DB=sqlsrv COVERAGE=yes sudo: required services: @@ -223,7 +285,7 @@ jobs: - bash ./tests/travis/install-mssql-sqlsrv.sh - bash ./tests/travis/install-mssql.sh - stage: Test - php: 7.3 + php: 7.4 env: DB=pdo_sqlsrv COVERAGE=yes sudo: required services: @@ -233,7 +295,7 @@ jobs: - bash ./tests/travis/install-mssql-pdo_sqlsrv.sh - bash ./tests/travis/install-mssql.sh - stage: Test - php: 7.3 + php: 7.4 env: DB=ibm_db2 COVERAGE=yes sudo: required services: @@ -241,68 +303,6 @@ jobs: before_script: - bash ./tests/travis/install-db2.sh - bash ./tests/travis/install-db2-ibm_db2.sh - - stage: Test - php: 7.3 - env: DB=sqlite DEPENDENCIES=low - install: - - travis_retry composer update --prefer-dist --prefer-lowest - - stage: Test - php: 7.4 - env: DB=mysql.docker MYSQL_VERSION=8.0 - sudo: required - services: - - docker - before_script: - - bash ./tests/travis/install-mysql-8.0.sh - - stage: Test - php: 7.4 - env: DB=mysqli.docker MYSQL_VERSION=8.0 - sudo: required - services: - - docker - before_script: - - bash ./tests/travis/install-mysql-8.0.sh - - stage: Test - php: 7.4 - env: DB=mariadb MARIADB_VERSION=10.3 - addons: - mariadb: 10.3 - - stage: Test - php: 7.4 - env: DB=mariadb.mysqli MARIADB_VERSION=10.3 - addons: - mariadb: 10.3 - - stage: Test - php: 7.4 - env: DB=pgsql POSTGRESQL_VERSION=11.0 - sudo: required - services: - - docker - before_script: - - bash ./tests/travis/install-postgres-11.sh - - stage: Test - php: 7.4 - env: DB=sqlite - - stage: Test - php: 7.4 - env: DB=sqlsrv - sudo: required - services: - - docker - before_script: - - bash ./tests/travis/install-sqlsrv-dependencies.sh - - bash ./tests/travis/install-mssql-sqlsrv.sh - - bash ./tests/travis/install-mssql.sh - - stage: Test - php: 7.4 - env: DB=pdo_sqlsrv - sudo: required - services: - - docker - before_script: - - bash ./tests/travis/install-sqlsrv-dependencies.sh - - bash ./tests/travis/install-mssql-pdo_sqlsrv.sh - - bash ./tests/travis/install-mssql.sh - stage: Test if: type = cron From d1695ed1c0d7ae0db1c612fc1811b721c34e1524 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Mon, 22 Apr 2019 18:48:35 -0700 Subject: [PATCH 6/8] Switching Travis CI builds to Ubuntu Xenial Xerus --- .travis.yml | 32 ++++++------- tests/travis/create-mysql-schema.sql | 3 ++ tests/travis/install-mariadb.sh | 13 ++++++ tests/travis/install-sqlsrv-dependencies.sh | 2 +- tests/travis/mariadb.docker.travis.xml | 45 +++++++++++++++++++ tests/travis/mariadb.mysqli.docker.travis.xml | 45 +++++++++++++++++++ tests/travis/mariadb.mysqli.travis.xml | 2 - 7 files changed, 123 insertions(+), 19 deletions(-) create mode 100644 tests/travis/install-mariadb.sh create mode 100644 tests/travis/mariadb.docker.travis.xml create mode 100644 tests/travis/mariadb.mysqli.docker.travis.xml diff --git a/.travis.yml b/.travis.yml index 417ba560cc7..414c0709a55 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: php sudo: false -dist: trusty +dist: xenial cache: directories: @@ -174,6 +174,8 @@ jobs: - stage: Test php: 7.4 env: DB=mysql COVERAGE=yes + services: + - mysql - stage: Test php: 7.4 env: DB=mysql.docker MYSQL_VERSION=5.7 COVERAGE=yes @@ -191,6 +193,8 @@ jobs: - stage: Test php: 7.4 env: DB=mysqli COVERAGE=yes + services: + - mysql - stage: Test php: 7.4 env: DB=mysqli.docker MYSQL_VERSION=5.7 COVERAGE=yes @@ -207,9 +211,11 @@ jobs: - bash ./tests/travis/install-mysql-8.0.sh - stage: Test php: 7.4 - env: DB=mariadb MARIADB_VERSION=10.1 COVERAGE=yes - addons: - mariadb: 10.1 + env: DB=mariadb.docker MARIADB_VERSION=10.1 COVERAGE=yes + services: + - docker + before_script: + - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.4 env: DB=mariadb MARIADB_VERSION=10.2 COVERAGE=yes @@ -222,9 +228,11 @@ jobs: mariadb: 10.3 - stage: Test php: 7.4 - env: DB=mariadb.mysqli MARIADB_VERSION=10.1 COVERAGE=yes - addons: - mariadb: 10.1 + env: DB=mariadb.mysqli.docker MARIADB_VERSION=10.1 COVERAGE=yes + services: + - docker + before_script: + - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.4 env: DB=mariadb.mysqli MARIADB_VERSION=10.2 COVERAGE=yes @@ -238,32 +246,24 @@ jobs: - stage: Test php: 7.4 env: DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes - services: - - postgresql addons: postgresql: "9.4" - stage: Test php: 7.4 env: DB=pgsql POSTGRESQL_VERSION=9.5 COVERAGE=yes - services: - - postgresql addons: postgresql: "9.5" - stage: Test php: 7.4 env: DB=pgsql POSTGRESQL_VERSION=9.6 COVERAGE=yes - services: - - postgresql addons: postgresql: "9.6" - stage: Test php: 7.4 env: DB=pgsql POSTGRESQL_VERSION=10.0 COVERAGE=yes sudo: required - services: - - postgresql addons: - postgresql: "10.0" + postgresql: "10" before_script: - bash ./tests/travis/install-postgres-10.sh - stage: Test diff --git a/tests/travis/create-mysql-schema.sql b/tests/travis/create-mysql-schema.sql index 4e331838cfd..78a32358065 100644 --- a/tests/travis/create-mysql-schema.sql +++ b/tests/travis/create-mysql-schema.sql @@ -1,3 +1,6 @@ +DROP USER IF EXISTS 'travis'@'%'; +CREATE USER 'travis'@'%'; + CREATE SCHEMA doctrine_tests; CREATE SCHEMA test_create_database; CREATE SCHEMA test_drop_database; diff --git a/tests/travis/install-mariadb.sh b/tests/travis/install-mariadb.sh new file mode 100644 index 00000000000..cda81e9bcba --- /dev/null +++ b/tests/travis/install-mariadb.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -ex + +sudo docker run \ + -d \ + -e MYSQL_ALLOW_EMPTY_PASSWORD=yes \ + -e MYSQL_DATABASE=doctrine_tests \ + -p 33306:3306 \ + --name mariadb \ + mariadb:${MARIADB_VERSION} + +sudo docker exec -i mariadb bash <<< 'until echo \\q | mysql doctrine_tests > /dev/null 2>&1 ; do sleep 1; done' diff --git a/tests/travis/install-sqlsrv-dependencies.sh b/tests/travis/install-sqlsrv-dependencies.sh index 137b2a95705..ff91bfdfaf0 100644 --- a/tests/travis/install-sqlsrv-dependencies.sh +++ b/tests/travis/install-sqlsrv-dependencies.sh @@ -5,6 +5,6 @@ set -ex echo Installing driver dependencies curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - -curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql.list +curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql.list sudo apt-get update ACCEPT_EULA=Y sudo apt-get install -qy msodbcsql17 unixodbc unixodbc-dev libssl1.0.0 diff --git a/tests/travis/mariadb.docker.travis.xml b/tests/travis/mariadb.docker.travis.xml new file mode 100644 index 00000000000..fa6617c0948 --- /dev/null +++ b/tests/travis/mariadb.docker.travis.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + ../Doctrine/Tests/DBAL + + + + + + ../../lib/Doctrine + + + + + + performance + locking_functional + + + diff --git a/tests/travis/mariadb.mysqli.docker.travis.xml b/tests/travis/mariadb.mysqli.docker.travis.xml new file mode 100644 index 00000000000..679415d7a18 --- /dev/null +++ b/tests/travis/mariadb.mysqli.docker.travis.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + ../Doctrine/Tests/DBAL + + + + + + ../../lib/Doctrine + + + + + + performance + locking_functional + + + diff --git a/tests/travis/mariadb.mysqli.travis.xml b/tests/travis/mariadb.mysqli.travis.xml index dfc62d307c5..b8bd9be01cd 100644 --- a/tests/travis/mariadb.mysqli.travis.xml +++ b/tests/travis/mariadb.mysqli.travis.xml @@ -2,7 +2,6 @@ - From 22dfe16f315cca66a7e2b7f9023ccaae549bac14 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Thu, 19 Dec 2019 16:42:33 -0800 Subject: [PATCH 7/8] Switching Travis CI builds to Ubuntu Bionic Beaver According to the [documentation](https://docs.travis-ci.com/user/reference/trusty/#container-based-infrastructure), `sudo: false` is no longed needed since Trusty. --- .travis.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 414c0709a55..37fabf85aa7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,10 @@ language: php -sudo: false -dist: xenial +dist: bionic cache: - directories: - - vendor - - $HOME/.composer/cache + directories: + - vendor + - $HOME/.composer/cache before_install: - phpenv config-rm xdebug.ini || true From 38d1f4f68dceec49af9e5daffc980122664089c0 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Tue, 7 Jan 2020 20:25:38 -0800 Subject: [PATCH 8/8] Added builds against PHP nightly on Travis --- .travis.yml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 37fabf85aa7..392659b0858 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,11 @@ before_script: - if [[ "$DB" == "mysql" || "$DB" == "mysqli" || "$DB" == *"mariadb"* ]]; then mysql < tests/travis/create-mysql-schema.sql; fi; install: - - travis_retry composer -n install --prefer-dist + - | + if [[ $TRAVIS_PHP_VERSION = "nightly" ]]; then + export COMPOSER_FLAGS="--ignore-platform-reqs" + fi + - travis_retry composer -n install --prefer-dist $COMPOSER_FLAGS script: - | @@ -302,6 +306,63 @@ jobs: before_script: - bash ./tests/travis/install-db2.sh - bash ./tests/travis/install-db2-ibm_db2.sh + - stage: Test + php: nightly + env: DB=mysql.docker MYSQL_VERSION=8.0 + sudo: required + services: + - docker + before_script: + - bash ./tests/travis/install-mysql-8.0.sh + - stage: Test + php: nightly + env: DB=mysqli.docker MYSQL_VERSION=8.0 + sudo: required + services: + - docker + before_script: + - bash ./tests/travis/install-mysql-8.0.sh + - stage: Test + php: nightly + env: DB=mariadb MARIADB_VERSION=10.3 + addons: + mariadb: 10.3 + - stage: Test + php: nightly + env: DB=mariadb.mysqli MARIADB_VERSION=10.3 + addons: + mariadb: 10.3 + - stage: Test + php: nightly + env: DB=pgsql POSTGRESQL_VERSION=11.0 + sudo: required + services: + - docker + before_script: + - bash ./tests/travis/install-postgres-11.sh + - stage: Test + php: nightly + env: DB=sqlite + - stage: Test + php: nightly + env: DB=sqlsrv + sudo: required + services: + - docker + before_script: + - bash ./tests/travis/install-sqlsrv-dependencies.sh + - bash ./tests/travis/install-mssql-sqlsrv.sh + - bash ./tests/travis/install-mssql.sh + - stage: Test + php: nightly + env: DB=pdo_sqlsrv + sudo: required + services: + - docker + before_script: + - bash ./tests/travis/install-sqlsrv-dependencies.sh + - bash ./tests/travis/install-mssql-pdo_sqlsrv.sh + - bash ./tests/travis/install-mssql.sh - stage: Test if: type = cron @@ -313,3 +374,4 @@ jobs: allow_failures: - env: DEPENDENCIES=dev + - php: nightly