From 96cda301be1253608c3ab3c286b6d72ebcee510c Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Sat, 4 Jan 2020 05:19:58 -0800 Subject: [PATCH 01/29] Bump version to 2.10.2-DEV --- lib/Doctrine/DBAL/Version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/DBAL/Version.php b/lib/Doctrine/DBAL/Version.php index e5e4b9566f6..011646b60c4 100644 --- a/lib/Doctrine/DBAL/Version.php +++ b/lib/Doctrine/DBAL/Version.php @@ -14,7 +14,7 @@ class Version /** * Current Doctrine Version. */ - public const VERSION = '2.10.1'; + public const VERSION = '2.10.2-DEV'; /** * Compares a Doctrine version with the current one. From 77a394d6f078c68f72689d436fe4de84003f70a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Ostroluck=C3=BD?= Date: Sun, 5 Jan 2020 15:54:58 +0100 Subject: [PATCH 02/29] Fix DebugStack#queries docblock type --- lib/Doctrine/DBAL/Logging/DebugStack.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/DBAL/Logging/DebugStack.php b/lib/Doctrine/DBAL/Logging/DebugStack.php index e1ccaad6ba0..1895dde5381 100644 --- a/lib/Doctrine/DBAL/Logging/DebugStack.php +++ b/lib/Doctrine/DBAL/Logging/DebugStack.php @@ -12,7 +12,7 @@ class DebugStack implements SQLLogger /** * Executed SQL queries. * - * @var mixed[][] + * @var array> */ public $queries = []; From a5256109396d33ed9e357a57b977399ae63111f8 Mon Sep 17 00:00:00 2001 From: S38151 Date: Fri, 20 Dec 2019 14:54:30 +0100 Subject: [PATCH 03/29] fixed unqualified table name of fk constraints when using schemas --- .../DBAL/Schema/ForeignKeyConstraint.php | 2 +- .../DBAL/Schema/ForeignKeyConstraintTest.php | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php b/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php index 3c6585e4600..270f3dda312 100644 --- a/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php +++ b/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php @@ -233,7 +233,7 @@ public function getUnqualifiedForeignTableName() $position = strrpos($name, '.'); if ($position !== false) { - $name = substr($name, $position); + $name = substr($name, $position + 1); } return strtolower($name); diff --git a/tests/Doctrine/Tests/DBAL/Schema/ForeignKeyConstraintTest.php b/tests/Doctrine/Tests/DBAL/Schema/ForeignKeyConstraintTest.php index f0b115ddc4f..5a59088e42a 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/ForeignKeyConstraintTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/ForeignKeyConstraintTest.php @@ -4,6 +4,7 @@ use Doctrine\DBAL\Schema\ForeignKeyConstraint; use Doctrine\DBAL\Schema\Index; +use Doctrine\DBAL\Schema\Table; use PHPUnit\Framework\TestCase; class ForeignKeyConstraintTest extends TestCase @@ -56,4 +57,30 @@ public static function getIntersectsIndexColumnsData() : iterable [['FOO'], true], ]; } + + /** + * @param string|Table $foreignTableName + * + * @group DBAL-1062 + * @dataProvider getUnqualifiedForeignTableNameData + */ + public function testGetUnqualifiedForeignTableName($foreignTableName, string $expectedUnqualifiedTableName) : void + { + $foreignKey = new ForeignKeyConstraint(['foo', 'bar'], $foreignTableName, ['fk_foo', 'fk_bar']); + + self::assertSame($expectedUnqualifiedTableName, $foreignKey->getUnqualifiedForeignTableName()); + } + + /** + * @return mixed[][] + */ + public static function getUnqualifiedForeignTableNameData() : iterable + { + return [ + ['schema.foreign_table', 'foreign_table'], + ['foreign_table', 'foreign_table'], + [new Table('schema.foreign_table'), 'foreign_table'], + [new Table('foreign_table'), 'foreign_table'], + ]; + } } From eff166f5c743592f126587f8d93ed6ef15b67959 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 14 Jan 2020 22:07:10 +0300 Subject: [PATCH 04/29] [pg] fix getting table information if search_path contains escaped schema name (eg "812pp") also simplifies the code and now exactly matches postgresql search rules --- lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php | 2 +- .../Schema/PostgreSqlSchemaManagerTest.php | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php index e570dc04ab0..dd90f2cb6b3 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php @@ -367,7 +367,7 @@ private function getTableWhereClause($table, $classAlias = 'c', $namespaceAlias [$schema, $table] = explode('.', $table); $schema = $this->quoteStringLiteral($schema); } else { - $schema = "ANY(string_to_array((select replace(replace(setting,'\"\$user\"',user),' ','') from pg_catalog.pg_settings where name = 'search_path'),','))"; + $schema = 'ANY(current_schemas(false))'; } $table = new Identifier($table); diff --git a/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php index 35326968798..b8a26af3c65 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php @@ -335,6 +335,18 @@ public function testListQuotedTable() : void self::assertFalse($comparator->diffTable($offlineTable, $onlineTable)); } + public function testListTableDetailsWhenCurrentSchemaNameQuoted() : void + { + $this->connection->exec('CREATE SCHEMA "001_test"'); + $this->connection->exec('SET search_path TO "001_test"'); + + try { + $this->testListQuotedTable(); + } finally { + $this->connection->close(); + } + } + public function testListTablesExcludesViews() : void { $this->createTestTable('list_tables_excludes_views'); From 22b5494fb9065cebe7198a9c7ffae6863f83ae0a Mon Sep 17 00:00:00 2001 From: Benjamin Morel Date: Sun, 19 Jan 2020 11:22:14 +0100 Subject: [PATCH 05/29] Fix JOIN with no condition bug --- lib/Doctrine/DBAL/Query/QueryBuilder.php | 8 +++++--- .../Doctrine/Tests/DBAL/Query/QueryBuilderTest.php | 13 ++++++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/DBAL/Query/QueryBuilder.php b/lib/Doctrine/DBAL/Query/QueryBuilder.php index 587e26656ab..3ad7ebdc3cd 100644 --- a/lib/Doctrine/DBAL/Query/QueryBuilder.php +++ b/lib/Doctrine/DBAL/Query/QueryBuilder.php @@ -1327,9 +1327,11 @@ private function getSQLForJoins($fromAlias, array &$knownAliases) if (array_key_exists($join['joinAlias'], $knownAliases)) { throw QueryException::nonUniqueAlias($join['joinAlias'], array_keys($knownAliases)); } - $sql .= ' ' . strtoupper($join['joinType']) - . ' JOIN ' . $join['joinTable'] . ' ' . $join['joinAlias'] - . ' ON ' . ((string) $join['joinCondition']); + $sql .= ' ' . strtoupper($join['joinType']) + . ' JOIN ' . $join['joinTable'] . ' ' . $join['joinAlias']; + if ($join['joinCondition'] !== null) { + $sql .= ' ON ' . $join['joinCondition']; + } $knownAliases[$join['joinAlias']] = true; } diff --git a/tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php b/tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php index a210ef2fe73..7ac89b5ae79 100644 --- a/tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php +++ b/tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php @@ -92,11 +92,22 @@ public function testSelectWithJoin() : void $qb->select('u.*', 'p.*') ->from('users', 'u') - ->Join('u', 'phones', 'p', $expr->eq('p.user_id', 'u.id')); + ->join('u', 'phones', 'p', $expr->eq('p.user_id', 'u.id')); self::assertEquals('SELECT u.*, p.* FROM users u INNER JOIN phones p ON p.user_id = u.id', (string) $qb); } + public function testSelectWithJoinNoCondition() : void + { + $qb = new QueryBuilder($this->conn); + + $qb->select('u.*', 'p.*') + ->from('users', 'u') + ->join('u', 'phones', 'p'); + + self::assertEquals('SELECT u.*, p.* FROM users u INNER JOIN phones p', (string) $qb); + } + public function testSelectWithInnerJoin() : void { $qb = new QueryBuilder($this->conn); From 9b7246a8a1d807323429b3a1705080e7eac17fe4 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Tue, 21 Jan 2020 16:42:22 -0800 Subject: [PATCH 06/29] Fixed the QueryBuilder::setMaxResults() signature to accept NULL --- lib/Doctrine/DBAL/Query/QueryBuilder.php | 9 ++++----- .../Tests/DBAL/Query/QueryBuilderTest.php | 20 ++++++++++++++++--- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/lib/Doctrine/DBAL/Query/QueryBuilder.php b/lib/Doctrine/DBAL/Query/QueryBuilder.php index 587e26656ab..92ee95cbc58 100644 --- a/lib/Doctrine/DBAL/Query/QueryBuilder.php +++ b/lib/Doctrine/DBAL/Query/QueryBuilder.php @@ -118,9 +118,9 @@ class QueryBuilder private $firstResult = null; /** - * The maximum number of results to retrieve. + * The maximum number of results to retrieve or NULL to retrieve all results. * - * @var int + * @var int|null */ private $maxResults = null; @@ -367,7 +367,6 @@ public function setFirstResult($firstResult) /** * Gets the position of the first result the query object was set to retrieve (the "offset"). - * Returns NULL if {@link setFirstResult} was not applied to this QueryBuilder. * * @return int The position of the first result. */ @@ -379,7 +378,7 @@ public function getFirstResult() /** * Sets the maximum number of results to retrieve (the "limit"). * - * @param int $maxResults The maximum number of results to retrieve. + * @param int|null $maxResults The maximum number of results to retrieve or NULL to retrieve all results. * * @return $this This QueryBuilder instance. */ @@ -393,7 +392,7 @@ public function setMaxResults($maxResults) /** * Gets the maximum number of results the query object was set to retrieve (the "limit"). - * Returns NULL if {@link setMaxResults} was not applied to this query builder. + * Returns NULL if all results will be returned. * * @return int The maximum number of results. */ diff --git a/tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php b/tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php index a210ef2fe73..371a1e2970f 100644 --- a/tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php +++ b/tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php @@ -569,13 +569,27 @@ public function testGetState() : void self::assertEquals($sql1, $qb->getSQL()); } - public function testSetMaxResults() : void + /** + * @dataProvider maxResultsProvider + */ + public function testSetMaxResults(?int $maxResults) : void { $qb = new QueryBuilder($this->conn); - $qb->setMaxResults(10); + $qb->setMaxResults($maxResults); self::assertEquals(QueryBuilder::STATE_DIRTY, $qb->getState()); - self::assertEquals(10, $qb->getMaxResults()); + self::assertEquals($maxResults, $qb->getMaxResults()); + } + + /** + * @return mixed[][] + */ + public static function maxResultsProvider() : iterable + { + return [ + 'non-null' => [10], + 'null' => [null], + ]; } public function testSetFirstResult() : void From b253361ef761e0791c83729e636ed3827b724abc Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 2 Aug 2019 10:37:21 +0200 Subject: [PATCH 07/29] A test case for issue #3640 Signed-off-by: Roeland Jago Douma --- tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php b/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php index ea8d4dc0752..ba087eaa28d 100644 --- a/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php +++ b/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php @@ -89,7 +89,7 @@ public static function dataGetPlaceholderPositions() : iterable ['SELECT data.age AS age, data.id AS id, data.name AS name, data.id AS id FROM test_data data WHERE (data.description LIKE :condition_0 ESCAPE "\\\\") AND (data.description LIKE :condition_1 ESCAPE \'\\\\\') ORDER BY id ASC', false, [121 => 'condition_0', 174 => 'condition_1']], ['SELECT data.age AS age, data.id AS id, data.name AS name, data.id AS id FROM test_data data WHERE (data.description LIKE :condition_0 ESCAPE `\\\\`) AND (data.description LIKE :condition_1 ESCAPE `\\\\`) ORDER BY id ASC', false, [121 => 'condition_0', 174 => 'condition_1']], ['SELECT data.age AS age, data.id AS id, data.name AS name, data.id AS id FROM test_data data WHERE (data.description LIKE :condition_0 ESCAPE \'\\\\\') AND (data.description LIKE :condition_1 ESCAPE `\\\\`) ORDER BY id ASC', false, [121 => 'condition_0', 174 => 'condition_1']], - + ["SELECT * FROM Foo WHERE (foo.bar LIKE :condition_0 ESCAPE '\') AND (foo.baz = :condition_1) AND (foo.bak LIKE :condition_2 ESCAPE '\')", false, [38 => 'condition_0', 78 => 'condition_1', 110 => 'condition_2']], ]; } From bcf78d5ea262e18510c944c5983ae1218c4f1800 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 5 Dec 2019 15:28:46 +0100 Subject: [PATCH 08/29] Fix regex for escaped literals Signed-off-by: Christoph Wurst --- lib/Doctrine/DBAL/SQLParserUtils.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/DBAL/SQLParserUtils.php b/lib/Doctrine/DBAL/SQLParserUtils.php index 9768883846e..0807308ad59 100644 --- a/lib/Doctrine/DBAL/SQLParserUtils.php +++ b/lib/Doctrine/DBAL/SQLParserUtils.php @@ -31,9 +31,9 @@ class SQLParserUtils public const POSITIONAL_TOKEN = '\?'; public const NAMED_TOKEN = '(? Date: Sun, 19 Jan 2020 21:43:57 +0100 Subject: [PATCH 09/29] Fix the documentation of the driver option --- lib/Doctrine/DBAL/DriverManager.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/Doctrine/DBAL/DriverManager.php b/lib/Doctrine/DBAL/DriverManager.php index 6888d73b0c4..31fc8ea12f9 100644 --- a/lib/Doctrine/DBAL/DriverManager.php +++ b/lib/Doctrine/DBAL/DriverManager.php @@ -88,20 +88,7 @@ private function __construct() * * $params must contain at least one of the following. * - * Either 'driver' with one of the following values: - * - * pdo_mysql - * pdo_sqlite - * pdo_pgsql - * pdo_oci (unstable) - * pdo_sqlsrv - * pdo_sqlsrv - * mysqli - * sqlanywhere - * sqlsrv - * ibm_db2 (unstable) - * drizzle_pdo_mysql - * + * Either 'driver' with one of the array keys of {@link $_driverMap}, * OR 'driverClass' that contains the full class name (with namespace) of the * driver class to instantiate. * From 9a214ffb4974216800d49733c56127f662868807 Mon Sep 17 00:00:00 2001 From: Peter Gribanov Date: Mon, 3 Feb 2020 16:23:45 +0300 Subject: [PATCH 10/29] Allow add previous exception in ConversionException --- .../DBAL/Types/ConversionException.php | 16 ++++++++----- .../DBAL/Types/ConversionExceptionTest.php | 24 +++++++++++++++++-- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/lib/Doctrine/DBAL/Types/ConversionException.php b/lib/Doctrine/DBAL/Types/ConversionException.php index b9f8a82e7ec..87f79a91cdc 100644 --- a/lib/Doctrine/DBAL/Types/ConversionException.php +++ b/lib/Doctrine/DBAL/Types/ConversionException.php @@ -26,11 +26,11 @@ class ConversionException extends DBALException * * @return \Doctrine\DBAL\Types\ConversionException */ - public static function conversionFailed($value, $toType) + public static function conversionFailed($value, $toType, ?Throwable $previous = null) { $value = strlen($value) > 32 ? substr($value, 0, 20) . '...' : $value; - return new self('Could not convert database value "' . $value . '" to Doctrine Type ' . $toType); + return new self('Could not convert database value "' . $value . '" to Doctrine Type ' . $toType, 0, $previous); } /** @@ -64,8 +64,12 @@ public static function conversionFailedFormat($value, $toType, $expectedFormat, * * @return \Doctrine\DBAL\Types\ConversionException */ - public static function conversionFailedInvalidType($value, $toType, array $possibleTypes) - { + public static function conversionFailedInvalidType( + $value, + $toType, + array $possibleTypes, + ?Throwable $previous = null + ) { $actualType = is_object($value) ? get_class($value) : gettype($value); if (is_scalar($value)) { @@ -75,7 +79,7 @@ public static function conversionFailedInvalidType($value, $toType, array $possi $actualType, $toType, implode(', ', $possibleTypes) - )); + ), 0, $previous); } return new self(sprintf( @@ -83,7 +87,7 @@ public static function conversionFailedInvalidType($value, $toType, array $possi $actualType, $toType, implode(', ', $possibleTypes) - )); + ), 0, $previous); } public static function conversionFailedSerialization($value, $format, $error) diff --git a/tests/Doctrine/Tests/DBAL/Types/ConversionExceptionTest.php b/tests/Doctrine/Tests/DBAL/Types/ConversionExceptionTest.php index e7fa8a4be03..f8003c5c617 100644 --- a/tests/Doctrine/Tests/DBAL/Types/ConversionExceptionTest.php +++ b/tests/Doctrine/Tests/DBAL/Types/ConversionExceptionTest.php @@ -3,13 +3,23 @@ namespace Doctrine\Tests\DBAL\Types; use Doctrine\DBAL\Types\ConversionException; -use Exception; use PHPUnit\Framework\TestCase; use stdClass; +use Throwable; use function tmpfile; class ConversionExceptionTest extends TestCase { + public function testConversionFailedPreviousException() : void + { + $previous = $this->createMock(Throwable::class); + + $exception = ConversionException::conversionFailed('foo', 'foo', $previous); + + self::assertInstanceOf(ConversionException::class, $exception); + self::assertSame($previous, $exception->getPrevious()); + } + /** * @param mixed $scalarValue * @@ -44,9 +54,19 @@ public function testConversionFailedInvalidTypeWithNonScalar($nonScalar) : void ); } + public function testConversionFailedInvalidTypePreviousException() : void + { + $previous = $this->createMock(Throwable::class); + + $exception = ConversionException::conversionFailedInvalidType('foo', 'foo', ['bar', 'baz'], $previous); + + self::assertInstanceOf(ConversionException::class, $exception); + self::assertSame($previous, $exception->getPrevious()); + } + public function testConversionFailedFormatPreservesPreviousException() : void { - $previous = new Exception(); + $previous = $this->createMock(Throwable::class); $exception = ConversionException::conversionFailedFormat('foo', 'bar', 'baz', $previous); From c3286d8021464e0219618f0a6c6a0bfc339e4255 Mon Sep 17 00:00:00 2001 From: Andrii Dembitskyi Date: Fri, 21 Feb 2020 14:26:13 +0200 Subject: [PATCH 11/29] Add missed end of comment --- docs/en/reference/sharding.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/reference/sharding.rst b/docs/en/reference/sharding.rst index dcdd7d8f660..2b2f804da53 100644 --- a/docs/en/reference/sharding.rst +++ b/docs/en/reference/sharding.rst @@ -160,7 +160,7 @@ following code in Doctrine: use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Id\TableGenerator; - $conn = DriverManager::getConnection(/**..**); // connection 1 + $conn = DriverManager::getConnection(/**..**/); // connection 1 // creating the TableGenerator automatically opens a second connection. $tableGenerator = new TableGenerator($conn, "sequences_tbl_name"); From 354524f919e0c8cc3b146bb83ce152b13fb2d9b9 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Mon, 22 Apr 2019 18:48:35 -0700 Subject: [PATCH 12/29] Switching Travis CI builds to Ubuntu Xenial Xerus --- .travis.yml | 33 +++++++------- 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(+), 20 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 cac4d984d59..5223ed3c39e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: php -sudo: false -dist: trusty +dist: xenial cache: directories: @@ -112,6 +111,8 @@ jobs: - stage: Test php: 7.3 env: DB=mysql COVERAGE=yes + services: + - mysql - stage: Test php: 7.3 env: DB=mysql.docker MYSQL_VERSION=5.7 COVERAGE=yes @@ -129,6 +130,8 @@ jobs: - stage: Test php: 7.3 env: DB=mysqli COVERAGE=yes + services: + - mysql - stage: Test php: 7.3 env: DB=mysqli.docker MYSQL_VERSION=5.7 COVERAGE=yes @@ -150,9 +153,11 @@ jobs: mariadb: 10.0 - stage: Test php: 7.3 - 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.3 env: DB=mariadb MARIADB_VERSION=10.2 COVERAGE=yes @@ -170,9 +175,11 @@ jobs: mariadb: 10.0 - stage: Test php: 7.3 - 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.3 env: DB=mariadb.mysqli MARIADB_VERSION=10.2 COVERAGE=yes @@ -200,32 +207,24 @@ jobs: - stage: Test php: 7.3 env: DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes - services: - - postgresql addons: postgresql: "9.4" - stage: Test php: 7.3 env: DB=pgsql POSTGRESQL_VERSION=9.5 COVERAGE=yes - services: - - postgresql addons: postgresql: "9.5" - stage: Test php: 7.3 env: DB=pgsql POSTGRESQL_VERSION=9.6 COVERAGE=yes - services: - - postgresql addons: postgresql: "9.6" - stage: Test php: 7.3 env: DB=pgsql POSTGRESQL_VERSION=10.0 COVERAGE=yes sudo: required - services: - - postgresql addons: - postgresql: "9.6" + 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 5c858c48fc8d5cbc7451c5b3cbac6064a2339be3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Thu, 27 Feb 2020 21:23:56 +0100 Subject: [PATCH 13/29] Stop testing unsupported versions See https://www.postgresql.org/support/versioning/ See https://mariadb.com/kb/en/mariadb-server/ --- .travis.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5223ed3c39e..8048a7be510 100644 --- a/.travis.yml +++ b/.travis.yml @@ -146,11 +146,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.docker MARIADB_VERSION=10.1 COVERAGE=yes @@ -168,11 +163,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.docker MARIADB_VERSION=10.1 COVERAGE=yes @@ -190,20 +180,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 - services: - - postgresql - addons: - postgresql: "9.3" - stage: Test php: 7.3 env: DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes From 8ed87e16dc90d074a8670ec689b25807c4ab9ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Fri, 28 Feb 2020 22:01:51 +0100 Subject: [PATCH 14/29] Use Docker consistently When a Docker version of the build is available, use it. --- .travis.yml | 74 ++++++++++++++------------ tests/travis/mariadb.mysqli.travis.xml | 45 ---------------- tests/travis/mariadb.travis.xml | 45 ---------------- tests/travis/mysql.travis.xml | 45 ---------------- tests/travis/mysqli.travis.xml | 45 ---------------- 5 files changed, 40 insertions(+), 214 deletions(-) delete mode 100644 tests/travis/mariadb.mysqli.travis.xml delete mode 100644 tests/travis/mariadb.travis.xml delete mode 100644 tests/travis/mysql.travis.xml delete mode 100644 tests/travis/mysqli.travis.xml diff --git a/.travis.yml b/.travis.yml index 8048a7be510..c679c005ccf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,14 +69,18 @@ jobs: - bash ./tests/travis/install-mysql-8.0.sh - stage: Test php: 7.2 - env: DB=mariadb MARIADB_VERSION=10.3 - addons: - mariadb: 10.3 + env: DB=mariadb.docker MARIADB_VERSION=10.3 + services: + - docker + before_script: + - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.2 - env: DB=mariadb.mysqli MARIADB_VERSION=10.3 - addons: - mariadb: 10.3 + env: DB=mariadb.mysqli.docker MARIADB_VERSION=10.3 + services: + - docker + before_script: + - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.2 env: DB=pgsql POSTGRESQL_VERSION=11.0 @@ -108,11 +112,6 @@ 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.3 - env: DB=mysql COVERAGE=yes - services: - - mysql - stage: Test php: 7.3 env: DB=mysql.docker MYSQL_VERSION=5.7 COVERAGE=yes @@ -127,11 +126,6 @@ jobs: - docker before_script: - bash ./tests/travis/install-mysql-8.0.sh - - stage: Test - php: 7.3 - env: DB=mysqli COVERAGE=yes - services: - - mysql - stage: Test php: 7.3 env: DB=mysqli.docker MYSQL_VERSION=5.7 COVERAGE=yes @@ -155,14 +149,18 @@ jobs: - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.3 - env: DB=mariadb MARIADB_VERSION=10.2 COVERAGE=yes - addons: - mariadb: 10.2 + env: DB=mariadb.docker MARIADB_VERSION=10.2 COVERAGE=yes + services: + - docker + before_script: + - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.3 - env: DB=mariadb MARIADB_VERSION=10.3 COVERAGE=yes - addons: - mariadb: 10.3 + env: DB=mariadb.docker MARIADB_VERSION=10.3 COVERAGE=yes + services: + - docker + before_script: + - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.3 env: DB=mariadb.mysqli.docker MARIADB_VERSION=10.1 COVERAGE=yes @@ -172,14 +170,18 @@ jobs: - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.3 - env: DB=mariadb.mysqli MARIADB_VERSION=10.2 COVERAGE=yes - addons: - mariadb: 10.2 + env: DB=mariadb.mysqli.docker MARIADB_VERSION=10.2 COVERAGE=yes + services: + - docker + before_script: + - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.3 - env: DB=mariadb.mysqli MARIADB_VERSION=10.3 COVERAGE=yes - addons: - mariadb: 10.3 + env: DB=mariadb.mysqli.docker MARIADB_VERSION=10.3 COVERAGE=yes + services: + - docker + before_script: + - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.3 env: DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes @@ -263,14 +265,18 @@ jobs: - bash ./tests/travis/install-mysql-8.0.sh - stage: Test php: 7.4snapshot - env: DB=mariadb MARIADB_VERSION=10.3 - addons: - mariadb: 10.3 + env: DB=mariadb.docker MARIADB_VERSION=10.3 + services: + - docker + before_script: + - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.4snapshot - env: DB=mariadb.mysqli MARIADB_VERSION=10.3 - addons: - mariadb: 10.3 + env: DB=mariadb.mysqli.docker MARIADB_VERSION=10.3 + services: + - docker + before_script: + - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.4snapshot env: DB=pgsql POSTGRESQL_VERSION=11.0 diff --git a/tests/travis/mariadb.mysqli.travis.xml b/tests/travis/mariadb.mysqli.travis.xml deleted file mode 100644 index b8bd9be01cd..00000000000 --- a/tests/travis/mariadb.mysqli.travis.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - ../Doctrine/Tests/DBAL - - - - - - ../../lib/Doctrine - - - - - - performance - locking_functional - - - diff --git a/tests/travis/mariadb.travis.xml b/tests/travis/mariadb.travis.xml deleted file mode 100644 index 0d4e2c43c9e..00000000000 --- a/tests/travis/mariadb.travis.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - ../Doctrine/Tests/DBAL - - - - - - ../../lib/Doctrine - - - - - - performance - locking_functional - - - diff --git a/tests/travis/mysql.travis.xml b/tests/travis/mysql.travis.xml deleted file mode 100644 index 0d4e2c43c9e..00000000000 --- a/tests/travis/mysql.travis.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - ../Doctrine/Tests/DBAL - - - - - - ../../lib/Doctrine - - - - - - performance - locking_functional - - - diff --git a/tests/travis/mysqli.travis.xml b/tests/travis/mysqli.travis.xml deleted file mode 100644 index b8bd9be01cd..00000000000 --- a/tests/travis/mysqli.travis.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - ../Doctrine/Tests/DBAL - - - - - - ../../lib/Doctrine - - - - - - performance - locking_functional - - - From 7475993061a92e72131bc680429411cfb76566a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Fri, 28 Feb 2020 22:15:22 +0100 Subject: [PATCH 15/29] Stop using snapshot image PHP 7.4 has stable versions now. --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index c679c005ccf..df61d4a44eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -248,7 +248,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: @@ -256,7 +256,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: @@ -264,21 +264,21 @@ jobs: before_script: - bash ./tests/travis/install-mysql-8.0.sh - stage: Test - php: 7.4snapshot + php: 7.4 env: DB=mariadb.docker MARIADB_VERSION=10.3 services: - docker before_script: - bash ./tests/travis/install-mariadb.sh - stage: Test - php: 7.4snapshot + php: 7.4 env: DB=mariadb.mysqli.docker MARIADB_VERSION=10.3 services: - docker before_script: - bash ./tests/travis/install-mariadb.sh - stage: Test - php: 7.4snapshot + php: 7.4 env: DB=pgsql POSTGRESQL_VERSION=11.0 sudo: required services: @@ -286,10 +286,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: @@ -299,7 +299,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 765432ad6c3db13433572b1166a9a80f919b0906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Fri, 28 Feb 2020 23:01:23 +0100 Subject: [PATCH 16/29] Replace external health check with native one Hopefully it will work more reliably. --- tests/travis/install-mariadb.sh | 7 ++++++- tests/travis/install-mysql-5.7.sh | 7 ++++++- tests/travis/install-mysql-8.0.sh | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/travis/install-mariadb.sh b/tests/travis/install-mariadb.sh index cda81e9bcba..b089c3b25fb 100644 --- a/tests/travis/install-mariadb.sh +++ b/tests/travis/install-mariadb.sh @@ -3,6 +3,7 @@ set -ex sudo docker run \ + --health-cmd='mysqladmin ping --silent' \ -d \ -e MYSQL_ALLOW_EMPTY_PASSWORD=yes \ -e MYSQL_DATABASE=doctrine_tests \ @@ -10,4 +11,8 @@ sudo docker run \ --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' +until [ "$(sudo docker inspect --format "{{json .State.Health.Status }}" mariadb)" == "\"healthy\"" ] +do + echo "Waiting for MariaDB to become ready…" + sleep 1 +done diff --git a/tests/travis/install-mysql-5.7.sh b/tests/travis/install-mysql-5.7.sh index 25459382c6f..8967166635a 100644 --- a/tests/travis/install-mysql-5.7.sh +++ b/tests/travis/install-mysql-5.7.sh @@ -5,6 +5,7 @@ set -ex echo "Starting MySQL 5.7..." sudo docker run \ + --health-cmd='mysqladmin ping --silent' \ -d \ -e MYSQL_ALLOW_EMPTY_PASSWORD=yes \ -e MYSQL_DATABASE=doctrine_tests \ @@ -12,4 +13,8 @@ sudo docker run \ --name mysql57 \ mysql:5.7 -sudo docker exec -i mysql57 bash <<< 'until echo \\q | mysql doctrine_tests > /dev/null 2>&1 ; do sleep 1; done' +until [ "$(sudo docker inspect --format "{{json .State.Health.Status }}" mysql57)" == "\"healthy\"" ] +do + echo "Waiting for MySQL to become ready…" + sleep 1 +done diff --git a/tests/travis/install-mysql-8.0.sh b/tests/travis/install-mysql-8.0.sh index 952a4300ba7..79d72a263c8 100644 --- a/tests/travis/install-mysql-8.0.sh +++ b/tests/travis/install-mysql-8.0.sh @@ -6,6 +6,7 @@ echo "Starting MySQL 8.0..." sudo docker pull mysql:8.0 sudo docker run \ + --health-cmd='mysqladmin ping --silent' \ -d \ -e MYSQL_ALLOW_EMPTY_PASSWORD=yes \ -e MYSQL_DATABASE=doctrine_tests \ @@ -14,4 +15,8 @@ sudo docker run \ mysql:8.0 \ --default-authentication-plugin=mysql_native_password -sudo docker exec -i mysql80 bash <<< 'until echo \\q | mysql doctrine_tests > /dev/null 2>&1 ; do sleep 1; done' +until [ "$(sudo docker inspect --format "{{json .State.Health.Status }}" mysql80)" == "\"healthy\"" ] +do + echo "Waiting for MySQL to become ready…" + sleep 1 +done From e7aef4e8ba64ff5ba72ea427cfa2a09b42801522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sat, 29 Feb 2020 11:30:33 +0100 Subject: [PATCH 17/29] Refactor MySQL and MariaDB run in a single script --- .travis.yml | 86 ++++++--------------- tests/travis/create-mysql-schema.sql | 10 --- tests/travis/docker-run-mysql-or-mariadb.sh | 42 ++++++++++ tests/travis/install-mariadb.sh | 18 ----- tests/travis/install-mysql-5.7.sh | 20 ----- tests/travis/install-mysql-8.0.sh | 22 ------ 6 files changed, 65 insertions(+), 133 deletions(-) delete mode 100644 tests/travis/create-mysql-schema.sql create mode 100644 tests/travis/docker-run-mysql-or-mariadb.sh delete mode 100644 tests/travis/install-mariadb.sh delete mode 100644 tests/travis/install-mysql-5.7.sh delete mode 100644 tests/travis/install-mysql-8.0.sh diff --git a/.travis.yml b/.travis.yml index df61d4a44eb..63fe477c054 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,11 @@ before_install: fi before_script: - - if [[ "$DB" == "mysql" || "$DB" == "mysqli" || "$DB" == *"mariadb"* ]]; then mysql < tests/travis/create-mysql-schema.sql; fi; + - | + if [[ -n "$IMAGE" ]] + then + bash ./tests/travis/docker-run-mysql-or-mariadb.sh + fi install: - travis_retry composer -n install --prefer-dist @@ -53,34 +57,24 @@ jobs: - stage: Test php: 7.2 - env: DB=mysql.docker MYSQL_VERSION=8.0 - sudo: required + env: DB=mysql.docker IMAGE=mysql:8.0 services: - docker - before_script: - - bash ./tests/travis/install-mysql-8.0.sh - stage: Test php: 7.2 - env: DB=mysqli.docker MYSQL_VERSION=8.0 - sudo: required + env: DB=mysqli.docker IMAGE=mysql:8.0 services: - docker - before_script: - - bash ./tests/travis/install-mysql-8.0.sh - stage: Test php: 7.2 - env: DB=mariadb.docker MARIADB_VERSION=10.3 + env: DB=mariadb.docker IMAGE=mariadb:10.3 services: - docker - before_script: - - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.2 - env: DB=mariadb.mysqli.docker MARIADB_VERSION=10.3 + env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.3 services: - docker - before_script: - - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.2 env: DB=pgsql POSTGRESQL_VERSION=11.0 @@ -114,74 +108,50 @@ jobs: - bash ./tests/travis/install-mssql.sh - stage: Test php: 7.3 - env: DB=mysql.docker MYSQL_VERSION=5.7 COVERAGE=yes - sudo: required - before_script: - - bash ./tests/travis/install-mysql-5.7.sh + env: DB=mysql.docker IMAGE=mysql:5.7 COVERAGE=yes - stage: Test php: 7.3 - env: DB=mysql.docker MYSQL_VERSION=8.0 COVERAGE=yes - sudo: required + env: DB=mysql.docker IMAGE=mysql:8.0 COVERAGE=yes services: - docker - before_script: - - bash ./tests/travis/install-mysql-8.0.sh - stage: Test php: 7.3 - env: DB=mysqli.docker MYSQL_VERSION=5.7 COVERAGE=yes - sudo: required - before_script: - - bash ./tests/travis/install-mysql-5.7.sh + env: DB=mysqli.docker IMAGE=mysql:5.7 COVERAGE=yes - stage: Test php: 7.3 - env: DB=mysqli.docker MYSQL_VERSION=8.0 COVERAGE=yes - sudo: required + env: DB=mysqli.docker IMAGE=mysql:8.0 COVERAGE=yes services: - docker - before_script: - - bash ./tests/travis/install-mysql-8.0.sh - stage: Test php: 7.3 - env: DB=mariadb.docker MARIADB_VERSION=10.1 COVERAGE=yes + env: DB=mariadb.docker IMAGE=mariadb:10.1 COVERAGE=yes services: - docker - before_script: - - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.3 - env: DB=mariadb.docker MARIADB_VERSION=10.2 COVERAGE=yes + env: DB=mariadb.docker IMAGE=mariadb:10.2 COVERAGE=yes services: - docker - before_script: - - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.3 - env: DB=mariadb.docker MARIADB_VERSION=10.3 COVERAGE=yes + env: DB=mariadb.docker IMAGE=mariadb:10.3 COVERAGE=yes services: - docker - before_script: - - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.3 - env: DB=mariadb.mysqli.docker MARIADB_VERSION=10.1 COVERAGE=yes + env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.1 COVERAGE=yes services: - docker - before_script: - - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.3 - env: DB=mariadb.mysqli.docker MARIADB_VERSION=10.2 COVERAGE=yes + env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.2 COVERAGE=yes services: - docker - before_script: - - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.3 - env: DB=mariadb.mysqli.docker MARIADB_VERSION=10.3 COVERAGE=yes + env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.3 COVERAGE=yes services: - docker - before_script: - - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.3 env: DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes @@ -249,34 +219,24 @@ jobs: - travis_retry composer update --prefer-dist --prefer-lowest - stage: Test php: 7.4 - env: DB=mysql.docker MYSQL_VERSION=8.0 - sudo: required + env: DB=mysql.docker IMAGE=mysql:8.0 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 + env: DB=mysqli.docker IMAGE=mysql:8.0 services: - docker - before_script: - - bash ./tests/travis/install-mysql-8.0.sh - stage: Test php: 7.4 - env: DB=mariadb.docker MARIADB_VERSION=10.3 + env: DB=mariadb.docker IMAGE=mariadb:10.3 services: - docker - before_script: - - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.4 - env: DB=mariadb.mysqli.docker MARIADB_VERSION=10.3 + env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.3 services: - docker - before_script: - - bash ./tests/travis/install-mariadb.sh - stage: Test php: 7.4 env: DB=pgsql POSTGRESQL_VERSION=11.0 diff --git a/tests/travis/create-mysql-schema.sql b/tests/travis/create-mysql-schema.sql deleted file mode 100644 index 78a32358065..00000000000 --- a/tests/travis/create-mysql-schema.sql +++ /dev/null @@ -1,10 +0,0 @@ -DROP USER IF EXISTS 'travis'@'%'; -CREATE USER 'travis'@'%'; - -CREATE SCHEMA doctrine_tests; -CREATE SCHEMA test_create_database; -CREATE SCHEMA test_drop_database; - -GRANT ALL PRIVILEGES ON doctrine_tests.* to travis@'%'; -GRANT ALL PRIVILEGES ON test_create_database.* to travis@'%'; -GRANT ALL PRIVILEGES ON test_drop_database.* to travis@'%'; diff --git a/tests/travis/docker-run-mysql-or-mariadb.sh b/tests/travis/docker-run-mysql-or-mariadb.sh new file mode 100644 index 00000000000..1b8d4c12772 --- /dev/null +++ b/tests/travis/docker-run-mysql-or-mariadb.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +set -ex + +echo "Starting RDBMS…">&2 + +if [[ "$IMAGE" == "mysql:8.0" ]] +then + CMD_OPTIONS="--default-authentication-plugin=mysql_native_password" +else + CMD_OPTIONS="" +fi + +docker run \ + --health-cmd='mysqladmin ping --silent' \ + --detach \ + --env MYSQL_ALLOW_EMPTY_PASSWORD=yes \ + --env MYSQL_DATABASE=doctrine_tests \ + --publish 33306:3306 \ + --name rdbms \ + "$IMAGE" $CMD_OPTIONS + +while true; do + healthStatus=$(docker inspect --format "{{json .State.Health.Status }}" rdbms) + case $healthStatus in + '"starting"') + echo "Waiting for RDBMS to become ready…">&2 + sleep 1 + ;; + '"healthy"') + echo "Container is healthy">&2 + break + ;; + '"unhealthy"') + echo "Container is unhealthy">&2 + exit 1 + ;; + *) + echo "Unexpected health status $healthStatus…">&2 + ;; + esac +done diff --git a/tests/travis/install-mariadb.sh b/tests/travis/install-mariadb.sh deleted file mode 100644 index b089c3b25fb..00000000000 --- a/tests/travis/install-mariadb.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -sudo docker run \ - --health-cmd='mysqladmin ping --silent' \ - -d \ - -e MYSQL_ALLOW_EMPTY_PASSWORD=yes \ - -e MYSQL_DATABASE=doctrine_tests \ - -p 33306:3306 \ - --name mariadb \ - mariadb:${MARIADB_VERSION} - -until [ "$(sudo docker inspect --format "{{json .State.Health.Status }}" mariadb)" == "\"healthy\"" ] -do - echo "Waiting for MariaDB to become ready…" - sleep 1 -done diff --git a/tests/travis/install-mysql-5.7.sh b/tests/travis/install-mysql-5.7.sh deleted file mode 100644 index 8967166635a..00000000000 --- a/tests/travis/install-mysql-5.7.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -echo "Starting MySQL 5.7..." - -sudo docker run \ - --health-cmd='mysqladmin ping --silent' \ - -d \ - -e MYSQL_ALLOW_EMPTY_PASSWORD=yes \ - -e MYSQL_DATABASE=doctrine_tests \ - -p 33306:3306 \ - --name mysql57 \ - mysql:5.7 - -until [ "$(sudo docker inspect --format "{{json .State.Health.Status }}" mysql57)" == "\"healthy\"" ] -do - echo "Waiting for MySQL to become ready…" - sleep 1 -done diff --git a/tests/travis/install-mysql-8.0.sh b/tests/travis/install-mysql-8.0.sh deleted file mode 100644 index 79d72a263c8..00000000000 --- a/tests/travis/install-mysql-8.0.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -echo "Starting MySQL 8.0..." - -sudo docker pull mysql:8.0 -sudo docker run \ - --health-cmd='mysqladmin ping --silent' \ - -d \ - -e MYSQL_ALLOW_EMPTY_PASSWORD=yes \ - -e MYSQL_DATABASE=doctrine_tests \ - -p 33306:3306 \ - --name mysql80 \ - mysql:8.0 \ - --default-authentication-plugin=mysql_native_password - -until [ "$(sudo docker inspect --format "{{json .State.Health.Status }}" mysql80)" == "\"healthy\"" ] -do - echo "Waiting for MySQL to become ready…" - sleep 1 -done From 6e5fbcb92fde8deba09337762cb76a55a8daed22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sat, 29 Feb 2020 17:32:30 +0100 Subject: [PATCH 18/29] Do not enable docker explicitely It seems to be enabled by default. --- .travis.yml | 52 --------------------- tests/travis/docker-run-mysql-or-mariadb.sh | 2 +- 2 files changed, 1 insertion(+), 53 deletions(-) diff --git a/.travis.yml b/.travis.yml index 63fe477c054..9fee4c4b8b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,29 +58,19 @@ jobs: - stage: Test php: 7.2 env: DB=mysql.docker IMAGE=mysql:8.0 - services: - - docker - stage: Test php: 7.2 env: DB=mysqli.docker IMAGE=mysql:8.0 - services: - - docker - stage: Test php: 7.2 env: DB=mariadb.docker IMAGE=mariadb:10.3 - services: - - docker - stage: Test php: 7.2 env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.3 - services: - - docker - stage: Test php: 7.2 env: DB=pgsql POSTGRESQL_VERSION=11.0 sudo: required - services: - - docker before_script: - bash ./tests/travis/install-postgres-11.sh - stage: Test @@ -90,8 +80,6 @@ jobs: php: 7.2 env: DB=sqlsrv sudo: required - services: - - docker before_script: - bash ./tests/travis/install-sqlsrv-dependencies.sh - bash ./tests/travis/install-mssql-sqlsrv.sh @@ -100,8 +88,6 @@ jobs: php: 7.2 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 @@ -112,46 +98,30 @@ jobs: - stage: Test php: 7.3 env: DB=mysql.docker IMAGE=mysql:8.0 COVERAGE=yes - services: - - docker - stage: Test php: 7.3 env: DB=mysqli.docker IMAGE=mysql:5.7 COVERAGE=yes - stage: Test php: 7.3 env: DB=mysqli.docker IMAGE=mysql:8.0 COVERAGE=yes - services: - - docker - stage: Test php: 7.3 env: DB=mariadb.docker IMAGE=mariadb:10.1 COVERAGE=yes - services: - - docker - stage: Test php: 7.3 env: DB=mariadb.docker IMAGE=mariadb:10.2 COVERAGE=yes - services: - - docker - stage: Test php: 7.3 env: DB=mariadb.docker IMAGE=mariadb:10.3 COVERAGE=yes - services: - - docker - stage: Test php: 7.3 env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.1 COVERAGE=yes - services: - - docker - stage: Test php: 7.3 env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.2 COVERAGE=yes - services: - - docker - stage: Test php: 7.3 env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.3 COVERAGE=yes - services: - - docker - stage: Test php: 7.3 env: DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes @@ -179,16 +149,12 @@ jobs: php: 7.3 env: DB=pgsql POSTGRESQL_VERSION=11.0 COVERAGE=yes sudo: required - services: - - docker before_script: - bash ./tests/travis/install-postgres-11.sh - stage: Test php: 7.3 env: DB=sqlsrv COVERAGE=yes sudo: required - services: - - docker before_script: - bash ./tests/travis/install-sqlsrv-dependencies.sh - bash ./tests/travis/install-mssql-sqlsrv.sh @@ -197,8 +163,6 @@ jobs: php: 7.3 env: DB=pdo_sqlsrv COVERAGE=yes sudo: required - services: - - docker before_script: - bash ./tests/travis/install-sqlsrv-dependencies.sh - bash ./tests/travis/install-mssql-pdo_sqlsrv.sh @@ -207,8 +171,6 @@ jobs: php: 7.3 env: DB=ibm_db2 COVERAGE=yes sudo: required - services: - - docker before_script: - bash ./tests/travis/install-db2.sh - bash ./tests/travis/install-db2-ibm_db2.sh @@ -220,29 +182,19 @@ jobs: - stage: Test php: 7.4 env: DB=mysql.docker IMAGE=mysql:8.0 - services: - - docker - stage: Test php: 7.4 env: DB=mysqli.docker IMAGE=mysql:8.0 - services: - - docker - stage: Test php: 7.4 env: DB=mariadb.docker IMAGE=mariadb:10.3 - services: - - docker - stage: Test php: 7.4 env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.3 - services: - - docker - 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 @@ -252,8 +204,6 @@ jobs: 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 @@ -262,8 +212,6 @@ jobs: 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 diff --git a/tests/travis/docker-run-mysql-or-mariadb.sh b/tests/travis/docker-run-mysql-or-mariadb.sh index 1b8d4c12772..a78ce4adb6e 100644 --- a/tests/travis/docker-run-mysql-or-mariadb.sh +++ b/tests/travis/docker-run-mysql-or-mariadb.sh @@ -36,7 +36,7 @@ while true; do exit 1 ;; *) - echo "Unexpected health status $healthStatus…">&2 + echo "Unexpected health status $healthStatus">&2 ;; esac done From 398f23eace85bd0f67e2dcb9ed23c0ca1e3a42a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sat, 29 Feb 2020 19:04:04 +0100 Subject: [PATCH 19/29] Synchronize the number of code coverage runs --- .scrutinizer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index a3b8a5621ca..aeca6bd5d5c 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: 24 # 19x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 2x ContinuousPHP filter: excluded_paths: From 6e505dec525530b406d0090b8d7a90a1952edf03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sat, 29 Feb 2020 21:02:05 +0100 Subject: [PATCH 20/29] Continue testing unsupported versions They are no longer supported by their vendors, but until we do support them, we should continue testing them. --- .scrutinizer.yml | 2 +- .travis.yml | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index aeca6bd5d5c..cb9872f6761 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -21,7 +21,7 @@ before_commands: tools: external_code_coverage: timeout: 3600 - runs: 24 # 19x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 2x ContinuousPHP + runs: 28 # 23x 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 9fee4c4b8b6..823fd073e72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -104,6 +104,9 @@ jobs: - stage: Test php: 7.3 env: DB=mysqli.docker IMAGE=mysql:8.0 COVERAGE=yes + - stage: Test + php: 7.3 + env: DB=mariadb.docker IMAGE=mariadb:10.0 COVERAGE=yes - stage: Test php: 7.3 env: DB=mariadb.docker IMAGE=mariadb:10.1 COVERAGE=yes @@ -113,6 +116,9 @@ jobs: - stage: Test php: 7.3 env: DB=mariadb.docker IMAGE=mariadb:10.3 COVERAGE=yes + - stage: Test + php: 7.3 + env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.0 COVERAGE=yes - stage: Test php: 7.3 env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.1 COVERAGE=yes @@ -122,6 +128,22 @@ jobs: - stage: Test php: 7.3 env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.3 COVERAGE=yes + - stage: Test + dist: trusty + php: 7.3 + env: DB=pgsql POSTGRESQL_VERSION=9.2 COVERAGE=yes + services: + - postgresql + addons: + postgresql: "9.2" + - stage: Test + dist: trusty + 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 From 17159482f07a8f0d070d5626c628987a9fc6ca0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sat, 29 Feb 2020 21:54:24 +0100 Subject: [PATCH 21/29] Display badges for current branch --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 7495d20d7ee..4b488db9d9a 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Doctrine DBAL -| [Master][Master] | [2.9][2.9] | [Develop][develop] | +| [Master][Master] | [2.10][2.10] | [Develop][develop] | |:----------------:|:----------:|:------------------:| -| [![Build status][Master image]][Master] | [![Build status][2.9 image]][2.9] | [![Build status][develop image]][develop] | -| [![Build Status][ContinuousPHP image]][ContinuousPHP] | [![Build Status][ContinuousPHP 2.9 image]][ContinuousPHP] | [![Build Status][ContinuousPHP develop image]][ContinuousPHP] | -| [![Code Coverage][Coverage image]][Scrutinizer Master] | [![Code Coverage][Coverage 2.9 image]][Scrutinizer 2.9] | [![Code Coverage][Coverage develop image]][Scrutinizer develop] | -| [![Code Quality][Quality image]][Scrutinizer Master] | [![Code Quality][Quality 2.9 image]][Scrutinizer 2.9] | [![Code Quality][Quality develop image]][Scrutinizer develop] | -| [![AppVeyor][AppVeyor master image]][AppVeyor master] | [![AppVeyor][AppVeyor 2.9 image]][AppVeyor 2.9] | [![AppVeyor][AppVeyor develop image]][AppVeyor develop] | +| [![Build status][Master image]][Master] | [![Build status][2.10 image]][2.10] | [![Build status][develop image]][develop] | +| [![Build Status][ContinuousPHP image]][ContinuousPHP] | [![Build Status][ContinuousPHP 2.10 image]][ContinuousPHP] | [![Build Status][ContinuousPHP develop image]][ContinuousPHP] | +| [![Code Coverage][Coverage image]][Scrutinizer Master] | [![Code Coverage][Coverage 2.10 image]][Scrutinizer 2.10] | [![Code Coverage][Coverage develop image]][Scrutinizer develop] | +| [![Code Quality][Quality image]][Scrutinizer Master] | [![Code Quality][Quality 2.10 image]][Scrutinizer 2.10] | [![Code Quality][Quality develop image]][Scrutinizer develop] | +| [![AppVeyor][AppVeyor master image]][AppVeyor master] | [![AppVeyor][AppVeyor 2.10 image]][AppVeyor 2.10] | [![AppVeyor][AppVeyor develop image]][AppVeyor develop] | Powerful database abstraction layer with many features for database schema introspection, schema management and PDO abstraction. @@ -26,14 +26,14 @@ Powerful database abstraction layer with many features for database schema intro [AppVeyor master image]: https://ci.appveyor.com/api/projects/status/i88kitq8qpbm0vie/branch/master?svg=true [ContinuousPHP]: https://continuousphp.com/git-hub/doctrine/dbal - [2.9 image]: https://img.shields.io/travis/doctrine/dbal/2.9.svg?style=flat-square - [Coverage 2.9 image]: https://img.shields.io/scrutinizer/coverage/g/doctrine/dbal/2.9.svg?style=flat-square - [Quality 2.9 image]: https://img.shields.io/scrutinizer/g/doctrine/dbal/2.9.svg?style=flat-square - [ContinuousPHP 2.9 image]: https://img.shields.io/continuousphp/git-hub/doctrine/dbal/2.9.svg?style=flat-square - [2.9]: https://github.com/doctrine/dbal/tree/2.9 - [Scrutinizer 2.9]: https://scrutinizer-ci.com/g/doctrine/dbal/?branch=2.9 - [AppVeyor 2.9]: https://ci.appveyor.com/project/doctrine/dbal/branch/2.9 - [AppVeyor 2.9 image]: https://ci.appveyor.com/api/projects/status/i88kitq8qpbm0vie/branch/2.9?svg=true + [2.10 image]: https://img.shields.io/travis/doctrine/dbal/2.10.x.svg?style=flat-square + [Coverage 2.10 image]: https://img.shields.io/scrutinizer/coverage/g/doctrine/dbal/2.10.x.svg?style=flat-square + [Quality 2.10 image]: https://img.shields.io/scrutinizer/g/doctrine/dbal/2.10.x.svg?style=flat-square + [ContinuousPHP 2.10 image]: https://img.shields.io/continuousphp/git-hub/doctrine/dbal/2.10.x.svg?style=flat-square + [2.10]: https://github.com/doctrine/dbal/tree/2.10.x + [Scrutinizer 2.10]: https://scrutinizer-ci.com/g/doctrine/dbal/?branch=2.10.x + [AppVeyor 2.10]: https://ci.appveyor.com/project/doctrine/dbal/branch/2.10.x + [AppVeyor 2.10 image]: https://ci.appveyor.com/api/projects/status/i88kitq8qpbm0vie/branch/2.10.x?svg=true [develop]: https://github.com/doctrine/dbal/tree/develop [develop image]: https://img.shields.io/travis/doctrine/dbal/develop.svg?style=flat-square From b8e2c28b3d2222c92cc1d769dd2075180ac10ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sat, 29 Feb 2020 21:55:37 +0100 Subject: [PATCH 22/29] Remove column about develop This branch seems to have been removed. --- README.md | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 4b488db9d9a..37ffcad5734 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Doctrine DBAL -| [Master][Master] | [2.10][2.10] | [Develop][develop] | -|:----------------:|:----------:|:------------------:| -| [![Build status][Master image]][Master] | [![Build status][2.10 image]][2.10] | [![Build status][develop image]][develop] | -| [![Build Status][ContinuousPHP image]][ContinuousPHP] | [![Build Status][ContinuousPHP 2.10 image]][ContinuousPHP] | [![Build Status][ContinuousPHP develop image]][ContinuousPHP] | -| [![Code Coverage][Coverage image]][Scrutinizer Master] | [![Code Coverage][Coverage 2.10 image]][Scrutinizer 2.10] | [![Code Coverage][Coverage develop image]][Scrutinizer develop] | -| [![Code Quality][Quality image]][Scrutinizer Master] | [![Code Quality][Quality 2.10 image]][Scrutinizer 2.10] | [![Code Quality][Quality develop image]][Scrutinizer develop] | -| [![AppVeyor][AppVeyor master image]][AppVeyor master] | [![AppVeyor][AppVeyor 2.10 image]][AppVeyor 2.10] | [![AppVeyor][AppVeyor develop image]][AppVeyor develop] | +| [Master][Master] | [2.10][2.10] | +|:----------------:|:----------:| +| [![Build status][Master image]][Master] | [![Build status][2.10 image]][2.10] | +| [![Build Status][ContinuousPHP image]][ContinuousPHP] | [![Build Status][ContinuousPHP 2.10 image]][ContinuousPHP] | +| [![Code Coverage][Coverage image]][Scrutinizer Master] | [![Code Coverage][Coverage 2.10 image]][Scrutinizer 2.10] | +| [![Code Quality][Quality image]][Scrutinizer Master] | [![Code Quality][Quality 2.10 image]][Scrutinizer 2.10] | +| [![AppVeyor][AppVeyor master image]][AppVeyor master] | [![AppVeyor][AppVeyor 2.10 image]][AppVeyor 2.10] | Powerful database abstraction layer with many features for database schema introspection, schema management and PDO abstraction. @@ -34,13 +34,3 @@ Powerful database abstraction layer with many features for database schema intro [Scrutinizer 2.10]: https://scrutinizer-ci.com/g/doctrine/dbal/?branch=2.10.x [AppVeyor 2.10]: https://ci.appveyor.com/project/doctrine/dbal/branch/2.10.x [AppVeyor 2.10 image]: https://ci.appveyor.com/api/projects/status/i88kitq8qpbm0vie/branch/2.10.x?svg=true - - [develop]: https://github.com/doctrine/dbal/tree/develop - [develop image]: https://img.shields.io/travis/doctrine/dbal/develop.svg?style=flat-square - [Coverage develop image]: https://img.shields.io/scrutinizer/coverage/g/doctrine/dbal/develop.svg?style=flat-square - [Quality develop image]: https://img.shields.io/scrutinizer/g/doctrine/dbal/develop.svg?style=flat-square - [ContinuousPHP develop image]: https://img.shields.io/continuousphp/git-hub/doctrine/dbal/develop.svg?style=flat-square - [develop]: https://github.com/doctrine/dbal/tree/develop - [Scrutinizer develop]: https://scrutinizer-ci.com/g/doctrine/dbal/?branch=develop - [AppVeyor develop]: https://ci.appveyor.com/project/doctrine/dbal/branch/develop - [AppVeyor develop image]: https://ci.appveyor.com/api/projects/status/i88kitq8qpbm0vie/branch/develop?svg=true From 21512f9ef5ee1b4acccb553f4b474cd0715ae628 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Mon, 2 Mar 2020 20:07:23 -0800 Subject: [PATCH 23/29] Make sure that the $types array has the same keys $params This will allow to omit parameters with unspecified types --- lib/Doctrine/DBAL/SQLParserUtils.php | 6 + .../Tests/DBAL/SQLParserUtilsTest.php | 118 +++++++++--------- 2 files changed, 67 insertions(+), 57 deletions(-) diff --git a/lib/Doctrine/DBAL/SQLParserUtils.php b/lib/Doctrine/DBAL/SQLParserUtils.php index 0807308ad59..6329a84e20d 100644 --- a/lib/Doctrine/DBAL/SQLParserUtils.php +++ b/lib/Doctrine/DBAL/SQLParserUtils.php @@ -4,7 +4,9 @@ use const PREG_OFFSET_CAPTURE; use function array_fill; +use function array_fill_keys; use function array_key_exists; +use function array_keys; use function array_merge; use function array_slice; use function array_values; @@ -131,6 +133,10 @@ public static function expandListParameters($query, $params, $types) $bindIndex = -1; if ($isPositional) { + // make sure that $types has the same keys as $params + // to allow omitting parameters with unspecified types + $types += array_fill_keys(array_keys($params), null); + ksort($params); ksort($types); } diff --git a/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php b/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php index ba087eaa28d..a582a272dd1 100644 --- a/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php +++ b/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php @@ -110,8 +110,7 @@ public function testGetPlaceholderPositions(string $query, bool $isPositional, a public static function dataExpandListParameters() : iterable { return [ - // Positional: Very simple with one needle - [ + 'Positional: Very simple with one needle' => [ 'SELECT * FROM Foo WHERE foo IN (?)', [[1, 2, 3]], [Connection::PARAM_INT_ARRAY], @@ -119,8 +118,7 @@ public static function dataExpandListParameters() : iterable [1, 2, 3], [ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER], ], - // Positional: One non-list before d one after list-needle - [ + 'Positional: One non-list before d one after list-needle' => [ 'SELECT * FROM Foo WHERE foo = ? AND bar IN (?)', ['string', [1, 2, 3]], [ParameterType::STRING, Connection::PARAM_INT_ARRAY], @@ -128,8 +126,7 @@ public static function dataExpandListParameters() : iterable ['string', 1, 2, 3], [ParameterType::STRING, ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER], ], - // Positional: One non-list after list-needle - [ + 'Positional: One non-list after list-needle' => [ 'SELECT * FROM Foo WHERE bar IN (?) AND baz = ?', [[1, 2, 3], 'foo'], [Connection::PARAM_INT_ARRAY, ParameterType::STRING], @@ -137,8 +134,7 @@ public static function dataExpandListParameters() : iterable [1, 2, 3, 'foo'], [ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::STRING], ], - // Positional: One non-list before and one after list-needle - [ + 'Positional: One non-list before and one after list-needle' => [ 'SELECT * FROM Foo WHERE foo = ? AND bar IN (?) AND baz = ?', [1, [1, 2, 3], 4], [ParameterType::INTEGER, Connection::PARAM_INT_ARRAY, ParameterType::INTEGER], @@ -152,8 +148,7 @@ public static function dataExpandListParameters() : iterable ParameterType::INTEGER, ], ], - // Positional: Two lists - [ + 'Positional: Two lists' => [ 'SELECT * FROM Foo WHERE foo IN (?, ?)', [[1, 2, 3], [4, 5]], [Connection::PARAM_INT_ARRAY, Connection::PARAM_INT_ARRAY], @@ -167,8 +162,7 @@ public static function dataExpandListParameters() : iterable ParameterType::INTEGER, ], ], - // Positional: Empty "integer" array DDC-1978 - [ + 'Positional: Empty "integer" array (DDC-1978)' => [ 'SELECT * FROM Foo WHERE foo IN (?)', [[]], [Connection::PARAM_INT_ARRAY], @@ -176,8 +170,7 @@ public static function dataExpandListParameters() : iterable [], [], ], - // Positional: Empty "str" array DDC-1978 - [ + 'Positional: Empty "str" array (DDC-1978)' => [ 'SELECT * FROM Foo WHERE foo IN (?)', [[]], [Connection::PARAM_STR_ARRAY], @@ -185,17 +178,15 @@ public static function dataExpandListParameters() : iterable [], [], ], - // Positional: explicit keys for params and types - [ + 'Positional: explicit keys for params and types' => [ 'SELECT * FROM Foo WHERE foo = ? AND bar = ? AND baz = ?', [1 => 'bar', 2 => 'baz', 0 => 1], [2 => ParameterType::STRING, 1 => ParameterType::STRING], 'SELECT * FROM Foo WHERE foo = ? AND bar = ? AND baz = ?', [1 => 'bar', 0 => 1, 2 => 'baz'], - [1 => ParameterType::STRING, 2 => ParameterType::STRING], + [1 => ParameterType::STRING, 2 => ParameterType::STRING, 0 => null], ], - // Positional: explicit keys for array params and array types - [ + 'Positional: explicit keys for array params and array types' => [ 'SELECT * FROM Foo WHERE foo IN (?) AND bar IN (?) AND baz = ?', [1 => ['bar1', 'bar2'], 2 => true, 0 => [1, 2, 3]], [2 => ParameterType::BOOLEAN, 1 => Connection::PARAM_STR_ARRAY, 0 => Connection::PARAM_INT_ARRAY], @@ -210,8 +201,7 @@ public static function dataExpandListParameters() : iterable ParameterType::BOOLEAN, ], ], - // Positional starts from 1: One non-list before and one after list-needle - [ + 'Positional starts from 1: One non-list before and one after list-needle' => [ 'SELECT * FROM Foo WHERE foo = ? AND bar IN (?) AND baz = ? AND foo IN (?)', [1 => 1, 2 => [1, 2, 3], 3 => 4, 4 => [5, 6]], [ @@ -232,8 +222,7 @@ public static function dataExpandListParameters() : iterable ParameterType::INTEGER, ], ], - // Named parameters : Very simple with param int - [ + 'Named: Very simple with param int' => [ 'SELECT * FROM Foo WHERE foo = :foo', ['foo' => 1], ['foo' => ParameterType::INTEGER], @@ -241,9 +230,7 @@ public static function dataExpandListParameters() : iterable [1], [ParameterType::INTEGER], ], - - // Named parameters : Very simple with param int and string - [ + 'Named: Very simple with param int and string' => [ 'SELECT * FROM Foo WHERE foo = :foo AND bar = :bar', ['bar' => 'Some String','foo' => 1], ['foo' => ParameterType::INTEGER, 'bar' => ParameterType::STRING], @@ -251,8 +238,7 @@ public static function dataExpandListParameters() : iterable [1,'Some String'], [ParameterType::INTEGER, ParameterType::STRING], ], - // Named parameters : Very simple with one needle - [ + 'Named: Very simple with one needle' => [ 'SELECT * FROM Foo WHERE foo IN (:foo)', ['foo' => [1, 2, 3]], ['foo' => Connection::PARAM_INT_ARRAY], @@ -260,8 +246,7 @@ public static function dataExpandListParameters() : iterable [1, 2, 3], [ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER], ], - // Named parameters: One non-list before d one after list-needle - [ + 'Named: One non-list before d one after list-needle' => [ 'SELECT * FROM Foo WHERE foo = :foo AND bar IN (:bar)', ['foo' => 'string', 'bar' => [1, 2, 3]], ['foo' => ParameterType::STRING, 'bar' => Connection::PARAM_INT_ARRAY], @@ -269,8 +254,7 @@ public static function dataExpandListParameters() : iterable ['string', 1, 2, 3], [ParameterType::STRING, ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER], ], - // Named parameters: One non-list after list-needle - [ + 'Named: One non-list after list-needle' => [ 'SELECT * FROM Foo WHERE bar IN (:bar) AND baz = :baz', ['bar' => [1, 2, 3], 'baz' => 'foo'], ['bar' => Connection::PARAM_INT_ARRAY, 'baz' => ParameterType::STRING], @@ -278,26 +262,39 @@ public static function dataExpandListParameters() : iterable [1, 2, 3, 'foo'], [ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::STRING], ], - // Named parameters: One non-list before and one after list-needle - [ + 'Named: One non-list before and one after list-needle' => [ 'SELECT * FROM Foo WHERE foo = :foo AND bar IN (:bar) AND baz = :baz', ['bar' => [1, 2, 3],'foo' => 1, 'baz' => 4], - ['bar' => Connection::PARAM_INT_ARRAY, 'foo' => ParameterType::INTEGER, 'baz' => ParameterType::INTEGER], + [ + 'bar' => Connection::PARAM_INT_ARRAY, + 'foo' => ParameterType::INTEGER, + 'baz' => ParameterType::INTEGER, + ], 'SELECT * FROM Foo WHERE foo = ? AND bar IN (?, ?, ?) AND baz = ?', [1, 1, 2, 3, 4], - [ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER], + [ + ParameterType::INTEGER, + ParameterType::INTEGER, + ParameterType::INTEGER, + ParameterType::INTEGER, + ParameterType::INTEGER, + ], ], - // Named parameters: Two lists - [ + 'Named: Two lists' => [ 'SELECT * FROM Foo WHERE foo IN (:a, :b)', ['b' => [4, 5],'a' => [1, 2, 3]], ['a' => Connection::PARAM_INT_ARRAY, 'b' => Connection::PARAM_INT_ARRAY], 'SELECT * FROM Foo WHERE foo IN (?, ?, ?, ?, ?)', [1, 2, 3, 4, 5], - [ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER], + [ + ParameterType::INTEGER, + ParameterType::INTEGER, + ParameterType::INTEGER, + ParameterType::INTEGER, + ParameterType::INTEGER, + ], ], - // Named parameters : With the same name arg type string - [ + 'Named: With the same name arg type string' => [ 'SELECT * FROM Foo WHERE foo <> :arg AND bar = :arg', ['arg' => 'Some String'], ['arg' => ParameterType::STRING], @@ -305,18 +302,22 @@ public static function dataExpandListParameters() : iterable ['Some String','Some String'], [ParameterType::STRING,ParameterType::STRING], ], - // Named parameters : With the same name arg - [ + 'Named: With the same name arg' => [ 'SELECT * FROM Foo WHERE foo IN (:arg) AND NOT bar IN (:arg)', ['arg' => [1, 2, 3]], ['arg' => Connection::PARAM_INT_ARRAY], 'SELECT * FROM Foo WHERE foo IN (?, ?, ?) AND NOT bar IN (?, ?, ?)', [1, 2, 3, 1, 2, 3], - [ParameterType::INTEGER,ParameterType::INTEGER, ParameterType::INTEGER,ParameterType::INTEGER,ParameterType::INTEGER, ParameterType::INTEGER], + [ + ParameterType::INTEGER, + ParameterType::INTEGER, + ParameterType::INTEGER, + ParameterType::INTEGER, + ParameterType::INTEGER, + ParameterType::INTEGER, + ], ], - - // Named parameters : Same name, other name in between DBAL-299 - [ + 'Named: Same name, other name in between (DBAL-299)' => [ 'SELECT * FROM Foo WHERE (:foo = 2) AND (:bar = 3) AND (:foo = 2)', ['foo' => 2,'bar' => 3], ['foo' => ParameterType::INTEGER,'bar' => ParameterType::INTEGER], @@ -324,8 +325,7 @@ public static function dataExpandListParameters() : iterable [2, 3, 2], [ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::INTEGER], ], - // Named parameters : Empty "integer" array DDC-1978 - [ + 'Named: Empty "integer" array (DDC-1978)' => [ 'SELECT * FROM Foo WHERE foo IN (:foo)', ['foo' => []], ['foo' => Connection::PARAM_INT_ARRAY], @@ -333,8 +333,7 @@ public static function dataExpandListParameters() : iterable [], [], ], - // Named parameters : Two empty "str" array DDC-1978 - [ + 'Named: Two empty "str" array (DDC-1978)' => [ 'SELECT * FROM Foo WHERE foo IN (:foo) OR bar IN (:bar)', ['foo' => [], 'bar' => []], ['foo' => Connection::PARAM_STR_ARRAY, 'bar' => Connection::PARAM_STR_ARRAY], @@ -358,8 +357,7 @@ public static function dataExpandListParameters() : iterable [1, 2, 'bar'], [ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::STRING], ], - // Params/types with colons - [ + 'Params/types with colons' => [ 'SELECT * FROM Foo WHERE foo = :foo OR bar = :bar', [':foo' => 'foo', ':bar' => 'bar'], [':foo' => ParameterType::INTEGER], @@ -391,8 +389,7 @@ public static function dataExpandListParameters() : iterable [1, 2, 'bar'], [ParameterType::INTEGER, ParameterType::INTEGER, ParameterType::STRING], ], - // DBAL-522 - null valued parameters are not considered - [ + 'Null valued parameters (DBAL-522)' => [ 'INSERT INTO Foo (foo, bar) values (:foo, :bar)', ['foo' => 1, 'bar' => null], [':foo' => ParameterType::INTEGER, ':bar' => ParameterType::NULL], @@ -408,8 +405,7 @@ public static function dataExpandListParameters() : iterable [1, null], [ParameterType::INTEGER, ParameterType::NULL], ], - // DBAL-1205 - Escaped single quotes SQL- and C-Style - [ + 'Escaped single quotes SQL- and C-Style (DBAL-1205)' => [ "SELECT * FROM Foo WHERE foo = :foo||''':not_a_param''\\'' OR bar = ''':not_a_param''\\'':bar", [':foo' => 1, ':bar' => 2], [':foo' => ParameterType::INTEGER, 'bar' => ParameterType::INTEGER], @@ -417,6 +413,14 @@ public static function dataExpandListParameters() : iterable [1, 2], [ParameterType::INTEGER, ParameterType::INTEGER], ], + [ + 'SELECT NULL FROM dummy WHERE ? IN (?)', + ['foo', ['bar', 'baz']], + [1 => Connection::PARAM_STR_ARRAY], + 'SELECT NULL FROM dummy WHERE ? IN (?, ?)', + ['foo', 'bar', 'baz'], + [null, ParameterType::STRING, ParameterType::STRING], + ], ]; } From 68f0d99fcf270525b3df59294f277a6643facbf9 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Mon, 16 Mar 2020 12:15:57 -0700 Subject: [PATCH 24/29] Updated documentation for QueryBuilder::execute() return value type --- lib/Doctrine/DBAL/Query/QueryBuilder.php | 4 ++-- phpstan.neon.dist | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/DBAL/Query/QueryBuilder.php b/lib/Doctrine/DBAL/Query/QueryBuilder.php index 86d7a1ce91a..5148c82ca94 100644 --- a/lib/Doctrine/DBAL/Query/QueryBuilder.php +++ b/lib/Doctrine/DBAL/Query/QueryBuilder.php @@ -3,7 +3,7 @@ namespace Doctrine\DBAL\Query; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\Driver\Statement; +use Doctrine\DBAL\Driver\ResultStatement; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\Expression\CompositeExpression; use Doctrine\DBAL\Query\Expression\ExpressionBuilder; @@ -198,7 +198,7 @@ public function getState() * Uses {@see Connection::executeQuery} for select statements and {@see Connection::executeUpdate} * for insert, update and delete statements. * - * @return Statement|int + * @return ResultStatement|int */ public function execute() { diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 4ae1fda3f8a..f60bf2d4ff5 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -19,7 +19,6 @@ parameters: - "~^Casting to bool something that's already bool.~" - "~^Casting to int something that's already int.~" - '~^Method Doctrine\\DBAL\\Driver\\IBMDB2\\DB2Connection::exec\(\) should return int but returns bool\.\z~' - - '~^Method Doctrine\\DBAL\\Query\\QueryBuilder::execute\(\) should return Doctrine\\DBAL\\Driver\\Statement\|int but returns Doctrine\\DBAL\\Driver\\ResultStatement\.\z~' - '~^Property Doctrine\\DBAL\\Schema\\Table::\$_primaryKeyName \(string\) does not accept (default value of type )?false\.\z~' - '~^Property Doctrine\\DBAL\\Schema\\Schema::\$_schemaConfig \(Doctrine\\DBAL\\Schema\\SchemaConfig\) does not accept default value of type false\.\z~' - '~^Method Doctrine\\DBAL\\Schema\\ForeignKeyConstraint::onEvent\(\) should return string\|null but returns false\.\z~' From 3de9903a7a526ebc0bd2bb564ee2e049749c97b1 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Mon, 16 Mar 2020 13:30:48 -0700 Subject: [PATCH 25/29] Bump version to 2.11.0-DEV --- lib/Doctrine/DBAL/Version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/DBAL/Version.php b/lib/Doctrine/DBAL/Version.php index 1326f6f07f4..454a28884e6 100644 --- a/lib/Doctrine/DBAL/Version.php +++ b/lib/Doctrine/DBAL/Version.php @@ -17,7 +17,7 @@ class Version /** * Current Doctrine Version. */ - public const VERSION = '2.10.2-DEV'; + public const VERSION = '2.11.0-DEV'; /** * Compares a Doctrine version with the current one. From 17b0defb764383341aa435ebba1e82d5abcbf373 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Mon, 16 Mar 2020 18:31:24 -0700 Subject: [PATCH 26/29] Drop support for PHP 7.2 --- .scrutinizer.yml | 2 +- .travis.yml | 69 +++++------------------------------------------- composer.json | 4 +-- composer.lock | 6 ++--- 4 files changed, 12 insertions(+), 69 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index c8831b78bcb..54e2627460b 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -3,7 +3,7 @@ build: analysis: environment: php: - version: 7.2 + version: 7.3 cache: disabled: false directories: diff --git a/.travis.yml b/.travis.yml index 392659b0858..60233b12948 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,68 +55,6 @@ jobs: install: travis_retry composer install --prefer-dist script: vendor/bin/phpcs - - stage: Test - php: 7.2 - 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.2 - 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.2 - env: DB=mariadb MARIADB_VERSION=10.3 - addons: - mariadb: 10.3 - - stage: Test - php: 7.2 - env: DB=mariadb.mysqli MARIADB_VERSION=10.3 - addons: - mariadb: 10.3 - - stage: Test - php: 7.2 - env: DB=pgsql POSTGRESQL_VERSION=11.0 - sudo: required - services: - - docker - before_script: - - bash ./tests/travis/install-postgres-11.sh - - stage: Test - php: 7.2 - env: DB=sqlite - - stage: Test - php: 7.2 - 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.2 - 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.2 - env: DB=sqlite DEPENDENCIES=low - install: - - travis_retry composer update --prefer-dist --prefer-lowest - stage: Test php: 7.3 env: DB=mysql.docker MYSQL_VERSION=8.0 @@ -174,6 +112,11 @@ 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.3 + env: DB=sqlite DEPENDENCIES=low + install: + - travis_retry composer update --prefer-dist --prefer-lowest - stage: Test php: 7.4 env: DB=mysql COVERAGE=yes @@ -366,7 +309,7 @@ jobs: - stage: Test if: type = cron - php: 7.2 + php: 7.3 env: DB=sqlite DEPENDENCIES=dev install: - composer config minimum-stability dev diff --git a/composer.json b/composer.json index 92f15ac4533..654fde25c82 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ {"name": "Jonathan Wage", "email": "jonwage@gmail.com"} ], "require": { - "php": "^7.2", + "php": "^7.3", "doctrine/cache": "^1.0", "doctrine/event-manager": "^1.0", "ocramius/package-versions": "^1.4" @@ -50,7 +50,7 @@ "bin": ["bin/doctrine-dbal"], "config": { "platform": { - "php": "7.2.0" + "php": "7.3.0" }, "sort-packages": true }, diff --git a/composer.lock b/composer.lock index 0b0e2c098da..44dd508dae5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d2829e570f6cbea341f9ce388f4349b4", + "content-hash": "1f3b5c09550e1e6c722e688258b181e3", "packages": [ { "name": "doctrine/cache", @@ -3129,10 +3129,10 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.2" + "php": "^7.3" }, "platform-dev": [], "platform-overrides": { - "php": "7.2.0" + "php": "7.3.0" } } From c5a7b926ddec73aba8c6a7f5fa46e9490c3451b7 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Mon, 25 Nov 2019 10:28:57 -0800 Subject: [PATCH 27/29] VersionAwarePlatformDriver now extends Driver --- UPGRADE.md | 4 ++++ lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php | 3 +-- lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php | 3 +-- lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php | 3 +-- lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php | 3 +-- lib/Doctrine/DBAL/VersionAwarePlatformDriver.php | 2 +- tests/Doctrine/Tests/DBAL/ConnectionTest.php | 8 ++++---- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index ccf92a12b29..7c117070250 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,9 @@ # Upgrade to 3.0 +## BC BREAK: VersionAwarePlatformDriver interface now extends Driver + +All implementations of the `VersionAwarePlatformDriver` interface have to implement the methods defined in the `Driver` interface as well. + ## BC BREAK: Removed Doctrine\DBAL\Version The `Doctrine\DBAL\Version` class is no longer available: please refrain from checking the DBAL version at runtime. diff --git a/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php b/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php index c46ddc63dd7..0ac3c7484f7 100644 --- a/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php +++ b/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php @@ -4,7 +4,6 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\DBALException; -use Doctrine\DBAL\Driver; use Doctrine\DBAL\Exception; use Doctrine\DBAL\Platforms\MariaDb1027Platform; use Doctrine\DBAL\Platforms\MySQL57Platform; @@ -19,7 +18,7 @@ /** * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for MySQL based drivers. */ -abstract class AbstractMySQLDriver implements Driver, ExceptionConverterDriver, VersionAwarePlatformDriver +abstract class AbstractMySQLDriver implements ExceptionConverterDriver, VersionAwarePlatformDriver { /** * {@inheritdoc} diff --git a/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php b/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php index 916d924980c..25b6d8e528e 100644 --- a/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php +++ b/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php @@ -4,7 +4,6 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\DBALException; -use Doctrine\DBAL\Driver; use Doctrine\DBAL\Exception; use Doctrine\DBAL\Platforms\PostgreSQL100Platform; use Doctrine\DBAL\Platforms\PostgreSQL91Platform; @@ -20,7 +19,7 @@ /** * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for PostgreSQL based drivers. */ -abstract class AbstractPostgreSQLDriver implements Driver, ExceptionConverterDriver, VersionAwarePlatformDriver +abstract class AbstractPostgreSQLDriver implements ExceptionConverterDriver, VersionAwarePlatformDriver { /** * {@inheritdoc} diff --git a/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php b/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php index 88f26ce7def..337fcdde5dd 100644 --- a/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php +++ b/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php @@ -4,7 +4,6 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\DBALException; -use Doctrine\DBAL\Driver; use Doctrine\DBAL\Exception; use Doctrine\DBAL\Platforms\SQLAnywhere11Platform; use Doctrine\DBAL\Platforms\SQLAnywhere12Platform; @@ -18,7 +17,7 @@ /** * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for SAP Sybase SQL Anywhere based drivers. */ -abstract class AbstractSQLAnywhereDriver implements Driver, ExceptionConverterDriver, VersionAwarePlatformDriver +abstract class AbstractSQLAnywhereDriver implements ExceptionConverterDriver, VersionAwarePlatformDriver { /** * {@inheritdoc} diff --git a/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php b/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php index 421d82b3951..fb915aaf71f 100644 --- a/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php +++ b/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php @@ -4,7 +4,6 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\DBALException; -use Doctrine\DBAL\Driver; use Doctrine\DBAL\Platforms\SQLServer2005Platform; use Doctrine\DBAL\Platforms\SQLServer2008Platform; use Doctrine\DBAL\Platforms\SQLServer2012Platform; @@ -17,7 +16,7 @@ /** * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for Microsoft SQL Server based drivers. */ -abstract class AbstractSQLServerDriver implements Driver, VersionAwarePlatformDriver +abstract class AbstractSQLServerDriver implements VersionAwarePlatformDriver { /** * {@inheritdoc} diff --git a/lib/Doctrine/DBAL/VersionAwarePlatformDriver.php b/lib/Doctrine/DBAL/VersionAwarePlatformDriver.php index a4864d0b287..3dc18a400d3 100644 --- a/lib/Doctrine/DBAL/VersionAwarePlatformDriver.php +++ b/lib/Doctrine/DBAL/VersionAwarePlatformDriver.php @@ -12,7 +12,7 @@ * This interface should be implemented by drivers that are capable to do this * distinction. */ -interface VersionAwarePlatformDriver +interface VersionAwarePlatformDriver extends Driver { /** * Factory method for creating the appropriate platform instance for the given version. diff --git a/tests/Doctrine/Tests/DBAL/ConnectionTest.php b/tests/Doctrine/Tests/DBAL/ConnectionTest.php index 9cb31486b21..5635acf8bf8 100644 --- a/tests/Doctrine/Tests/DBAL/ConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/ConnectionTest.php @@ -714,8 +714,8 @@ public function testCallConnectOnce() : void */ public function testPlatformDetectionIsTriggerOnlyOnceOnRetrievingPlatform() : void { - /** @var Driver|VersionAwarePlatformDriver|MockObject $driverMock */ - $driverMock = $this->createMock([Driver::class, VersionAwarePlatformDriver::class]); + /** @var VersionAwarePlatformDriver|MockObject $driverMock */ + $driverMock = $this->createMock(VersionAwarePlatformDriver::class); /** @var ServerInfoAwareConnection|MockObject $driverConnectionMock */ $driverConnectionMock = $this->createMock(ServerInfoAwareConnection::class); @@ -843,8 +843,8 @@ public function testThrowsExceptionWhenInValidPlatformSpecified() : void */ public function testRethrowsOriginalExceptionOnDeterminingPlatformWhenConnectingToNonExistentDatabase() : void { - /** @var Driver|VersionAwarePlatformDriver|MockObject $driverMock */ - $driverMock = $this->createMock([Driver::class, VersionAwarePlatformDriver::class]); + /** @var VersionAwarePlatformDriver|MockObject $driverMock */ + $driverMock = $this->createMock(VersionAwarePlatformDriver::class); $connection = new Connection(['dbname' => 'foo'], $driverMock); $originalException = new Exception('Original exception'); From 59dffec1030b592b275a202b9d86409abc1dbd0d Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Wed, 27 Nov 2019 16:48:08 -0800 Subject: [PATCH 28/29] PingableConnection and ServerInfoAwareConnection now extend Connection --- UPGRADE.md | 4 ++++ lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php | 3 +-- lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php | 3 +-- lib/Doctrine/DBAL/Driver/PDOConnection.php | 2 +- lib/Doctrine/DBAL/Driver/PingableConnection.php | 2 +- .../DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php | 3 +-- lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php | 3 +-- lib/Doctrine/DBAL/Driver/ServerInfoAwareConnection.php | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index 7c117070250..d20d310adcf 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,9 @@ # Upgrade to 3.0 +## BC BREAK: PingableConnection and ServerInfoAwareConnection interfaces now extend Connection + +All implementations of the `PingableConnection` and `ServerInfoAwareConnection` interfaces have to implement the methods defined in the `Connection` interface as well. + ## BC BREAK: VersionAwarePlatformDriver interface now extends Driver All implementations of the `VersionAwarePlatformDriver` interface have to implement the methods defined in the `Driver` interface as well. diff --git a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php index 20ecd7fc86a..80362b8cff3 100644 --- a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php +++ b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php @@ -2,7 +2,6 @@ namespace Doctrine\DBAL\Driver\IBMDB2; -use Doctrine\DBAL\Driver\Connection; use Doctrine\DBAL\Driver\ResultStatement; use Doctrine\DBAL\Driver\ServerInfoAwareConnection; use Doctrine\DBAL\Driver\Statement as DriverStatement; @@ -25,7 +24,7 @@ use function db2_server_info; use function db2_stmt_errormsg; -class DB2Connection implements Connection, ServerInfoAwareConnection +class DB2Connection implements ServerInfoAwareConnection { /** @var resource */ private $conn = null; diff --git a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php index a9047b10ef7..5799e273418 100644 --- a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php +++ b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php @@ -2,7 +2,6 @@ namespace Doctrine\DBAL\Driver\Mysqli; -use Doctrine\DBAL\Driver\Connection; use Doctrine\DBAL\Driver\PingableConnection; use Doctrine\DBAL\Driver\ResultStatement; use Doctrine\DBAL\Driver\ServerInfoAwareConnection; @@ -28,7 +27,7 @@ use function sprintf; use function stripos; -class MysqliConnection implements Connection, PingableConnection, ServerInfoAwareConnection +class MysqliConnection implements PingableConnection, ServerInfoAwareConnection { /** * Name of the option to set connection flags diff --git a/lib/Doctrine/DBAL/Driver/PDOConnection.php b/lib/Doctrine/DBAL/Driver/PDOConnection.php index 995ebee6adb..04b7a5c7d6a 100644 --- a/lib/Doctrine/DBAL/Driver/PDOConnection.php +++ b/lib/Doctrine/DBAL/Driver/PDOConnection.php @@ -11,7 +11,7 @@ * * Used by all PDO-based drivers. */ -class PDOConnection implements Connection, ServerInfoAwareConnection +class PDOConnection implements ServerInfoAwareConnection { /** @var PDO */ private $connection; diff --git a/lib/Doctrine/DBAL/Driver/PingableConnection.php b/lib/Doctrine/DBAL/Driver/PingableConnection.php index 06bfb9a7f26..8031b5b2f2b 100644 --- a/lib/Doctrine/DBAL/Driver/PingableConnection.php +++ b/lib/Doctrine/DBAL/Driver/PingableConnection.php @@ -5,7 +5,7 @@ /** * An interface for connections which support a "native" ping method. */ -interface PingableConnection +interface PingableConnection extends Connection { /** * Pings the database server to determine if the connection is still diff --git a/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php b/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php index 6c117904c58..49446f7e7f6 100644 --- a/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php +++ b/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php @@ -2,7 +2,6 @@ namespace Doctrine\DBAL\Driver\SQLAnywhere; -use Doctrine\DBAL\Driver\Connection; use Doctrine\DBAL\Driver\ResultStatement; use Doctrine\DBAL\Driver\ServerInfoAwareConnection; use Doctrine\DBAL\Driver\Statement as DriverStatement; @@ -27,7 +26,7 @@ /** * SAP Sybase SQL Anywhere implementation of the Connection interface. */ -class SQLAnywhereConnection implements Connection, ServerInfoAwareConnection +class SQLAnywhereConnection implements ServerInfoAwareConnection { /** @var resource The SQL Anywhere connection resource. */ private $connection; diff --git a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php index caa04efce5f..e3167ced47d 100644 --- a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php +++ b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php @@ -2,7 +2,6 @@ namespace Doctrine\DBAL\Driver\SQLSrv; -use Doctrine\DBAL\Driver\Connection; use Doctrine\DBAL\Driver\ResultStatement; use Doctrine\DBAL\Driver\ServerInfoAwareConnection; use Doctrine\DBAL\Driver\Statement as DriverStatement; @@ -25,7 +24,7 @@ /** * SQL Server implementation for the Connection interface. */ -class SQLSrvConnection implements Connection, ServerInfoAwareConnection +class SQLSrvConnection implements ServerInfoAwareConnection { /** @var resource */ protected $conn; diff --git a/lib/Doctrine/DBAL/Driver/ServerInfoAwareConnection.php b/lib/Doctrine/DBAL/Driver/ServerInfoAwareConnection.php index c97a60fa356..97e464b2400 100644 --- a/lib/Doctrine/DBAL/Driver/ServerInfoAwareConnection.php +++ b/lib/Doctrine/DBAL/Driver/ServerInfoAwareConnection.php @@ -5,7 +5,7 @@ /** * Contract for a connection that is able to provide information about the server it is connected to. */ -interface ServerInfoAwareConnection +interface ServerInfoAwareConnection extends Connection { /** * Returns the version number of the database server connected to. From a44d34e3fb74278e60bb4cda7774944b0c8b3031 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Tue, 17 Mar 2020 09:22:36 -0700 Subject: [PATCH 29/29] Updated PHPUnit to 9.0 --- composer.json | 2 +- composer.lock | 552 ++++++++++-------- .../DBAL/Driver/OCI8/OCI8StatementTest.php | 2 +- .../Driver/IBMDB2/DB2StatementTest.php | 3 +- .../Tests/DBAL/Functional/PortabilityTest.php | 6 +- 5 files changed, 316 insertions(+), 249 deletions(-) diff --git a/composer.json b/composer.json index 654fde25c82..dd4d399c55d 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ "doctrine/coding-standard": "^6.0", "jetbrains/phpstorm-stubs": "^2019.1", "phpstan/phpstan": "^0.11.3", - "phpunit/phpunit": "^8.4.1", + "phpunit/phpunit": "^9.0", "symfony/console": "^2.0.5|^3.0|^4.0|^5.0" }, "suggest": { diff --git a/composer.lock b/composer.lock index 44dd508dae5..2f2e46802f5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1f3b5c09550e1e6c722e688258b181e3", + "content-hash": "5be45ec5a1bc11259882d3ba66538ee2", "packages": [ { "name": "doctrine/cache", @@ -379,16 +379,16 @@ }, { "name": "doctrine/instantiator", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "a2c590166b2133a4633738648b6b064edae0814a" + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", - "reference": "a2c590166b2133a4633738648b6b064edae0814a", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", "shasum": "" }, "require": { @@ -431,7 +431,7 @@ "constructor", "instantiate" ], - "time": "2019-03-17T17:37:11+00:00" + "time": "2019-10-21T16:45:58+00:00" }, { "name": "jean85/pretty-package-versions", @@ -525,16 +525,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.3", + "version": "1.9.5", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", "shasum": "" }, "require": { @@ -569,7 +569,7 @@ "object", "object graph" ], - "time": "2019-08-09T12:45:53+00:00" + "time": "2020-01-17T21:11:47+00:00" }, { "name": "nette/bootstrap", @@ -1301,40 +1301,38 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.2", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "^7.1", + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/type-resolver": "^1.0", + "webmozart/assert": "^1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" + "doctrine/instantiator": "^1", + "mockery/mockery": "^1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1345,33 +1343,36 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-09-12T14:27:41+00:00" + "time": "2020-02-22T12:28:44+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", "shasum": "" }, "require": { - "php": "^7.1", + "php": "^7.2", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" + "ext-tokenizer": "^7.2", + "mockery/mockery": "~1" }, "type": "library", "extra": { @@ -1395,37 +1396,37 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2019-08-22T18:11:29+00:00" + "time": "2020-02-18T18:59:58+00:00" }, { "name": "phpspec/prophecy", - "version": "1.9.0", + "version": "v1.10.3", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203" + "reference": "451c3cd1418cf640de218914901e51b064abb093" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203", - "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", + "phpspec/phpspec": "^2.5 || ^3.2", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.10.x-dev" } }, "autoload": { @@ -1458,7 +1459,7 @@ "spy", "stub" ], - "time": "2019-10-03T11:07:50+00:00" + "time": "2020-03-05T15:02:03+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -1584,40 +1585,41 @@ }, { "name": "phpunit/php-code-coverage", - "version": "7.0.8", + "version": "8.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "aa0d179a13284c7420fc281fc32750e6cc7c9e2f" + "reference": "31e94ccc084025d6abee0585df533eb3a792b96a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa0d179a13284c7420fc281fc32750e6cc7c9e2f", - "reference": "aa0d179a13284c7420fc281fc32750e6cc7c9e2f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/31e94ccc084025d6abee0585df533eb3a792b96a", + "reference": "31e94ccc084025d6abee0585df533eb3a792b96a", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.2", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.1", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^4.2.2", - "sebastian/version": "^2.0.1", + "php": "^7.3", + "phpunit/php-file-iterator": "^3.0", + "phpunit/php-text-template": "^2.0", + "phpunit/php-token-stream": "^4.0", + "sebastian/code-unit-reverse-lookup": "^2.0", + "sebastian/environment": "^5.0", + "sebastian/version": "^3.0", "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "phpunit/phpunit": "^8.2.2" + "phpunit/phpunit": "^9.0" }, "suggest": { - "ext-xdebug": "^2.7.2" + "ext-pcov": "*", + "ext-xdebug": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "8.0-dev" } }, "autoload": { @@ -1643,32 +1645,32 @@ "testing", "xunit" ], - "time": "2019-09-17T06:24:36+00:00" + "time": "2020-02-19T13:41:19+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.2", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" + "reference": "354d4a5faa7449a377a18b94a2026ca3415e3d7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", - "reference": "050bedf145a257b1ff02746c31894800e5122946", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/354d4a5faa7449a377a18b94a2026ca3415e3d7a", + "reference": "354d4a5faa7449a377a18b94a2026ca3415e3d7a", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1693,26 +1695,84 @@ "filesystem", "iterator" ], - "time": "2018-09-13T20:33:42+00:00" + "time": "2020-02-07T06:05:22+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "7579d5a1ba7f3ac11c80004d205877911315ae7a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/7579d5a1ba7f3ac11c80004d205877911315ae7a", + "reference": "7579d5a1ba7f3ac11c80004d205877911315ae7a", + "shasum": "" + }, + "require": { + "php": "^7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.0" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "time": "2020-02-07T06:06:11+00:00" }, { "name": "phpunit/php-text-template", - "version": "1.2.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "reference": "526dc996cc0ebdfa428cd2dfccd79b7b53fee346" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/526dc996cc0ebdfa428cd2dfccd79b7b53fee346", + "reference": "526dc996cc0ebdfa428cd2dfccd79b7b53fee346", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1734,32 +1794,32 @@ "keywords": [ "template" ], - "time": "2015-06-21T13:50:34+00:00" + "time": "2020-02-01T07:43:44+00:00" }, { "name": "phpunit/php-timer", - "version": "2.1.2", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + "reference": "4118013a4d0f97356eae8e7fb2f6c6472575d1df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/4118013a4d0f97356eae8e7fb2f6c6472575d1df", + "reference": "4118013a4d0f97356eae8e7fb2f6c6472575d1df", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1783,33 +1843,33 @@ "keywords": [ "timer" ], - "time": "2019-06-07T04:22:29+00:00" + "time": "2020-02-07T06:08:11+00:00" }, { "name": "phpunit/php-token-stream", - "version": "3.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" + "reference": "b2560a0c33f7710e4d7f8780964193e8e8f8effe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/b2560a0c33f7710e4d7f8780964193e8e8f8effe", + "reference": "b2560a0c33f7710e4d7f8780964193e8e8f8effe", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.1" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1832,20 +1892,20 @@ "keywords": [ "tokenizer" ], - "time": "2019-09-17T06:23:10+00:00" + "time": "2020-02-07T06:19:00+00:00" }, { "name": "phpunit/phpunit", - "version": "8.4.1", + "version": "9.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "366a4a0f2b971fd43b7c351d621e8dd7d7131869" + "reference": "68d7e5b17a6b9461e17c00446caa409863154f76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/366a4a0f2b971fd43b7c351d621e8dd7d7131869", - "reference": "366a4a0f2b971fd43b7c351d621e8dd7d7131869", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/68d7e5b17a6b9461e17c00446caa409863154f76", + "reference": "68d7e5b17a6b9461e17c00446caa409863154f76", "shasum": "" }, "require": { @@ -1859,29 +1919,29 @@ "myclabs/deep-copy": "^1.9.1", "phar-io/manifest": "^1.0.3", "phar-io/version": "^2.0.1", - "php": "^7.2", + "php": "^7.3", "phpspec/prophecy": "^1.8.1", - "phpunit/php-code-coverage": "^7.0.7", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.2", - "sebastian/exporter": "^3.1.1", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", - "sebastian/version": "^2.0.1" + "phpunit/php-code-coverage": "^8.0", + "phpunit/php-file-iterator": "^3.0", + "phpunit/php-invoker": "^3.0", + "phpunit/php-text-template": "^2.0", + "phpunit/php-timer": "^3.0", + "sebastian/comparator": "^4.0", + "sebastian/diff": "^4.0", + "sebastian/environment": "^5.0", + "sebastian/exporter": "^4.0", + "sebastian/global-state": "^4.0", + "sebastian/object-enumerator": "^4.0", + "sebastian/resource-operations": "^3.0", + "sebastian/type": "^2.0", + "sebastian/version": "^3.0" }, "require-dev": { "ext-pdo": "*" }, "suggest": { "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0.0" + "ext-xdebug": "*" }, "bin": [ "phpunit" @@ -1889,12 +1949,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.4-dev" + "dev-master": "9.0-dev" } }, "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1915,7 +1978,7 @@ "testing", "xunit" ], - "time": "2019-10-07T12:57:41+00:00" + "time": "2020-02-13T07:30:12+00:00" }, { "name": "psr/log", @@ -1966,28 +2029,28 @@ }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "reference": "5b5dbe0044085ac41df47e79d34911a15b96d82e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5b5dbe0044085ac41df47e79d34911a15b96d82e", + "reference": "5b5dbe0044085ac41df47e79d34911a15b96d82e", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2007,34 +2070,34 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "time": "2020-02-07T06:20:13+00:00" }, { "name": "sebastian/comparator", - "version": "3.0.2", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + "reference": "85b3435da967696ed618ff745f32be3ff4a2b8e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/85b3435da967696ed618ff745f32be3ff4a2b8e8", + "reference": "85b3435da967696ed618ff745f32be3ff4a2b8e8", "shasum": "" }, "require": { - "php": "^7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": "^7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2047,6 +2110,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -2058,10 +2125,6 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", @@ -2071,33 +2134,33 @@ "compare", "equality" ], - "time": "2018-07-12T15:12:46+00:00" + "time": "2020-02-07T06:08:51+00:00" }, { "name": "sebastian/diff", - "version": "3.0.2", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + "reference": "c0c26c9188b538bfa985ae10c9f05d278f12060d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c0c26c9188b538bfa985ae10c9f05d278f12060d", + "reference": "c0c26c9188b538bfa985ae10c9f05d278f12060d", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^9.0", + "symfony/process": "^4 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2110,13 +2173,13 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", @@ -2127,27 +2190,27 @@ "unidiff", "unified diff" ], - "time": "2019-02-04T06:01:07+00:00" + "time": "2020-02-07T06:09:38+00:00" }, { "name": "sebastian/environment", - "version": "4.2.2", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404" + "reference": "9bffdefa7810031a165ddd6275da6a2c1f6f2dfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404", - "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/9bffdefa7810031a165ddd6275da6a2c1f6f2dfb", + "reference": "9bffdefa7810031a165ddd6275da6a2c1f6f2dfb", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5" + "phpunit/phpunit": "^9.0" }, "suggest": { "ext-posix": "*" @@ -2155,7 +2218,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2180,34 +2243,34 @@ "environment", "hhvm" ], - "time": "2019-05-05T09:05:15+00:00" + "time": "2020-02-19T13:40:20+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.2", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" + "reference": "80c26562e964016538f832f305b2286e1ec29566" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/80c26562e964016538f832f305b2286e1ec29566", + "reference": "80c26562e964016538f832f305b2286e1ec29566", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" + "php": "^7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2247,30 +2310,30 @@ "export", "exporter" ], - "time": "2019-09-14T09:02:43+00:00" + "time": "2020-02-07T06:10:52+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.0", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" + "reference": "bdb1e7c79e592b8c82cb1699be3c8743119b8a72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bdb1e7c79e592b8c82cb1699be3c8743119b8a72", + "reference": "bdb1e7c79e592b8c82cb1699be3c8743119b8a72", "shasum": "" }, "require": { - "php": "^7.2", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": "^7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^9.0" }, "suggest": { "ext-uopz": "*" @@ -2278,7 +2341,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2301,34 +2364,34 @@ "keywords": [ "global state" ], - "time": "2019-02-01T05:30:01+00:00" + "time": "2020-02-07T06:11:37+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.3", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "reference": "e67516b175550abad905dc952f43285957ef4363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67516b175550abad905dc952f43285957ef4363", + "reference": "e67516b175550abad905dc952f43285957ef4363", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": "^7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2348,32 +2411,32 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" + "time": "2020-02-07T06:12:23+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "reference": "f4fd0835cabb0d4a6546d9fe291e5740037aa1e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/f4fd0835cabb0d4a6546d9fe291e5740037aa1e7", + "reference": "f4fd0835cabb0d4a6546d9fe291e5740037aa1e7", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2393,32 +2456,32 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "time": "2020-02-07T06:19:40+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.0", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + "reference": "cdd86616411fc3062368b720b0425de10bd3d579" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cdd86616411fc3062368b720b0425de10bd3d579", + "reference": "cdd86616411fc3062368b720b0425de10bd3d579", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2431,14 +2494,14 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Adam Harvey", "email": "aharvey@php.net" @@ -2446,29 +2509,32 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "time": "2020-02-07T06:18:20+00:00" }, { "name": "sebastian/resource-operations", - "version": "2.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + "reference": "8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98", + "reference": "8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2488,32 +2554,32 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-10-04T04:07:39+00:00" + "time": "2020-02-07T06:13:02+00:00" }, { "name": "sebastian/type", - "version": "1.1.3", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" + "reference": "9e8f42f740afdea51f5f4e8cec2035580e797ee1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/9e8f42f740afdea51f5f4e8cec2035580e797ee1", + "reference": "9e8f42f740afdea51f5f4e8cec2035580e797ee1", "shasum": "" }, "require": { - "php": "^7.2" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^8.2" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2528,35 +2594,35 @@ "authors": [ { "name": "Sebastian Bergmann", - "role": "lead", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2019-07-02T08:10:15+00:00" + "time": "2020-02-07T06:13:43+00:00" }, { "name": "sebastian/version", - "version": "2.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "reference": "0411bde656dce64202b39c2f4473993a9081d39e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/0411bde656dce64202b39c2f4473993a9081d39e", + "reference": "0411bde656dce64202b39c2f4473993a9081d39e", "shasum": "" }, "require": { - "php": ">=5.6" + "php": "^7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2577,7 +2643,7 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "time": "2020-01-21T06:36:37+00:00" }, { "name": "slevomat/coding-standard", @@ -2917,16 +2983,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.12.0", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", "shasum": "" }, "require": { @@ -2938,7 +3004,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -2971,7 +3037,7 @@ "polyfill", "portable" ], - "time": "2019-08-06T08:03:45+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -3074,31 +3140,29 @@ }, { "name": "webmozart/assert", - "version": "1.5.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", + "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", "shasum": "" }, "require": { "php": "^5.3.3 || ^7.0", "symfony/polyfill-ctype": "^1.8" }, + "conflict": { + "vimeo/psalm": "<3.6.0" + }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^7.5.13" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -3120,7 +3184,7 @@ "check", "validate" ], - "time": "2019-08-24T08:43:50+00:00" + "time": "2020-02-14T12:15:55+00:00" } ], "aliases": [], diff --git a/tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php b/tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php index f90f86d6eb3..c1b28fa1224 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php @@ -104,7 +104,7 @@ public static function executeDataProvider() : iterable public function testConvertNonTerminatedLiteral(string $sql, string $message) : void { $this->expectException(OCI8Exception::class); - $this->expectExceptionMessageRegExp($message); + $this->expectExceptionMessageMatches($message); OCI8Statement::convertPositionalToNamedPlaceholders($sql); } diff --git a/tests/Doctrine/Tests/DBAL/Functional/Driver/IBMDB2/DB2StatementTest.php b/tests/Doctrine/Tests/DBAL/Functional/Driver/IBMDB2/DB2StatementTest.php index c839d20d916..733cd59eecf 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Driver/IBMDB2/DB2StatementTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Driver/IBMDB2/DB2StatementTest.php @@ -6,7 +6,6 @@ use Doctrine\DBAL\Driver\IBMDB2\DB2Driver; use Doctrine\Tests\DbalFunctionalTestCase; -use PHPUnit\Framework\Error\Notice; use function extension_loaded; class DB2StatementTest extends DbalFunctionalTestCase @@ -33,7 +32,7 @@ public function testExecutionErrorsAreNotSuppressed() : void // unwrap the statement to prevent the wrapper from handling the PHPUnit-originated exception $wrappedStmt = $stmt->getWrappedStatement(); - $this->expectException(Notice::class); + $this->expectNotice(); $wrappedStmt->execute([[]]); } } diff --git a/tests/Doctrine/Tests/DBAL/Functional/PortabilityTest.php b/tests/Doctrine/Tests/DBAL/Functional/PortabilityTest.php index 72fb9dd2213..eb4376871c4 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/PortabilityTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/PortabilityTest.php @@ -128,7 +128,11 @@ private function assertFetchResultRows(array $rows) : void */ public function assertFetchResultRow(array $row) : void { - self::assertContains($row['test_int'], [1, 2], 'Primary key test_int should either be 1 or 2.'); + self::assertThat($row['test_int'], self::logicalOr( + self::equalTo(1), + self::equalTo(2) + )); + self::assertArrayHasKey('test_string', $row, 'Case should be lowered.'); self::assertEquals(3, strlen($row['test_string']), 'test_string should be rtrimed to length of three for CHAR(32) column.'); self::assertNull($row['test_null']);