Problem/Motivation
PHP 8.4 alpha1 released at July 6, 2024, feature freeze and first beta at Aug 15 2024, stable is expected November 21, 2024.
Release schedule is https://wiki.php.net/todo/php84
Release cycle change https://wiki.php.net/rfc/release_cycle_update
Proposed resolution
General deprecations RFC https://wiki.php.net/rfc/deprecations_php_8_4
Remaining follow-up #3490454: [META] Replace E_USER_WARNING with exception handling for edge cases in error reporting
Done
- Deprecate passing E_USER_ERROR to trigger_error() - #3465827: Stop passing E_USER_ERROR to trigger_error() on PHP 8.4
- Deprecate proprietary CSV escaping mechanism #3477324: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4
- Closures now displays its source location, see merged PR #3477366: Fix closures in tests for PHP 8.4
- Remove E_STRICT error level and deprecate E_STRICT constant - #3465826: Remove deprecated in PHP 8.4 the \E_STRICT usage
Deprecations in dependencies
- issue #624 #3488401: upgrade prophecy to 1.20
- #3484463: Upgrade open-telemetry packages for PHP 8.4
- https://github.com/minkphp/Mink/pull/869 #3484728: update behat/mink to 1.12.0 for PHP 8.4
- composer 2.8.2 https://github.com/composer/composer/commit/8ae6fa1205897dcfc57867542c94...
- phpstan dependencies https://github.com/reactphp/promise/pull/259
- phpunit 10.5.35/9.6.21 #3477361: Update phpunit/phpunit to 9.6.21 for PHP 8.4
- guzzle fixed guzzle, promises, psr - waiting for 7.8.2 release
- https://github.com/open-telemetry/opentelemetry-php/pull/1297 commit
- - justinrainbow/json-schema fixed via 5.3.0 and composer 2.7.8
- https://github.com/bovigo/vfsStream/issues/289, PR, v1.6.12 #3471080: Update mikey179/vfsstream to v1.6.12 for PHP 8.4
Remaining tasks
- #3414933: [PHP 8.4] Use DOMDocument HTML5 support when available
- Get CI environment #3488473: Add core testing using PHP 8.4
- track progress of changes in upcoming releases
- #3479340: Adopt #[\Deprecated] attribute the RFC
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3427903
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
andyposthttps://wiki.php.net/rfc/release_cycle_update#proposed_voting_choices
Comment #4
andypost- https://github.com/justinrainbow/json-schema/pull/717
- https://github.com/reactphp/promise/pull/259
Comment #5
andyposthttps://github.com/nette/di/commit/a548b1cfce285ced0f48cd046c10170349a15a3e
https://github.com/symfony/console/commit/de9a8d9180443d953e5cefc89bd164...
Comment #6
andypostComment #7
andypostComment #8
andypostFiled one more child #3444264: [PHP 8.4] ReflectionMethod constructor deprecated with one argument
Comment #9
andypostAdded https://github.com/phpspec/prophecy/issues/624
Comment #10
andypostComment #11
andypostComment #12
andypostbeta updates (via commit 2ad2c6b1c4) fixed https://github.com/php-fig/http-factory/commit/2e735aa9fca24c41454faae25...
Comment #13
andypostupdated vendor patch as
vendor/psr/http-factory/src/UploadedFileFactoryInterface.phpis fixedComment #14
catchTentatively tagging this for 10.3 and 11.0 release highlights. It would be pretty nice to be able to say we're compatible with PHP 8.4 before it's even released, although feels like there might be more breaking changes before it gets to rc, so maybe only really possible for 11.0 rather than 10.3. If there's still outstanding issues or we're not convinced about 8.4 stability, we could change this to 10.4/11.1.
Comment #15
andypostAs release schedule updated, PHP feature freeze (13 Aug) and first beta at Aug 15 2024
Added to IS
Comment #16
andypostATM the real blocker to pass tests is "prophecy" as usual, all failed tests are caused by not fixed (nullable types) when mocks are instantiated
Comment #17
andypostbtw the commit can be split to new issue https://git.drupalcode.org/project/drupal/-/merge_requests/7783/diffs?co...
Comment #18
andypostComment #19
andypostPublished PHP 8.4_alpha1 image
Comment #20
andypostComposer's dependency fixed https://github.com/jsonrainbow/json-schema/releases/tag/5.3.0
Comment #21
andypostComment #22
andypostUpdated IS, for alpha2 a bit less tests failed
only on build-test remains
Comment #23
andypostOnly 1 failed test left (see #22) https://git.drupalcode.org/issue/drupal-3427903/-/pipelines/226036/test_...
Also there's a lot of deprecations because of prophecy but they could be added to ignored deprecations
Comment #24
catchThat build test failure looks familiar and is something to do with sqlite, #3458975: GenerateThemeTest::testContribStarterkitDevSnapshotWithGitNotInstalled fails on sqlite shows the same error.
Comment #25
andypostnow all tests passed https://git.drupalcode.org/issue/drupal-3427903/-/pipelines/226076/test_...
the commit needs own issue
Comment #26
rfayDDEV HEAD has PHP8.4.0alpha2 now, this should help with resolving the various issues. This will be updated and be in the next DDEV release, but is already available easily via HEAD, even using Homebrew. See https://ddev.readthedocs.io/en/stable/developers/building-contributing/#...
Comment #27
andypostI pushed to CI 8.4alpha3 using patch so in 2 weeks first beta should arive
Ref https://git.drupalcode.org/project/drupalci_environments/-/commit/753d2a...
Comment #28
andypostPHP released alpha4 instead of broken alpha3
Ref https://downloads.php.net/~saki/
Comment #29
andypostGuzzle fixed after #3465122: Update composer dependencies prior to 11.0.0
Comment #30
xjmMoving to target 11.1.0/10.4.0. Some or all of the fixes might still be backportable to the patch branches, but targeting the minors will help us keep track of things as we get closer to the PHP 8.4.0 release.
Comment #31
andypostVoting for 8.4 deprecations closed
- Deprecate passing
E_USER_ERRORtotrigger_error()- Remove
E_STRICTerror level and deprecateE_STRICTconstantComment #32
andypostComment #33
andypostFiled
- #3465826: Remove deprecated in PHP 8.4 the \E_STRICT usage
- #3465827: Stop passing E_USER_ERROR to trigger_error() on PHP 8.4
Comment #34
andypostAll tests pass now except
BigPipeTestcaused by #3465827: Stop passing E_USER_ERROR to trigger_error() on PHP 8.4Comment #35
andypostcomposer finally released https://getcomposer.org/changelog/2.7.8
production 8.4 image updated so less changes in pipeline
Comment #36
andypostOne more deprecation commited https://wiki.php.net/rfc/deprecate-get-post-sessions
Comment #37
andypostFiled #3470075: PHP 8.4 GET/POST sessions are deprecated
Comment #38
andypostNew child as backportable to 10.3 #3471080: Update mikey179/vfsstream to v1.6.12 for PHP 8.4
Comment #39
andypostupdated remaining dependencies
Comment #40
andypostLanded #3465836: PHP 8.4 session.sid_length and session.sid_bits_per_character are deprecated
Comment #41
andypostPHPstan fixed by pcov added 8.4 image and now only BigPipe test fails
Comment #42
andypostCommited 2 more
- #3470075: PHP 8.4 GET/POST sessions are deprecated
- #3471080: Update mikey179/vfsstream to v1.6.12 for PHP 8.4
one more simple fix #3465826: Remove deprecated in PHP 8.4 the \E_STRICT usage
Comment #43
andypostFirst green run!
The changes in the fix probably needs split #3465827: Stop passing E_USER_ERROR to trigger_error() on PHP 8.4
Comment #44
andypostPHP 8.4 allow to use `#[Deprecated]` attribute even for class/interface constants https://3v4l.org/rGPoD/rfc
results
Comment #45
andypostComment #46
andypostFixed in 11.x #3465826: Remove deprecated in PHP 8.4 the \E_STRICT usage
Comment #47
andypostDeprecation of
E_STRICTjust commited and fix backported to 10.4 in #3465826: Remove deprecated in PHP 8.4 the \E_STRICT usageComment #48
andypostI pushed update of PHP CI image to 8.4.0 RC1 and a lots of new deprecations appeared... both in core and vendors(
Comment #49
andypostNew deprecations
- https://github.com/composer/composer/commit/8ae6fa1205897dcfc57867542c94...
- https://github.com/sebastianbergmann/phpunit/commit/d7d8e73cfc78788ff6c7...
Comment #50
andypostFiled #3477307: Fix str_getcsv() usage for PHP 8.4
Comment #51
andypostone more child #3477324: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4
Comment #52
andypostFiled #3477361: Update phpunit/phpunit to 9.6.21 for PHP 8.4
composer patch should wait for 2.7.10
Comment #53
andypostAnd the last issue filed with patch #3477366: Fix closures in tests for PHP 8.4
Comment #55
andypostphpunit upgraded to 11.x and will be backported to 10.4
Comment #56
andypostComment #57
andypostComment #58
andypostFiled minor upgrade for composer #3478331: Upgrade composer to 2.8.1 for PHP 8.4
Comment #59
rfayJust stopping by to say thanks for all your work on this!
Comment #60
andypostComposer dependencies been updated so remaining incompatibilities are 3 packages + phpstan (still using patches)
The only blocker is #3465827: Stop passing E_USER_ERROR to trigger_error() on PHP 8.4
PS: RTBC and waiting for commit #3477324: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4
Comment #61
andypostadded for discussion #3479340: Adopt #[\Deprecated] attribute
Comment #62
andypostComment #64
andypostPhpstan no longer needs patching but composer 2.8.1 (core build test) need to resolve https://github.com/composer/composer/issues/12150#issuecomment-2423790429
Still 2 issues to fix
- #3477324: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4
- #3465827: Stop passing E_USER_ERROR to trigger_error() on PHP 8.4
Comment #65
andypostcomposer fixed the issue so waiting for 2.8.2 release to update images
Comment #66
andypostFiled open-telemetry upgrade #3484463: Upgrade open-telemetry packages for PHP 8.4
So only Mink and Prophecy releases left to wait
Comment #67
andypostFiled #3484728: update behat/mink to 1.12.0 for PHP 8.4
Comment #68
andypostOT merged, only prophecy left (updated IS)
Comment #69
andypostFor 10.4 tricky backport required as of beta state #3304746: BigPipe cannot handle (GET) form redirects (EnforcedResponseException)
Comment #70
andypostComment #71
andypostUpdated IS as there's one dependency waiting for release (Prophecy) and the only issue left #3465827: Stop passing E_USER_ERROR to trigger_error() on PHP 8.4
Comment #72
andypostProphecy has new release so filed last dependency upgrade - #3488401: upgrade prophecy to 1.20
PS: 10.5/10.4 branches require more upgrades (guzzle at least) via #3486545: Update Composer dependencies for 10.4.0-beta1
Comment #73
andypostAnnounced 8.4.1 https://www.php.net/releases/8.4/
Comment #74
andypostComment #75
andypostSo only 1 failure for 10.4 left
Comment #77
andypostThe last remaining bit is to enable CI #3488473: Add core testing using PHP 8.4
Comment #78
liam morlandI have added PHP 8.4 and Drupal 10.4 and 11.1 to the PHP support page.
Comment #79
andypost10.4/10.5 still needs #3304746: BigPipe cannot handle (GET) form redirects (EnforcedResponseException)
Comment #86
andypostUsed to run pipelines for the current 10.4 and 10.5 and both are green!
- https://git.drupalcode.org/issue/drupal-3427903/-/pipelines/378581
- https://git.drupalcode.org/issue/drupal-3427903/-/pipelines/378594
So closing this one and 10.4.0 release post can mention about compatibility like https://www.drupal.org/blog/drupal-11-1-0
Comment #88
xjmBelatedly granting Andy credit for all his work here.