Problem/Motivation

phpspec/prophecy does not yet support PHP 8.2.

Steps to reproduce

Proposed resolution

upgrade to https://github.com/phpspec/prophecy/releases/tag/v1.16.0

Work with the phpspec/prophecy maitainers to make PHP 8.2 compatibility happen and update Drupal to the new version.

See https://github.com/phpspec/prophecy/labels/PHP8.2 and https://github.com/phpspec/prophecy/pull/571 and https://github.com/phpspec/prophecy/pull/565

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3314632

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

Gábor Hojtsy created an issue. See original summary.

immaculatexavier made their first commit to this issue’s fork.

catch’s picture

Version: 10.1.x-dev » 10.0.x-dev
taran2l’s picture

Issue tags: +PHP 8.2
andypost’s picture

Priority: Normal » Critical

raised to critical as it blocks contrib testing (CI unable to install core on 8.2)

effulgentsia’s picture

Why is CI able to install core on PHP 8.2 when testing core, but not able to install core on PHP 8.2 when testing contrib? Is it because when testing contrib, core's root composer.json (which sets config.platform.php) isn't used?

taran2l’s picture

@effulgentsia, had the same thoughts, there was a discussion in this thread: https://drupal.slack.com/archives/C51GNJG91/p1666257742630159

hestenet’s picture

Until this is resolved, we've added a php 8.2 --ignore-platform-reqs version of the container that people can test against:
#3318421: Add a php8.2_mysql8_ignore environment so that contrib can run tests on PHP 8.2 despite phpspec/prophecy

Should be available in the 'add test' dialogue now.

EDIT: Unfortunately this environment is not yet working - will revisit.

catch’s picture

Do we need to switch to a github fork until there's release with the fix in? Or do we just not support 8.2 testing for contrib until it's done and hope we can update in a patch release before too long?

andypost’s picture

Fork sounds like good workaround as the issue only in constraint and not yet implemented "union types" https://github.com/phpspec/prophecy/pull/565

I'm sure core can be released without support of https://wiki.php.net/rfc/dnf_types as requiring 8.1

andypost’s picture

Title: phpspec/prophecy does not support PHP 8.2 » upgrade phpspec/prophecy to 1.16.0 to support PHP 8.2
Issue summary: View changes
Status: Active » Needs review
Related issues: +#3322989: Update PHP dependencies for Drupal 10.0.0
StatusFileSize
new2.52 KB
new2.52 KB

re-title as support added https://github.com/phpspec/prophecy/releases/tag/v1.16.0

there's 2 issues left to support new features but they are optional as this issue a blocker for contrib

andypost’s picture

Issue tags: +10.0.0 release notes
mondrake’s picture

Status: Needs review » Reviewed & tested by the community

Provided testbot comes back green, this seems OK to me.

  • catch committed 35dc2ea on 10.1.x
    Issue #3314632 by andypost, Gábor Hojtsy: upgrade phpspec/prophecy to 1....
catch’s picture

Status: Reviewed & tested by the community » Fixed

That's good timing.

Committed/pushed to 10.1.x and 10.0.x respectively, thanks!

  • catch committed 58b08f6 on 10.0.x
    Issue #3314632 by andypost, Gábor Hojtsy: upgrade phpspec/prophecy to 1....
andypost’s picture

Thank you! contrib now can run tests!

berdir’s picture

Confirmed that this works now, token is now passing tests on PHP 8.2: https://www.drupal.org/pift-ci-job/2533591.

liam morland’s picture

Can this be backported to Drupal 9.5?

andypost’s picture

Re #19 I don;t think so as 9.5 is not compatible with PHP 8.2

longwave’s picture

Status: Fixed » Closed (fixed)

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