fix 10.0.x phpstan errors

Created on 25 May 2023, over 1 year ago
Updated 3 November 2023, 11 months ago

Problem/Motivation

see https://www.drupal.org/pift-ci-job/2673849 β†’

 ------ ---------------------------------------------------------------------- 
  Line   package_manager/tests/src/Kernel/PackageManagerKernelTestBase.php     
 ------ ---------------------------------------------------------------------- 
  96     Class                                                                 
         Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase has  
         an uninitialized readonly property $fileSystem. Assign it in the      
         constructor.                                                          
  105    Class                                                                 
         Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase has  
         an uninitialized readonly property $failureLogger. Assign it in the   
         constructor.                                                          
 ------ ---------------------------------------------------------------------- 

do we just override the constructor for this?

Right now in setup() we do

$this->failureLogger = new TestLogger();
    $this->container->get('logger.channel.package_manager')
      ->addLogger($this->failureLogger);

We could not do all this in the constructor and it more understandable to have this together.

Proposed resolution

add // @phpstan-ignore-next-line or make this not readonly

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024