Adopt PHP 8.1-only capabilities such as constructor property promotion + drop BC layers

Created on 15 November 2022, over 1 year ago
Updated 16 February 2023, over 1 year ago

Problem/Motivation

  1. Discovered by @phenaproxima in #3314137: Make Automatic Updates Drupal 10-compatible β†’ .

    \Drupal\package_manager\ComposerUtility::__construct() is public because PHP 7 does not allow private constructors.

    (See https://www.php.net/manual/en/language.oop5.decon.php#language.oop5.deco..., and as an example: https://3v4l.org/jZOVc)

    Once PHP 8 is required (which will be the case in Drupal 10 for sure), we can remove the deprecation trigger and mark it private. This implies a new major version though … unless we chose to break semver.

  2. Update Stage::__construct() (deprecation added in #3325716: Deprecate config factory in Stage β†’ )
  3. πŸ“Œ Prevent staging areas that nested in the active Composer project directory Fixed introduced a temporary copy of symfony/filesystem's Path class because it was only available in version >=5, but only Drupal 10 ships with >=5, Drupal 9 ships with 4. We should remove that temporary copy in the 3.x branch because then we'll require Drupal 10. IOW: revert this commit.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

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

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

  • API change

    Changes an existing API or subsystem. Not backportable to earlier major versions, unless absolutely required to fix a critical bug.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024