Extension.php code quality: declare info array as public class field

Created on 25 February 2019, over 5 years ago
Updated 12 June 2023, over 1 year ago

Motivation

When using PHPStan to analyse code, code that uses the Extension::$info array is flagged. It is used in Drupal Core functions such as \Drupal\Core\Extension\ModuleExtensionList::doList.

PHPStan output:
Access to an undefined property Drupal\Core\Extension\Extension::$info.

Solution

Declare the field. I'll provide a patch.

🐛 Bug report
Status

Fixed

Version

9.3

Component
Extension 

Last updated 3 days ago

No maintainer
Created by

🇩🇪Germany gogowitsch

Live updates comments and jobs are added and updated live.
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