doctrine / DoctrineModule

Doctrine Module for Laminas
http://www.doctrine-project.org/projects/doctrine-module.html
MIT License
398 stars 270 forks source link

Added static analysis with Psalm and PhpStan #744

Closed driehle closed 2 years ago

driehle commented 2 years ago

This PR integrates Psalm and PhpStan. There were some really weird errors of Psalm, where a ParseError occured. The message was as follows:

ERROR: ParseError - src/Module.php:40:17 - Problem loading method: 
    $storage should not be null for DoctrineModule\GetConsoleUsage::getconsoleusage (see https://psalm.dev/173)

I think this is rather a bug in Psalm, might be related to https://github.com/vimeo/psalm/issues/4899. Anyways, I have suppressed that error by using a baseline.