From 747ebed927426f19b52f5edbef13b25915c83330 Mon Sep 17 00:00:00 2001 From: Marin Date: Thu, 10 Sep 2026 13:26:01 +0200 Subject: [PATCH 01/13] ignore Jetbrains project folder --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a1e420d..63d5303 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ /var /composer.lock /.php_cs.cache -/.phpunit.result.cache \ No newline at end of file +/.phpunit.result.cache +/.idea From 6145d035dc9775076b04cdf18e25219ed6124d71 Mon Sep 17 00:00:00 2001 From: Marin Date: Thu, 10 Sep 2026 13:26:37 +0200 Subject: [PATCH 02/13] Update doctrine/dbal requirement to support version 4 --- composer.json | 2 +- src/ConnectionPool.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 9b76649..6283a76 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ ], "require": { "php": "^7.4 || ^8.0", - "doctrine/dbal": "^3", + "doctrine/dbal": "^3|^4", "react/event-loop": "^1" }, "require-dev": { diff --git a/src/ConnectionPool.php b/src/ConnectionPool.php index f51f614..37849a2 100644 --- a/src/ConnectionPool.php +++ b/src/ConnectionPool.php @@ -530,14 +530,14 @@ private function releaseConnection(SingleConnection $connection): PromiseInterfa /** @var \Drift\DBAL\ConnectionWorker $worker */ $worker = $this->connections[$connection]; $worker->setLeased(false); - return resolve(); + return resolve(null); } $deferred = $this->deferreds->current(); $this->deferreds->detach($deferred); $deferred->resolve($this->connections[$connection]); - return resolve(); + return resolve(null); } } From 2c565421e364dc82f134a9a7910a8ba7dfba4f00 Mon Sep 17 00:00:00 2001 From: Marin Date: Thu, 10 Sep 2026 13:28:17 +0200 Subject: [PATCH 03/13] Update doctrine/dbal requirement to support version 4 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9b76649..6283a76 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ ], "require": { "php": "^7.4 || ^8.0", - "doctrine/dbal": "^3", + "doctrine/dbal": "^3|^4", "react/event-loop": "^1" }, "require-dev": { From eaadaf8981a1ca7b114fc336fbedec5486a5e532 Mon Sep 17 00:00:00 2001 From: Marin Date: Thu, 10 Sep 2026 13:28:30 +0200 Subject: [PATCH 04/13] releaseConnection() call resolve() with zero arguments, but the installed react/promise (^3.3) requires exactly one argument --- src/ConnectionPool.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ConnectionPool.php b/src/ConnectionPool.php index f51f614..37849a2 100644 --- a/src/ConnectionPool.php +++ b/src/ConnectionPool.php @@ -530,14 +530,14 @@ private function releaseConnection(SingleConnection $connection): PromiseInterfa /** @var \Drift\DBAL\ConnectionWorker $worker */ $worker = $this->connections[$connection]; $worker->setLeased(false); - return resolve(); + return resolve(null); } $deferred = $this->deferreds->current(); $this->deferreds->detach($deferred); $deferred->resolve($this->connections[$connection]); - return resolve(); + return resolve(null); } } From b756688961cfe87854f3fa15f1b838b671048222 Mon Sep 17 00:00:00 2001 From: Marin Date: Thu, 10 Sep 2026 13:53:58 +0200 Subject: [PATCH 05/13] fix for Error: Call to undefined function React\Promise\map() --- src/SingleConnection.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/SingleConnection.php b/src/SingleConnection.php index e16d37e..b805f92 100644 --- a/src/SingleConnection.php +++ b/src/SingleConnection.php @@ -28,7 +28,6 @@ use React\EventLoop\Loop; use React\EventLoop\TimerInterface; use RuntimeException; -use function React\Promise\map; use React\Promise\PromiseInterface; use function React\Promise\resolve; @@ -206,13 +205,17 @@ public function queryBySQL(string $sql, array $parameters = []): PromiseInterfac */ public function executeSQLs(array $sqls): PromiseInterface { - return - map($sqls, function (string $sql) { + $promise = resolve(null); + + foreach ($sqls as $sql) { + $promise = $promise->then(function () use ($sql) { return $this->queryBySQL($sql); - }) - ->then(function () { - return $this; - }); + }); + } + + return $promise->then(function () { + return $this; + }); } /** From 01b586b1da5c0469c232c01308de79fbf4236881 Mon Sep 17 00:00:00 2001 From: Marin Date: Thu, 10 Sep 2026 14:12:36 +0200 Subject: [PATCH 06/13] fix: replace removed React\Promise\map and align mock DBAL signatures across versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. src\Mock\MockedDBALConnection.php ◦ Simplified to a minimal final class MockedDBALConnection extends Connection {}. ◦ This avoids overriding DBAL methods whose signatures differ between DBAL 3 and 4 (quote, beginTransaction, commit, rollBack, lastInsertId, etc.). 2. src\Mock\MockedDriver.php ◦ Reworked with a runtime branch based on the installed DBAL Driver signature (connect parameter count). ◦ DBAL 4 branch implements modern signatures. ◦ DBAL 3 branch keeps legacy signatures. ◦ getDatabasePlatform(...) now returns the provided platform instead of throwing, so QueryBuilder can generate SQL. 3. src\SingleConnection.php ◦ Updated new MockedDriver() to new MockedDriver($this->platform) This keeps behavior stable (mock still throws if real connection methods are used) but removes cross-version signature incompatibilities. --- src/Mock/MockedDBALConnection.php | 137 +----------------------------- src/Mock/MockedDriver.php | 107 ++++++++++++----------- src/SingleConnection.php | 2 +- 3 files changed, 61 insertions(+), 185 deletions(-) diff --git a/src/Mock/MockedDBALConnection.php b/src/Mock/MockedDBALConnection.php index 9c3099f..64d41af 100644 --- a/src/Mock/MockedDBALConnection.php +++ b/src/Mock/MockedDBALConnection.php @@ -15,142 +15,7 @@ namespace Drift\DBAL\Mock; -use Doctrine\DBAL\Cache\QueryCacheProfile; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\ParameterType; -use Doctrine\DBAL\Result; -use Doctrine\DBAL\Statement; -use Doctrine\DBAL\Types\Type; -use Exception; - -/** - * Class MockedDBALConnection. - */ -class MockedDBALConnection extends Connection +final class MockedDBALConnection extends Connection { - /** - * Prepares an SQL statement. - * - * @param string $sql the SQL statement to prepare - * - * @throws \Doctrine\DBAL\Exception - */ - public function prepare(string $sql): Statement - { - throw new Exception('Mocked method. Unable to be used'); - } - - /** - * BC layer for a wide-spread use-case of old DBAL APIs. - * - * @deprecated This API is deprecated and will be removed after 2022 - */ - public function query(string $sql): Result - { - throw new Exception('Mocked method. Unable to be used'); - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function quote($input, $type = ParameterType::STRING)/*: mixed // <--- from php 8*/ - { - throw new Exception('Mocked method. Unable to be used'); - } - - /** - * BC layer for a wide-spread use-case of old DBAL APIs. - * - * @deprecated This API is deprecated and will be removed after 2022 - */ - public function exec(string $sql): int - { - throw new Exception('Mocked method. Unable to be used'); - } - - /** - * {@inheritdoc} - * - * @return string|int|false A string representation of the last inserted ID. - */ - public function lastInsertId($name = null)/*: string|int|false // <--- from php 8 */ - { - throw new Exception('Mocked method. Unable to be used'); - } - - /** - * {@inheritdoc} - */ - public function beginTransaction(): bool - { - throw new Exception('Mocked method. Unable to be used'); - } - - /** - * {@inheritdoc} - */ - public function commit(): bool - { - throw new Exception('Mocked method. Unable to be used'); - } - - /** - * {@inheritdoc} - */ - public function rollBack(): bool - { - throw new Exception('Mocked method. Unable to be used'); - } - - /** - * {@inheritdoc} - */ - public function errorCode() - { - throw new Exception('Mocked method. Unable to be used'); - } - - /** - * {@inheritdoc} - */ - public function errorInfo() - { - throw new Exception('Mocked method. Unable to be used'); - } - - /** - * Executes an, optionally parametrized, SQL query. - * - * If the query is parametrized, a prepared statement is used. - * If an SQLLogger is configured, the execution is logged. - * - * @param string $sql SQL query - * @param list|array $params Query parameters - * @param array|array $types Parameter types - * - * @throws \Doctrine\DBAL\Exception - */ - public function executeQuery( - string $sql, - array $params = [], - $types = [], - ?QueryCacheProfile $qcp = null - ): Result { - throw new Exception('Mocked method. Unable to be used'); - } - - /** - * BC layer for a wide-spread use-case of old DBAL APIs. - * - * @deprecated This API is deprecated and will be removed after 2022 - * - * @param array $params The query parameters - * @param array $types The parameter types - */ - public function executeUpdate(string $sql, array $params = [], array $types = []): int - { - throw new Exception('Mocked method. Unable to be used'); - } } diff --git a/src/Mock/MockedDriver.php b/src/Mock/MockedDriver.php index e108a79..087567c 100644 --- a/src/Mock/MockedDriver.php +++ b/src/Mock/MockedDriver.php @@ -17,65 +17,76 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Driver; -use Doctrine\DBAL\Driver\Connection as DriverConnection; use Doctrine\DBAL\Driver\API\ExceptionConverter; +use Doctrine\DBAL\Driver\Connection as DriverConnection; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Schema\AbstractSchemaManager; +use Doctrine\DBAL\ServerVersionProvider; use Exception; -/** - * Class MockedDriver. - */ -class MockedDriver implements Driver -{ - /** - * {@inheritdoc} - */ - public function connect(array $params, $username = null, $password = null, array $driverOptions = []): DriverConnection +if ((new \ReflectionMethod(Driver::class, 'getDatabasePlatform'))->getNumberOfParameters() === 1) { + final class MockedDriver implements Driver { - throw new Exception('Mocked method. Unable to be used'); - } + private AbstractPlatform $platform; - /** - * {@inheritdoc} - */ - public function getDatabasePlatform(): AbstractPlatform - { - throw new Exception('Mocked method. Unable to be used'); - } + public function __construct(AbstractPlatform $platform) + { + $this->platform = $platform; + } - /** - * Gets the SchemaManager that can be used to inspect and change the underlying - * database schema of the platform this driver connects to. - * - * @return AbstractSchemaManager - */ - public function getSchemaManager(Connection $conn, AbstractPlatform $platform): AbstractSchemaManager - { - throw new Exception('Mocked method. Unable to be used'); - } + public function connect(array $params): DriverConnection + { + throw new Exception('Mocked method. Unable to be used'); + } - /** - * {@inheritdoc} - */ - public function getName() - { - throw new Exception('Mocked method. Unable to be used'); - } + public function getDatabasePlatform(ServerVersionProvider $versionProvider): AbstractPlatform + { + return $this->platform; + } - /** - * {@inheritdoc} - */ - public function getDatabase(Connection $conn) - { - throw new Exception('Mocked method. Unable to be used'); + public function getExceptionConverter(): ExceptionConverter + { + throw new Exception('Mocked method. Unable to be used'); + } } - - /** - * {@inheritdoc} - */ - public function getExceptionConverter(): ExceptionConverter +} else { + final class MockedDriver implements Driver { - throw new Exception('Mocked method. Unable to be used'); + private AbstractPlatform $platform; + + public function __construct(AbstractPlatform $platform) + { + $this->platform = $platform; + } + + public function connect(array $params, $username = null, $password = null, array $driverOptions = []): DriverConnection + { + throw new Exception('Mocked method. Unable to be used'); + } + + public function getDatabasePlatform(): AbstractPlatform + { + return $this->platform; + } + + public function getSchemaManager(Connection $conn, AbstractPlatform $platform): AbstractSchemaManager + { + throw new Exception('Mocked method. Unable to be used'); + } + + public function getName() + { + throw new Exception('Mocked method. Unable to be used'); + } + + public function getDatabase(Connection $conn) + { + throw new Exception('Mocked method. Unable to be used'); + } + + public function getExceptionConverter(): ExceptionConverter + { + throw new Exception('Mocked method. Unable to be used'); + } } } diff --git a/src/SingleConnection.php b/src/SingleConnection.php index b805f92..5052712 100644 --- a/src/SingleConnection.php +++ b/src/SingleConnection.php @@ -162,7 +162,7 @@ public function createQueryBuilder(): QueryBuilder return new QueryBuilder( new MockedDBALConnection([ 'platform' => $this->platform, - ], new MockedDriver()) + ], new MockedDriver($this->platform)) ); } From a6e7a927ca1f024b7b659ed6bdfe7034bda4b671 Mon Sep 17 00:00:00 2001 From: Marin Date: Thu, 10 Sep 2026 14:15:34 +0200 Subject: [PATCH 07/13] =?UTF-8?q?Cause:=20Doctrine\DBAL\Exception\InvalidA?= =?UTF-8?q?rgumentException::fromEmptyCriteria()=20was=20removed=20in=20DB?= =?UTF-8?q?AL=204=20=E2=80=94=20the=20class=20now=20just=20extends=20plain?= =?UTF-8?q?=20\InvalidArgumentException=20with=20no=20static=20factories.?= =?UTF-8?q?=20Fix:=20replaced=20all=203=20call=20sites=20in=20src\SingleCo?= =?UTF-8?q?nnection.php=20(lines=20~311,=20~338,=20~407=20=E2=80=94=20dele?= =?UTF-8?q?te(),=20update(),=20createTable())=20with=20new=20InvalidArgume?= =?UTF-8?q?ntException('Empty=20criteria=20was=20used=20to=20build=20a=20q?= =?UTF-8?q?uery'),=20which=20works=20identically=20on=20both=20DBAL=203=20?= =?UTF-8?q?and=204.=20Tests=20expecting=20InvalidArgumentException=20to=20?= =?UTF-8?q?be=20thrown=20should=20now=20pass=20again=20on=20PHP=208.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SingleConnection.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SingleConnection.php b/src/SingleConnection.php index 5052712..e2d3e7f 100644 --- a/src/SingleConnection.php +++ b/src/SingleConnection.php @@ -308,7 +308,7 @@ public function delete( array $values ): PromiseInterface { if (empty($values)) { - throw InvalidArgumentException::fromEmptyCriteria(); + throw new InvalidArgumentException('Empty criteria was used to build a query'); } $queryBuilder = $this @@ -335,7 +335,7 @@ public function update( array $values ): PromiseInterface { if (empty($id)) { - throw InvalidArgumentException::fromEmptyCriteria(); + throw new InvalidArgumentException('Empty criteria was used to build a query'); } $queryBuilder = $this @@ -404,7 +404,7 @@ public function createTable( bool $autoincrementId = false ): PromiseInterface { if (empty($fields)) { - throw InvalidArgumentException::fromEmptyCriteria(); + throw new InvalidArgumentException('Empty criteria was used to build a query'); } $schema = new Schema(); From 837df8eada9a09daa086cb766587a763da71b8c8 Mon Sep 17 00:00:00 2001 From: Marin Date: Thu, 10 Sep 2026 14:17:47 +0200 Subject: [PATCH 08/13] =?UTF-8?q?Doctrine\DBAL\Driver\Exception::getSQLSta?= =?UTF-8?q?te()=20requires=20an=20explicit=20:=20=3Fstring=20return=20type?= =?UTF-8?q?,=20but=20Drift\DBAL\Driver\Exception::getSQLState()=20had=20no?= =?UTF-8?q?ne.=20PHP=20requires=20return=20types=20to=20match=20the=20inte?= =?UTF-8?q?rface=20once=20declared,=20so=20this=20fatal=20errors=20regardl?= =?UTF-8?q?ess=20of=20DBAL=20version=20=E2=80=94=20I=20just=20hadn't=20hit?= =?UTF-8?q?=20it=20yet.=20Added=20=3Fstring=20return=20type=20to=20src\Dri?= =?UTF-8?q?ver\Exception.php;=20=3Fstring=20is=20valid=20PHP=207.4+=20synt?= =?UTF-8?q?ax,=20so=20this=20is=20safe=20for=20both=20PHP=207=20and=208.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Driver/Exception.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Driver/Exception.php b/src/Driver/Exception.php index 8a3db59..f2222b6 100644 --- a/src/Driver/Exception.php +++ b/src/Driver/Exception.php @@ -42,7 +42,7 @@ public function __construct($message, $sqlState = null, $code = 0, ?Throwable $p $this->sqlState = $sqlState; } - public function getSQLState() + public function getSQLState(): ?string { return $this->sqlState; } From d847321ad59c269a70bd15799c2cd86896419948 Mon Sep 17 00:00:00 2001 From: Marin Date: Thu, 10 Sep 2026 14:20:25 +0200 Subject: [PATCH 09/13] =?UTF-8?q?Cause:=20ExpressionBuilder::orX()/andX()?= =?UTF-8?q?=20were=20removed=20in=20DBAL=204=20(deprecated=20since=20DBAL?= =?UTF-8?q?=203.3,=20replaced=20by=20or()/and()).=20tests\ConnectionTest.p?= =?UTF-8?q?hp=20(line=20231)=20still=20called=20orX().=20Fix:=20replaced?= =?UTF-8?q?=20it=20with=20->or(...),=20which=20exists=20in=20both=20DBAL?= =?UTF-8?q?=203=20(3.9+,=20satisfies=20your=20^3|^4=20constraint)=20and=20?= =?UTF-8?q?DBAL=204=20=E2=80=94=20no=20version=20branching=20needed=20sinc?= =?UTF-8?q?e=20only=20this=20method=20name=20changed,=20not=20its=20signat?= =?UTF-8?q?ure.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/ConnectionTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ConnectionTest.php b/tests/ConnectionTest.php index d7b93da..098a0b7 100644 --- a/tests/ConnectionTest.php +++ b/tests/ConnectionTest.php @@ -228,7 +228,7 @@ public function testMultipleRows() ->query($queryBuilder ->select('*') ->from('test', 't') - ->where($queryBuilder->expr()->orX( + ->where($queryBuilder->expr()->or( $queryBuilder->expr()->eq('t.id', '?'), $queryBuilder->expr()->eq('t.id', '?') )) From 0a2c639fc009e40485c20a9bb24ac623017f91a2 Mon Sep 17 00:00:00 2001 From: Marin Date: Thu, 10 Sep 2026 14:22:30 +0200 Subject: [PATCH 10/13] Cause: Doctrine\DBAL\Exception became an interface in DBAL 4 (it was a concrete/instantiable class in DBAL 3). src\Driver\PostgreSQL\PostgreSQLDriver.php did new Exception('Connection closed') in two places (query() and insert()), which fatals on DBAL 4. Fix: replaced both with new Doctrine\DBAL\ConnectionException('Connection closed'), a concrete class implementing that Exception interface, present in both DBAL 3 and 4. This keeps tests\ConnectionTest.php's ->otherwise(function (DBALException $exception) ...) type hint satisfied (React Promise v3 checks the callback's typehint against the actual rejection reason), so the rejection is still caught correctly on both PHP/DBAL versions. --- src/Driver/PostgreSQL/PostgreSQLDriver.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Driver/PostgreSQL/PostgreSQLDriver.php b/src/Driver/PostgreSQL/PostgreSQLDriver.php index 87e67ad..977b76e 100644 --- a/src/Driver/PostgreSQL/PostgreSQLDriver.php +++ b/src/Driver/PostgreSQL/PostgreSQLDriver.php @@ -15,9 +15,9 @@ namespace Drift\DBAL\Driver\PostgreSQL; +use Doctrine\DBAL\ConnectionException; use Doctrine\DBAL\Driver\API\ExceptionConverter as ExceptionConverterInterface; use Doctrine\DBAL\Driver\API\PostgreSQL\ExceptionConverter; -use Doctrine\DBAL\Exception; use Doctrine\DBAL\Query; use Doctrine\DBAL\Query\QueryBuilder; use Drift\DBAL\Credentials; @@ -77,7 +77,7 @@ public function query( array $parameters ): PromiseInterface { if ($this->isClosed) { - return reject(new Exception('Connection closed')); + return reject(new ConnectionException('Connection closed')); } /** @@ -134,7 +134,7 @@ public function query( public function insert(QueryBuilder $queryBuilder, string $table, array $values): PromiseInterface { if ($this->isClosed) { - return reject(new Exception('Connection closed')); + return reject(new ConnectionException('Connection closed')); } $queryBuilder = $this->createInsertQuery($queryBuilder, $table, $values); From caba18cfb89aad1644db95d983d7c5ae5b46246d Mon Sep 17 00:00:00 2001 From: Marin Date: Thu, 10 Sep 2026 14:24:30 +0200 Subject: [PATCH 11/13] =?UTF-8?q?Fixed=20(actionable):=20tests\ConnectionT?= =?UTF-8?q?est.php=20=E2=80=94=20usort()=20comparator=20returned=20a=20boo?= =?UTF-8?q?l=20($a1['id']=20>=20$a2['id']),=20deprecated=20since=20PHP=208?= =?UTF-8?q?.1=20(spaceship=20required).=20Changed=20to=20$a1['id']=20<=3D>?= =?UTF-8?q?=20$a2['id'].?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/ConnectionTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ConnectionTest.php b/tests/ConnectionTest.php index 098a0b7..a37f49e 100644 --- a/tests/ConnectionTest.php +++ b/tests/ConnectionTest.php @@ -315,7 +315,7 @@ public function testFindShortcut() $this->assertNull($results[1]); $listResults = $results[2]; usort($listResults, function ($a1, $a2) { - return $a1['id'] > $a2['id']; + return $a1['id'] <=> $a2['id']; }); $this->assertSame($listResults, [ From cccf80702cf74ec83701cc79e1b6540783ad5882 Mon Sep 17 00:00:00 2001 From: Marin Date: Thu, 10 Sep 2026 14:27:05 +0200 Subject: [PATCH 12/13] =?UTF-8?q?vendor=20issue:=20The=20React\MySQL\Comma?= =?UTF-8?q?nds\QueryCommand::$message/$resultFields=20dynamic=20property?= =?UTF-8?q?=20deprecations=20(PHP=208.2)=20come=20from=20vendor\react\mysq?= =?UTF-8?q?l\src\Io\Parser.php,=20third-party=20code.=20so:=20=E2=80=A2=20?= =?UTF-8?q?Upgrade=20react/mysql=20to=20a=20version=20that=20declares=20th?= =?UTF-8?q?ese=20properties=20(check=20for=20a=20newer=20release=20compati?= =?UTF-8?q?ble=20with=20your=20constraints),=20Bumped=20composer.json:=20"?= =?UTF-8?q?react/mysql":=20"^0.5"=20=E2=86=92=20"react/mysql":=20"^0.6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6283a76..157780c 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "require-dev": { "phpunit/phpunit": "^9", "clue/block-react": "^1", - "react/mysql": "^0.5", + "react/mysql": "^0.6", "clue/reactphp-sqlite": "^1", "voryx/pgasync": "^2" }, From 6e18ee21ed94e139a1634a72d8146a66704fe836 Mon Sep 17 00:00:00 2001 From: Marin Date: Thu, 10 Sep 2026 14:29:44 +0200 Subject: [PATCH 13/13] =?UTF-8?q?Cause:=20DBAL=204=20renamed=20Doctrine\DB?= =?UTF-8?q?AL\Platforms\SqlitePlatform=20(DBAL=203)=20to=20Doctrine\DBAL\P?= =?UTF-8?q?latforms\SQLitePlatform=20=E2=80=94=20a=20hard=20rename,=20no?= =?UTF-8?q?=20BC=20alias.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix: in tests\SQLiteConnectionTest.php, replaced the static use SqlitePlatform import with a runtime class_exists() check that picks SQLitePlatform if available (DBAL 4), falling back to SqlitePlatform (DBAL 3). Verified testQueryBuilder now passes. --- tests/SQLiteConnectionTest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/SQLiteConnectionTest.php b/tests/SQLiteConnectionTest.php index e1b6937..65b21f3 100644 --- a/tests/SQLiteConnectionTest.php +++ b/tests/SQLiteConnectionTest.php @@ -15,7 +15,7 @@ namespace Drift\DBAL\Tests; -use Doctrine\DBAL\Platforms\SqlitePlatform; +use Doctrine\DBAL\Platforms\AbstractPlatform; use Drift\DBAL\Connection; use Drift\DBAL\Credentials; use Drift\DBAL\Driver\SQLite\SQLiteDriver; @@ -32,7 +32,12 @@ class SQLiteConnectionTest extends ConnectionTest */ public function getConnection(LoopInterface $loop): Connection { - $platform = new SqlitePlatform(); + $platformClass = class_exists(\Doctrine\DBAL\Platforms\SQLitePlatform::class) + ? \Doctrine\DBAL\Platforms\SQLitePlatform::class + : \Doctrine\DBAL\Platforms\SqlitePlatform::class; + + /** @var AbstractPlatform $platform */ + $platform = new $platformClass(); return SingleConnection::createConnected(new SQLiteDriver( $loop