File tree Expand file tree Collapse file tree 4 files changed +42
-21
lines changed Expand file tree Collapse file tree 4 files changed +42
-21
lines changed Original file line number Diff line number Diff line change @@ -156,18 +156,19 @@ jobs:
156156 - " 8.4"
157157 mysql-version :
158158 - " 8.0"
159- - " 9.3"
159+ - " 8.4" # LTS
160+ - " 9.4"
160161 extension :
161162 - " mysqli"
162163 - " pdo_mysql"
163164 include :
164165 - config-file-suffix : " -tls"
165166 php-version : " 8.4"
166- mysql-version : " 9.1 "
167+ mysql-version : " 9.4 "
167168 extension : " mysqli"
168169 - config-file-suffix : " -stringify_fetches"
169170 php-version : " 8.4"
170- mysql-version : " 9.1 "
171+ mysql-version : " 9.4 "
171172 extension : " pdo_mysql"
172173
173174 phpunit-mssql :
@@ -190,17 +191,18 @@ jobs:
190191 - " Latin1_General_100_CI_AS_SC_UTF8"
191192 - " Latin1_General_100_CS_AS_SC_UTF8"
192193
193- phpunit-ibm-db2 :
194- name : " PHPUnit with IBM DB2"
195- needs : " phpunit-smoke-check"
196- uses : ./.github/workflows/phpunit-db2.yml
197- with :
198- php-version : ${{ matrix.php-version }}
199-
200- strategy :
201- matrix :
202- php-version :
203- - " 8.4"
194+ # The DB2 workflow currently segfaults with PHP 8.4
195+ # phpunit-ibm-db2:
196+ # name: "PHPUnit with IBM DB2"
197+ # needs: "phpunit-smoke-check"
198+ # uses: ./.github/workflows/phpunit-db2.yml
199+ # with:
200+ # php-version: ${{ matrix.php-version }}
201+ #
202+ # strategy:
203+ # matrix:
204+ # php-version:
205+ # - "8.4"
204206
205207 development-deps :
206208 name : " PHPUnit with PDO_SQLite and development dependencies"
Original file line number Diff line number Diff line change @@ -843,10 +843,7 @@ and `::dropUniqueConstraint()` respectively instead.
843843## Support for new PDO subclasses on PHP 8.4
844844
845845On PHP 8.4, if you call ` getNativeConnection() ` on a connection established through one of the PDO drivers,
846- you will get an instance of the new PDO subclasses, e.g. ` Pdo\Mysql ` or ` Pdo\Ppgsql ` instead of just ` PDO ` .
847-
848- However, this currently does not apply to persistent connections.
849- See https://github.com/php/php-src/issues/16314 for details.
846+ you will get an instance of the new PDO subclasses, e.g. ` Pdo\Mysql ` or ` Pdo\Pgsql ` instead of just ` PDO ` .
850847
851848## Minor BC break: incompatible query cache format
852849
@@ -1799,6 +1796,16 @@ The following methods have been removed.
17991796
18001797# Upgrade to 3.10
18011798
1799+ ## Support for new PDO subclasses on PHP 8.4
1800+
1801+ In 3.10.2, we've backported support for new PDO subclasses introduced in PHP 8.4 because not using them
1802+ could trigger deprecation warnings under certain circumstances in PHP 8.5.
1803+
1804+ On PHP 8.4, if you call ` getNativeConnection() ` on a connection established through one of the PDO drivers,
1805+ you will get an instance of the new PDO subclasses, e.g. ` Pdo\Mysql ` or ` Pdo\Pgsql ` instead of just ` PDO ` .
1806+
1807+ ## Optional ` doctrine/cache ` dependency
1808+
18021809The ` doctrine/cache ` package is now an optional dependency. If you are using the
18031810` Doctrine\DBAL\Cache ` classes, you need to require the ` doctrine/cache ` package
18041811explicitly.
Original file line number Diff line number Diff line change 2222use Doctrine \DBAL \Exception \UniqueConstraintViolationException ;
2323use Doctrine \DBAL \Query ;
2424
25+ use function str_contains ;
26+
2527/** @internal */
2628final class ExceptionConverter implements ExceptionConverterInterface
2729{
@@ -31,6 +33,15 @@ final class ExceptionConverter implements ExceptionConverterInterface
3133 */
3234 public function convert (Exception $ exception , ?Query $ query ): DriverException
3335 {
36+ if (
37+ $ exception ->getCode () === 1524
38+ && str_contains ($ exception ->getMessage (), 'Plugin \'mysql_native_password \' is not loaded ' )
39+ ) {
40+ // Workaround for MySQL 8.4 if we request an unknown user.
41+ // https://bugs.mysql.com/bug.php?id=114876
42+ return new ConnectionException ($ exception , $ query );
43+ }
44+
3445 return match ($ exception ->getCode ()) {
3546 1008 => new DatabaseDoesNotExist ($ exception , $ query ),
3647 1213 => new DeadlockException ($ exception , $ query ),
Original file line number Diff line number Diff line change 99use Doctrine \DBAL \Driver \PDO \Exception ;
1010use Doctrine \DBAL \Driver \PDO \Exception \InvalidConfiguration ;
1111use PDO ;
12+ use Pdo \Pgsql ;
1213use PDOException ;
1314use SensitiveParameter ;
1415
@@ -50,10 +51,10 @@ public function connect(
5051 }
5152
5253 if (
53- ! isset ($ driverOptions [PDO :: PGSQL_ATTR_DISABLE_PREPARES ])
54- || $ driverOptions [PDO :: PGSQL_ATTR_DISABLE_PREPARES ] === true
54+ ! isset ($ driverOptions [Pgsql:: ATTR_DISABLE_PREPARES ])
55+ || $ driverOptions [Pgsql:: ATTR_DISABLE_PREPARES ] === true
5556 ) {
56- $ pdo ->setAttribute (PDO :: PGSQL_ATTR_DISABLE_PREPARES , true );
57+ $ pdo ->setAttribute (Pgsql:: ATTR_DISABLE_PREPARES , true );
5758 }
5859
5960 $ connection = new Connection ($ pdo );
You can’t perform that action at this time.
0 commit comments