Drupal 9 uses PHP syntax that's deprecated in PHP 8.2, so exclude that from error_reporting() and DeprecationListenerTrait

Created on 21 April 2023, about 1 year ago
Updated 1 May 2023, about 1 year ago

Problem/Motivation

#3354670-19: Fork laminas-feed, laminas-escaper, and laminas-stdlib, or remove them from drupal/core-recommended to allow Drupal 9.5 to be installed on PHP 8.2 β†’ shows that Drupal 9.5 can in fact run on PHP 8.2; it's just that it calls PHP syntax that's deprecated in PHP 8.2. However, DrupalKernel::bootEnvironment() hardcodes error_reporting() to E_ALL, causing a site that runs Drupal 9.5 on PHP 8.2 to add noise to its logs and fail tests.

Steps to reproduce

Proposed resolution

For PHP 8.2, since we know we use deprecated syntax, remove E_DEPRECATED from error_reporting() and DeprecationListenerTrait. This still leaves in place E_USER_DEPRECATED.

Remaining tasks

  • Review patch.
  • Decide if it's acceptable to commit in a 9.5 patch release.

User interface changes

API changes

Data model changes

Release notes snippet

Improved support for PHP 8.2.

πŸ“Œ Task
Status

Fixed

Version

9.5

Component
BaseΒ  β†’

Last updated about 1 hour ago

Created by

πŸ‡ΊπŸ‡ΈUnited States effulgentsia

Live updates comments and jobs are added and updated live.
  • PHP 8.2

    The issue particularly affects sites running on PHP version 8.2.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024