Skip to content

Comments

Leverage PHP 8.4 PDO classes, fix PHP 8.5 deprecation#7132

Merged
derrabus merged 1 commit intodoctrine:3.10.xfrom
nicolas-grekas:sqlite-deprec
Sep 4, 2025
Merged

Leverage PHP 8.4 PDO classes, fix PHP 8.5 deprecation#7132
derrabus merged 1 commit intodoctrine:3.10.xfrom
nicolas-grekas:sqlite-deprec

Conversation

@nicolas-grekas nicolas-grekas changed the base branch from 4.3.x to 3.10.x September 4, 2025 13:55
@nicolas-grekas nicolas-grekas force-pushed the sqlite-deprec branch 3 times, most recently from a56125f to dbf3777 Compare September 4, 2025 14:03
@derrabus
Copy link
Member

derrabus commented Sep 4, 2025

We've merged support for the new PDO classes as a feature in #6532. Can you try to cherry-pick that change so 3.x and 4.x don't diverge too much?

@nicolas-grekas
Copy link
Member Author

@derrabus sure, PR updated, all green :shipit:

@derrabus
Copy link
Member

derrabus commented Sep 4, 2025

Do we need to update those as well?

$driverOptions ??= PDO::SQLSRV_ENCODING_BINARY;

$driverOptions = PDO::SQLSRV_ENCODING_SYSTEM;

@nicolas-grekas
Copy link
Member Author

They're not concerned by the RFC/deprecation.

@derrabus
Copy link
Member

derrabus commented Sep 4, 2025

Ah yes, because SQLSRV is a PECL extension. We should probably monitor this, but for now the PR should be good. Thank you for working on this, @nicolas-grekas!

@derrabus derrabus added this to the 3.10.2 milestone Sep 4, 2025
@derrabus derrabus merged commit cd7da68 into doctrine:3.10.x Sep 4, 2025
110 of 112 checks passed
derrabus added a commit to derrabus/dbal that referenced this pull request Sep 4, 2025
* 3.10.x:
  Leverage PHP 8.4 PDO classes, fix PHP 8.5 deprecation (doctrine#7132)
  Run tests on MySQL 8.4 LTS and 9.4 (doctrine#7133)
derrabus added a commit that referenced this pull request Sep 4, 2025
|      Q       |   A
|------------- | -----------
| Type         | documentation
| Fixed issues | N/A

#### Summary

Deprecations introduced with PHP 8.5 forced us to backport #6532 as
#7132. In this PR, I'm also backporting the entry from our UPGRADE.md
documentation.
derrabus added a commit to derrabus/dbal that referenced this pull request Sep 4, 2025
* 3.10.x:
  Document the PDO subclasses backport (doctrine#7137)
  Downgrade PHP for the DB2 workflow (doctrine#7134)
  Workaround for MySQL 8.4 and unknown users (doctrine#7136)
  Leverage PHP 8.4 PDO classes, fix PHP 8.5 deprecation (doctrine#7132)
  Run tests on MySQL 8.4 LTS and 9.4 (doctrine#7133)
derrabus added a commit to derrabus/dbal that referenced this pull request Sep 4, 2025
* 4.3.x:
  Remove obsolete upgrade note (doctrine#7138)
  Document the PDO subclasses backport (doctrine#7137)
  Downgrade PHP for the DB2 workflow (doctrine#7134)
  Workaround for MySQL 8.4 and unknown users (doctrine#7136)
  Leverage PHP 8.4 PDO classes, fix PHP 8.5 deprecation (doctrine#7132)
  Run tests on MySQL 8.4 LTS and 9.4 (doctrine#7133)
derrabus added a commit to derrabus/dbal that referenced this pull request Sep 4, 2025
* 4.4.x:
  Remove obsolete upgrade note (doctrine#7138)
  Document the PDO subclasses backport (doctrine#7137)
  Downgrade PHP for the DB2 workflow (doctrine#7134)
  Workaround for MySQL 8.4 and unknown users (doctrine#7136)
  Leverage PHP 8.4 PDO classes, fix PHP 8.5 deprecation (doctrine#7132)
  Run tests on MySQL 8.4 LTS and 9.4 (doctrine#7133)
derrabus added a commit that referenced this pull request Sep 4, 2025
|      Q       |   A
|------------- | -----------
| Type         | bug
| Fixed issues | N/A

#### Summary

While merging up the changes from #7132, I noticed that the new code is
in fact a little less strict than the old one. Previously, we required
the `PDO::PGSQL_ATTR_DISABLE_PREPARES` option to be set to `true` while
after the change we would accept any truthy value. I don't think that
it's a big deal, but I also believe that this change was not intended.
Thus, I'm restoring the old behavior.
derrabus added a commit to derrabus/dbal that referenced this pull request Sep 4, 2025
* 4.4.x:
  Make options check strict again
  Make options check strict again (doctrine#7141)
  Remove obsolete upgrade note (doctrine#7138)
  Document the PDO subclasses backport (doctrine#7137)
  Downgrade PHP for the DB2 workflow (doctrine#7134)
  Workaround for MySQL 8.4 and unknown users (doctrine#7136)
  Leverage PHP 8.4 PDO classes, fix PHP 8.5 deprecation (doctrine#7132)
  Run tests on MySQL 8.4 LTS and 9.4 (doctrine#7133)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants