\Drupal\Tests\package_manager\Kernel\TestStageTrait::dispatch() should stop using a deprecated PHP language feature

Created on 23 December 2022, almost 2 years ago
Updated 26 January 2023, almost 2 years ago

Problem/Motivation

\Drupal\Tests\package_manager\Kernel\TestStageTrait::dispatch() does this:

    catch (StageException $e) {
      // Attach the event object to the exception so that test code can verify
      // that the exception was thrown when a specific event was dispatched.
      $e->event = $event;
      throw $e;
    }

This is deprecated in PHP 8.2 and will be removed in PHP 9. See https://wiki.php.net/rfc/deprecate_dynamic_properties.

Drupal core will not accept new uses of deprecated language features. See #3275851: [META] Fix PHP 8.2 dynamic property deprecations .

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

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

Not all content is available!

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

Production build 0.71.5 2024