Problem/Motivation

PHP 8.3 alpha1 is released and already brought some deprecations
Release schedule is https://wiki.php.net/todo/php83

Proposed resolution

File new child issue for every deprecation message happens

Remaining tasks

- #3375693: Fix deprecated assert_options() function usage for PHP 8.3
- get CI environment #3365510: Create a DrupalCI Environment for PHP 8.3
- track progress of changes in upcoming releases
- #3391281: Fix deprecated ReflectionProperty::setValue() usage for PHP 8.3
- #2441811: Upgrade filter system to HTML5

User interface changes

API changes

Data model changes

Release notes snippet

Comments

andypost created an issue. See original summary.

andypost’s picture

Title: [META] Compatibility with PHP 8.3 » [META] Make Drupal 10/11 compatible with PHP 8.3

better title

catch’s picture

Priority: Normal » Critical
liam morland’s picture

What is the first version of Drupal that will run on PHP 8.3?

andypost’s picture

@Liam as its release in Dec'23 the most probably 10.2.0

catch’s picture

@Liam Morland we aim for the Drupal minor release immediately after the PHP minor release to be fully compatible - i.e. 10.2 should have PHP 8.3 compatibility - obviously something horrible could come up, but also we'd try to report that upstream prior to their release if we could. Fully compatible just means 'tests pass', there's usually follow-up and untested deprecations that get found etc.

If all the changes are easy, we might backport some of them to 10.1, and then 10.1 might end up compatible with PHP 8.3 even before it's released, but there's no way to predict whether that'll happen or not, and we'll only backport if it's straightforward.

andypost’s picture

New attribute is added to PHP 8.3 #[\Override] https://wiki.php.net/rfc/marking_overriden_methods

andypost’s picture

New deprecations are coming so filed new child #3374223: Fix deprecated overloaded function usage in PHP 8.3

andypost’s picture

One more RFC commited https://wiki.php.net/rfc/assert-string-eval-cleanup

$ git grep assert_options
core/assets/scaffold/files/example.settings.local.php:35:assert_options(ASSERT_ACTIVE, TRUE);
core/assets/scaffold/files/example.settings.local.php:36:assert_options(ASSERT_EXCEPTION, TRUE);
core/lib/Drupal/Component/Assertion/Handle.php:5:trigger_error(__NAMESPACE__ . '\Handle is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Instead, use assert_options(ASSERT_EXCEPTION, TRUE). See https://drupal.org/node/3105918', E_USER_DEPRECATED);
core/lib/Drupal/Component/Assertion/Handle.php:13: *   assert_options(ASSERT_EXCEPTION, TRUE).
core/lib/Drupal/Component/Assertion/Handle.php:24:    assert_options(ASSERT_WARNING, FALSE);
core/lib/Drupal/Component/Assertion/Handle.php:27:    assert_options(ASSERT_EXCEPTION, TRUE);
core/lib/Drupal/Core/DrupalKernel.php:1062:        assert_options(ASSERT_ACTIVE, TRUE);
core/lib/Drupal/Core/DrupalKernel.php:1064:        assert_options(ASSERT_EXCEPTION, TRUE);
core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php:70:    $assert_active_default = assert_options(ASSERT_ACTIVE);
core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php:80:    assert_options(ASSERT_ACTIVE, 1);
core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php:90:    assert_options(ASSERT_ACTIVE, 0);
core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php:95:    assert_options(ASSERT_ACTIVE, $assert_active_default);
core/tests/bootstrap.php:179:assert_options(ASSERT_EXCEPTION, TRUE);
sites/example.settings.local.php:35:assert_options(ASSERT_ACTIVE, TRUE);
sites/example.settings.local.php:36:assert_options(ASSERT_EXCEPTION, TRUE);
andypost’s picture

rfay’s picture

DDEV HEAD now has PHP 8.3 support; you can already use it with `brew install --HEAD ddev/ddev/ddev` or other ways, https://ddev.readthedocs.io/en/latest/developers/building-contributing/#...

It will be in v1.22.2 before terribly long.

Not all extensions are there yet, as they're not in the upstream deb.sury.org packaging. So xdebug is still missing, for example.

andypost’s picture

FYI I'm building xdebug from git last 3 months and it works fine

andypost’s picture

andypost’s picture

andypost’s picture

Issue summary: View changes

the only one issue left to fix

andypost’s picture

Title: [META] Make Drupal 10/11 compatible with PHP 8.3 » [META] Make Drupal 10.2/11 compatible with PHP 8.3
Status: Active » Reviewed & tested by the community
Issue tags: +10.2.0 release notes

All child issues are fixed and I find the issue complete

longwave’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +10.2.0 release highlights

Marking this fixed and tagging for a release highlight.

@andypost thanks for all the work in the child issues.

longwave’s picture

Version: 11.x-dev » 10.2.x-dev

Fixing version.

Status: Fixed » Closed (fixed)

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

kim.pepper’s picture

jo_franz’s picture

Does "Closed (fixed)" mean PHP 8.3 is now supported in this Drupal PHP matrix?

andypost’s picture