{"repo":"mglaman/phpstan-drupal","free":true,"listed":false,"github":"https://github.com/mglaman/phpstan-drupal","clone":"git clone https://github.com/mglaman/phpstan-drupal.git","description":"Extension for PHPStan to allow analysis of Drupal code.","language":"PHP","stars":208,"topics":["phpstan","drupal","static-analysis","php","hacktoberfest"],"license":"MIT","category":"dev-tools","readme_excerpt":"phpstan-drupal Extension for PHPStan to allow analysis of Drupal code. PHPStan is able to discover symbols by using autoloading provided by Composer. However, Drupal does not provide autoloading information for modules and themes. This project registers those namespaces so that PHPStan can properly discover symbols in your Drupal code base automatically. [!NOTE] With Drupal 11.2, Drupal core is now using PHPStan 2.0. The 1.x branch of phpstan-drupal will be supported until Drupal 10 loses security support when Drupal 12 is released. Sponsors Would you like to sponsor? Usage When you are using phpstan/extension-installer , phpstan.neon will be automatically included. Manual installation If you don't want to use phpstan/extension-installer , include extension.neon in your project's PHPStan config: To include Drupal specific analysis rules, include this file: Getting help Ask for assistance in the discussions or #phpstan channel on Drupal Slack. Excluding tests from analysis To exclude tests from analysis, add the following parameter Deprecation testing This project depends on phpstan/phpstan-deprecation-rules which adds deprecation rules. We provide Drupal-specific deprecated scope resolvers. To only handle deprecation testing, use a phpstan.neon like this: To disable deprecation rules while using phpstan/extension-installer , you can do the following: See the extension-installer documentation for more information: https://github.com/phpstan/extension-installer#ignoring-a-parti","default_branch":null,"files":null,"tree":[],"storefront":"/r/mglaman","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mglaman/phpstan-drupal/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}