Problem/Motivation
PHP 8.2 is due 24 November 2022 as per https://github.com/php/php-src/milestone/4. Alpha versions are expected soon. Drupal core must be compatible with it in 9.5 and 10.0 as much as possible.
The release schedule is https://wiki.php.net/todo/php82 - at July 21 is beta1 with frozen API version should be available.
Starting with September 1 final polishing went to Release Candidate phase
Steps to reproduce
Compile PHP 8.2 locally and run a site to reproduce any errors. Once alpha releases become available, this will become easier.
Proposed resolution
See child issues.
When PHP 8.2 is available as a reasonable pre-release to begin testing with, 'un-postpone' this DrupalCI issue to create the environment:
#3283449: Create a DrupalCI Environment for PHP 8.2
Remaining tasks
The must have list is:
- #3299855: [META] Get rid of #[\AllowDynamicProperties] attribute
- #3275851: [META] Fix PHP 8.2 dynamic property deprecations
- #2531564: Fix leaky and brittle container serialization solution
- #3298731: Using ConstraintViolation::$arrayPropertyPath bugs on PHP 8.2
- #3274474: Fix 'Access to an undefined property' PHPStan L0 errors
The could have list is
- #3283449: Create a DrupalCI Environment for PHP 8.2 - labels in Drupal-CI needs update when RC1 will out
- #3291553: [META] Check and update dependencies for PHP 8.2 compatibility - all dependencies are compatible already
See if we need more child issues. Fix the child issues.
User interface changes
N/A
API changes
See child issues.
Data model changes
N/A
Release notes snippet
TBD
| Comment | File | Size | Author |
|---|
Comments
Comment #2
hestenetComment #3
hestenetComment #4
andypostadded notes about July/Sep milestones to summary as https://wiki.php.net/todo/php82 is the release schedule
Comment #5
hestenetComment #6
andypostI was able to make 10.0.x core work after setting
display_errors=0to prevent deprecation messages, otherwise session failed to startPushed my docker images https://hub.docker.com/r/skilldlabs/php/tags/?page=1&ordering=last_updat...
Comment #7
andypostHere's status report page
Comment #8
andypostCore throws a lot of direct usage of
$_serviceIdso it probably needs to fix it via SFbut there's related #2987089: Remove views.module's direct use of the _serviceId property
Comment #9
xjmComment #10
xjmComment #11
andypostAnother child issue #3259716: Replace usages of static::class . '::methodName' to first-class callable syntax static::method(...) to fix
- https://wiki.php.net/rfc/deprecate_partially_supported_callables
- https://php.watch/versions/8.2/partially-supported-callable-deprecation
Comment #12
andypostAnother small issue to fix Callable's syntax #3299327: Replace deprecated static::method() calls for PHP 8.2
Comment #13
andypostAnother issue in composer
StdErr: You are using the deprecated option "--no-suggest". It has no effect and will break in Composer 3.Comment #14
andypostI consider fixed #3291553: [META] Check and update dependencies for PHP 8.2 compatibility
Comment #15
andypostComment #16
catchComment #17
catchComment #18
bbralaComment #19
tim.plunkettComment #20
bbralaComment #21
andypostAlso we are blocked on regression https://github.com/php/php-src/issues/9545 which could be resolved in RC3
Comment #22
andypostFiled 2 quickfixes
- #3309750: Fix callable syntax for PHP 8.2 in Views.php
- #3310117: Fix Component/Utility/VariableTest.php on PHP 8.2
Comment #23
andypostField new child #3312079: Make output of \Drupal\Component\Utility\Variable::export() consistent on PHP 8.2+
Comment #24
catchComment #25
andypost9.5 core needs #3299327: Replace deprecated static::method() calls for PHP 8.2 to fix callable syntax, this change looks safe at the moment but needs to check compatibility with PHP 7.3
Otherwise nearly 2k tests still fail https://www.drupal.org/pift-ci-job/2485877
Comment #26
andypostCor 9.5.x fails tests because https://github.com/guzzle/psr7/pull/519#issuecomment-1260290508 was not backported to 1.x branch
Moreover
guzzlehttp/psr71.9.0 is not declared as compatible with PHP 8.1(EDIT https://www.drupal.org/pift-ci-job/2485981
Comment #28
gábor hojtsyOpened #3314632: upgrade phpspec/prophecy to 1.16.0 to support PHP 8.2 as a child issue based on discussion in the Drupal 10 readiness meeting.
Comment #29
gábor hojtsyVersion change was not intentional.
Comment #30
longwaveGiven that we did #3299853: Apply #[\AllowDynamicProperties] attribute to base classes to make PHP 8.2 log size sane I think the only remaining blocker here is #3309745: Fix dynamic property deprecations and other unit test failures for PHP 8.2.
The other issues are all nice to have and #3299855: [META] Get rid of #[\AllowDynamicProperties] attribute is likely a blocker for PHP 9, but that is some way off.
Comment #31
andypostI closed as fixed #3275851: [META] Fix PHP 8.2 dynamic property deprecations in favour of #3299855: [META] Get rid of #[\AllowDynamicProperties] attribute
Because the remaining follow-up is to get rid of attributes but there's no more deprecations
Also environments already added from "could-have" section so the issue could be marked as fixed after CI will get daily run on 10.x core
SO the remaining #3314632: upgrade phpspec/prophecy to 1.16.0 to support PHP 8.2 is no loner affects core and we can mark the meta as fixed
This issue actually critical for contrib testing so self-contained bug - #3314632: upgrade phpspec/prophecy to 1.16.0 to support PHP 8.2
Comment #32
effulgentsia commentedIs there anything left on this issue that needs to block RC? If not, let's remove the "Drupal 10 rc blocker" tag.
Comment #33
catchI checked DrupalCI and we have daily tests running on PHP 8.2 already, I think this is fixed!
Comment #34
effulgentsia commentedGreat! Untagging as well, since that's what we've done for other rc blockers when they got fixed.
Comment #36
joachim commentedIf 9.5 supports PHP 8.2 then the table at https://www.drupal.org/docs/system-requirements/php-requirements needs to be updated.