Problem/Motivation
Follow-up to #3178534: Start running PHPStan on Drupal core (level 0). We want all of the Drupal core to be checked against PHPStan level 0.
Proposed resolution
Try to fix as many level 0 problems as possible in this issue.
Remaining tasks
Run phpstan level 0 on core and create a merge request to address problems.
Issue fork drupal-3190393
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
klausiI made the mistake of statically defining the ->original property on the entity base class and all hell broke lose. I think that happens we have a lot of magic __get() going on in the entity API that we need for dynamic fields, so I made an exception to ignore that in PHPStan.
Comment #4
daffie commentedComment #5
tstoecklerRe #3: Good choice, that is a whole can of worms by itself... ;-) but at least we have an issue for that already, so linking that from here.
Comment #7
mondrakeComment #9
longwave#3178534: Start running PHPStan on Drupal core (level 0) was committed so closing this as duplicate as I don't think there's anything to action directly here.