contao / core-bundle

[READ-ONLY] Contao Core Bundle
GNU Lesser General Public License v3.0
123 stars 58 forks source link

[RFC] Use PHPStan on level 2 #1636

Closed bytehead closed 6 years ago

bytehead commented 6 years ago

PHPStan on level 2 needs to know about return types from $container->get() calls.

To extend the features of PHPSTan I've created an extension for PHPStan: oneup/phpstan-contao. This extension parses the services.yml file of the contao/core-bundle to provide the right return types for PHPStan.

Moreover this extension also requires phpstan/phpstan-symfony and provides the XML file containing the container definitions from Symfony to the Symfony extension for PHPStan.

leofeyer commented 6 years ago

Excellent work. Thank you @bytehead.