Problem/Motivation

Only mysql driver is affected

Steps to reproduce

https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_driver_specific_...

Proposed resolution

- add check for PHP version and use version specific constants
- add TODO to clean-up condition when core require PHP 8.5 as minimal version

Remaining tasks

review/commit

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3543710

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

andypost created an issue. See original summary.

andypost’s picture

Status: Active » Needs review
mondrake’s picture

Status: Needs review » Needs work

PDO driver subclasses were introduced by PHP 8.4 so I think we can use them also in 8.4. and not just in 8.5.

catch’s picture

Apart from #4 this looks good to me. We could maybe open a stub 12.x ticket to check all usages of PHP_VERSION_ID for clean-up, probably one ticket for all of those would be enough.

andypost’s picture

Filed for #5 #3543835: Clean up PHP_VERSION_ID conditions for unsupported PHP versions

@mondrake yes, subclasses added in 8.4 so I checked and see that constants added as well

php -r 'echo \PDO\Mysql::ATTR_FOUND_ROWS;'
1005

so I lowered version check but phpstan probably has no valid stubs and can't find this classes, probably because it consuming PHP version from composer where it's 8.3

andypost’s picture

Status: Needs work » Needs review

maybe instead of inline comment better to update phpstan's baseline?

mondrake’s picture

Status: Needs review » Reviewed & tested by the community

I think inline ignores are ok in this case. RTBC

catch’s picture

Status: Reviewed & tested by the community » Fixed

Yeah I can also live with the inline ignores - it's a very specific case and we can remove them as soon as we require PHP 8.5.

Committed/pushed to 11.x, thanks!

  • catch committed 4b2163cd on 11.x
    Issue #3543710 by andypost, mondrake: Address PHP 8.5 deprecations of...
catch’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.