-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.2
-
None
Part of MDLSITE-2338.
We can start to include a basic phpstan configuration for core to help track down coding issues.
This will be particularly helpful in tracking down undefined dynamic properties, which were deprecated in PHP 8.2 and are tracked by MDL-76411
From my testing I needed at least 5gb RAM allocated to run stan without running out of memory. On my laptop (Macbook Pro M1) it took 7-11 minutes approx.
This is the command I used:
php -dmemory_limit=6g vendor/bin/phpstan analyse --level 5 --configuration phpstan.neon -vvv | tee phpstan_`date +%s`.out
|
I've also generated a baseline per https://phpstan.org/user-guide/baseline
Other useful reading:
- Testing discovered
-
MDL-76455 Address serious issues identified by static analystic (phpstan)
- Open
- will help resolve
-
MDL-76411 PHP 8.2: Dynamic Properties are deprecated
- Closed
-
MDLSITE-2338 Advanced php syntax checker
- Open