==Analyzing in depth==
For an example of best-practices, single extension usage, see [https://github.com/ProfessionalWiki/Maps/blob/ee88211fadb3573b646cce005383450e96c3054e/phpstan.neon the example of Professional Wiki's Maps extension] which illustrates configuration file includes of a 'baseline'; error message suppression; and directory exclusions of problem code.
==Adding Extensions to PHPStan==
The PHPStan project has built a [[Composer]] plugin for the automatic installation of PHPStan extensions, [https://github.com/phpstan/extension-installer phpstan/extension-installer].
All you have to do is <code>composer require --dev phpstan/extension-installer</code> in your project and then you can e.g. <code>composer require --dev phpstan/phpstan-phpunit</code> to also add the [https://github.com/phpstan/phpstan-phpunit PHPUnit extension to PHPStan] rather than having to manually edit the <code>include</code> section of your phpstan.neon configuration.
There are extensions for Doctrine, PHPUnit, Symfony Framework, Mockery, Nette Framework, Laravel, Drupal, WordPress etc. See [https://phpstan.org/user-guide/extension-library the extension library]
[[Category:Wiki]]