Remove all of our PHPStan `ignoreErrors` entries AND ignore PHPStan errors caused by upstream changes in core

Created on 30 March 2023, over 1 year ago
Updated 23 May 2023, about 1 year ago

Problem/Motivation

Fix all PHPStan errors or ignore them like core did in their phpstan.neon.dist file.

Steps to reproduce

Proposed resolution

We decided to go with fixing the PHPStan errors as it's better to comply with the standards rather than avoid them for long. I fixed most of them but there are 2 remaining that need to be fixed.
This issue should be kept open as we may encounter more PHPStan errors in the future due to upstream changes to core.

Remaining tasks

We still have 2 ignored PHPStan errors

 - "#^Anonymous class extends @internal class#"
 - "#^Missing call to parent::tearDown.* method#"
  1. So the first one is pretty hard to remove as we need it for testing.
  2. The second one is a phpstan-phpunit bug so i filed a report at https://github.com/phpstan/phpstan-phpunit/issues/187 the problem occurs at\Drupal\Tests\package_manager\Kernel\FixtureManipulatorTest::tearDown

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

3.0

Component

Code

Created by

🇮🇳India omkar.podey

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

Comments & Activities

Production build 0.69.0 2024