Problem/Motivation
11.3 release should be PHP 8.5 compatible, see https://wiki.php.net/todo/php85
Features implemented in 8.5
New deprecations https://wiki.php.net/rfc/deprecations_php_8_5 (see child issues)
Tracking of deprecations to commit https://github.com/php/php-src/issues/19468
Symfony https://github.com/symfony/symfony/issues/61772
There's symfony/polyfill-php85 could be added with NoDiscard RFC for batching
Steps to reproduce
https://github.com/symfony/polyfill-php85
Proposed resolution
As CI already running 8.5 enable the polyfill
Upgrade dependencies
Remaining tasks
discus adoption of PHP 8.5
Remaining tasks
- #3557585: Update to Composer 2.9.2 composer 2.9.1+ (has compatibility issues #3557585: Update to Composer 2.9.2)
already fixed dependencies
- https://github.com/minkphp/MinkBrowserKitDriver/releases/tag/v2.3.0 #3559412: Upgrade behat/mink and behat/mink-browserkit-driver for PHP 8.5
- https://github.com/phpspec/prophecy/releases/tag/v1.24.0 (phpspec+prophecy) #3559280: Upgrade phpspec/prophecy to 1.24
- https://github.com/symfony/symfony/pull/61662 6.4.26/7.4 branches #3552765: Update Composer dependencies for 11.3.0
- https://github.com/mck89/peast/releases/tag/v1.17.4
- https://github.com/phpspec/prophecy/releases/tag/v1.23.0
- https://github.com/sebastianbergmann/recursion-context/releases/tag/6.0.3
- https://github.com/Lullabot/php-webdriver/releases/tag/v2.0.7
- https://github.com/nikic/PHP-Parser/releases/tag/v5.6.1
- https://github.com/phpDocumentor/ReflectionDocBlock/releases/tag/5.6.3
- https://github.com/reactphp/promise/releases/tag/v3.3.0
- https://github.com/guzzle/guzzle/releases/tag/7.10.0
- https://getcomposer.org/changelog/2.8.11
- #3540531: Fix ToolkitGdTest for PHP 8.5
- #3546535: [meta] Deal with NULL as array key/offset
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3523596
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
Comment #2
andypostadded list of implemented https://wiki.php.net/rfc#php_85
Comment #3
andyposthttps://wiki.php.net/rfc/deprecations_php_8_5
Comment #4
andypostComment #5
xjmComment #6
xjmComment #8
mondrakeI did not mean to open a fork… must have tapped something inadvertently.
Comment #10
andypostFirst Phpstan error on 8.5 alpha3
Comment #11
andypostThe
ToolkitGdTesttest fails probably because of- https://github.com/php/php-src/pull/17375
- https://github.com/php/php-src/pull/19107
Comment #12
andypostFiled issue for the test #3540531: Fix ToolkitGdTest for PHP 8.5
Comment #13
andypostAlso created 2 fixes for commited deprecations (will be released on August 13)
#3540525: Remove remaining usage of setAccessible()
#3540528: Clean-up deprecated non-standard cast names
Comment #14
andypostone more deprecation to fix #2901831: Only use colons in case statements
Comment #15
andypostA bit more deprecations
php message: PHP Deprecated: Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead in /var/www/html/web/vendor/react/promise/src/functions.php on line 300https://github.com/reactphp/promise/commit/d3998c8a5d3cff0b39b2f332da550...
need new issue for guzzle
Comment #16
andyposthttps://github.com/nikic/PHP-Parser/commit/02dcdd74bb328ca0bd9b9e459ca25...
and one more https://github.com/sebastianbergmann/recursion-context/pull/32
Comment #17
andypost- https://github.com/guzzle/guzzle/issues/3297
- https://github.com/Lullabot/php-webdriver/pull/16
- https://github.com/minkphp/MinkBrowserKitDriver/pull/185
Comment #18
andypostUpdated IS with curent state
Comment #19
andypostComment #20
andypostComment #21
andypostone more deprecation commited https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_integers...
+ https://github.com/php/php-src/commit/fb87b14b6cb7a3895fb327062805a4a22c...
Comment #22
mondrake@andypost now #3541427: Bump PHPUnit to ^11.5.34 with all dependencies for testing with PHP 8.5 fixes some of the dependencies telated issues
Comment #23
andypost4 deps left https://github.com/phpDocumentor/ReflectionDocBlock/releases/tag/5.6.3
Comment #24
andyposthttps://github.com/phpspec/prophecy/commit/b6eee2b6fc274809c107bb0fb6ee2...
+ new deprecation commited to beta2
https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_arrayobject_and_...
Comment #25
andypostNew URI class commited https://wiki.php.net/rfc/url_parsing_api
Comment #26
andypostFiled separare issue for Guzzle upgrade #3542827: Upgrade Guzzle to 7.10 for PHP 8.5 support
Comment #27
andypostBeta2 is tagged and all tests fail again because PDO constants are deprecated
Comment #28
andyposttracking of deprecations https://github.com/php/php-src/issues/19468
Comment #29
andypostNeeds separate issues
- https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_driver_specific_...
- https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_arrayobject_and_...
EDIT Filed https://github.com/jsonrainbow/json-schema/pull/840
Comment #30
catchI think we should open a new issue to discuss #NoDiscard so retitling this one.
Comment #31
catchUpdated MR status in the issue summary a bit. It looks like justinrainbow/json-schema is planning to do a release tomorrow, if we're able to update to that next week then I think that will get us to clean phpunit test runs on PHP 8.5
@andypost are there already issues open for the remaining core changes like the mysql driver?
Comment #32
andypostI need to file new issues for mysql, migrate and chr(), probably last 2 could be done in one task
The biggest challenge is #3540531: Fix ToolkitGdTest for PHP 8.5
PS: once
justinrainbow/json-schemawill be merged, composer should create another release and it will fix package manager testsComment #33
andypostupdated IS with new releases
Comment #34
andypostFiled
- #3543710: Address PHP 8.5 deprecations of driver specific PDO constants and methods
- #3543711: Fix PHP 8.5 deprecations of chr() and array iterator
Comment #35
andypostWaiting for next composer release
https://github.com/composer/composer/pull/12517
Comment #36
andypostThe
#Deprecatedattribute now allowed for traits to deprecate https://github.com/php/php-src/commit/34a6e86282508d3b3c592d7156727204aa...Comment #37
andypostnew depecations
and in unit tests
Comment #38
andypostcommited https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_sleep_and_wa...
Comment #39
andypostfixed some deprecations, needs to patch symfony with commited https://github.com/symfony/symfony/pull/61662
Comment #40
andypostnew 2 big issues
- #3546531: Use specific PDO drivers instead of PDOConnection
- #3546535: [meta] Deal with NULL as array key/offset
Comment #41
andypostone more dependency needs update additionally to SF
Comment #42
andypostadded to IS https://github.com/mck89/peast/pull/72
all tests except GD (got fixes in master) and package manager are passing, so now needs to extract array index to #3546535: [meta] Deal with NULL as array key/offset
some changes require to be extracted into own tasks
Comment #43
andypostpeast merged https://github.com/mck89/peast/commit/dd8c8ce0283c65005c0b163d468e43ee15...
Comment #44
andypostmysql and pgsql tests are green!
sqlite getting locking error mostly every Functional test
Comment #45
andypostAs of PHP 8.5RC1 new nightmare https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_sleep_and_wa...
Comment #46
andyposthttps://github.com/symfony/symfony/pull/61727
Comment #47
steinmb commentedRegarding #45 - https://wiki.php.net/rfc/soft-deprecate-sleep-wakeup could alter this specific deprecation
Comment #48
andypost@steinmb yes, there's hope it will be accepted for 8.5 but IMO it's too late, that's why SF already fixed their code and Laravel doing the same
Comment #49
andypostFiled separate issue #3548971: Replace PHP soft-deprecated __sleep()/__wakeup() with __serialize()/__unserialize()
Comment #50
andypostSerialization needs revert as went in as soft-deprecation https://github.com/php/php-src/commit/fc353966f3976f733a2d038ce9b29016c4...
Comment #52
andypostAs of RC2 and Symfony update mostly green and serialization no longer fail
new deprecation
Comment #53
mondrake#52 is fixed by #3550479: Bump PHPUnit to ^11.5.42 with all dependencies for testing with PHP 8.5
Comment #54
andyposthttps://github.com/phpspec/prophecy/releases/tag/v1.23.0 is out
Comment #55
andypostonly 2 dependencies waiting for release
- mck89/peast
- minkphp/MinkBrowserKitDriver
Symfony packages upgrade required and composer constraints to allow install core on 8.5
at Drupal side 2 issues
- #3540531: Fix ToolkitGdTest for PHP 8.5
- #3546535: [meta] Deal with NULL as array key/offset
Comment #56
andypostnew release https://github.com/mck89/peast/releases/tag/v1.17.4
Comment #57
andypostfiled #3551524: Update mck89/peast to 1.17.4 for PHP 8.5
Comment #58
andypostupdated IS and filed - #3551569: Update symfony/* with dependencies for PHP 8.5
Comment #59
andypostAs newer masterminds/html5 fail our tests it makes sense to start transition to native HTML5 parser #3463613: Explore PHP 8.4 native HTML 5 parser vs html5-php
Comment #60
andypostSF updates landed and #3553296: Fix string type hints to Container getters for PHP 8.5 should fix component unit test
Comment #61
andypostAdded patch for AVIF/HEIF to 8.5 PHP CI image but I see no changes in GD tests
Tests: 120, Assertions: 1277, Failures: 27.Previous pipeline showed 1 new failure which no longer valid
Comment #62
andypostUpgrade to 2.9.0-RC1 version of composer caused one more failure
Comment #63
catchDo we need to change
COMMAND: COMPOSER_ROOT_VERSION="1.0.0-rc1"to a higher version?Comment #64
alexpottWe should be making something up from the \Drupal::VERSION constant in these tests I guess - it'll be a better test rather then disabling composer features. We should open an issue to update composer and decouple this discussion from the PHP upgrade stuff.
Comment #66
andypostNull index fixed, thanks a lot to @alexpott who finished it! #3546535: [meta] Deal with NULL as array key/offset
the only remaining blockers are
- https://github.com/phpspec/phpspec/pull/1500 (remaining package manager test failures)
- https://github.com/minkphp/MinkBrowserKitDriver/pull/185#issuecomment-33...
Comment #68
mondrakehttps://github.com/phpspec/prophecy/releases/tag/v1.24.0 just out of the oven
Comment #69
andypostfiled #3559280: Upgrade phpspec/prophecy to 1.24 as build tests are green now but new regression after #3557167: Fix deprecations in \Drupal\Core\ImageToolkit\ImageToolkitManager::getDefaultToolkitId() due to kernel testing
Comment #70
andypostUpdated IS and filed #3559286: Fix EntityLinksTest for PHP 8.5 regression fix as pipeline are green again
Comment #71
andypostFiled the last fix (except composer 2.9) #3559412: Upgrade behat/mink and behat/mink-browserkit-driver for PHP 8.5
Comment #72
andypostConsider it fixed!
PS: composer issue is no loner about compatibility #3557585: Update to Composer 2.9.2
Comment #75
catchWe should add PHP 8.5 to the on-commit pipeline, currently it only includes PHP 8.4 and 8.3. e.g. https://git.drupalcode.org/project/drupal/-/pipelines/669360
Would be good to keep that to three environments still, - so three databases and three PHP versions. Maybe we can update sqlite or postgresql to PHP 8.4 and run MySQL against PHP 8.5?
Comment #76
alexpott@catch see #3559487: Default to PHP 8.5 for testing to prevent regressions
Comment #77
catchJust committed that one. I think we can mark this fixed then!