diff --git a/README.md b/README.md index bf2d5256..1f2147db 100644 --- a/README.md +++ b/README.md @@ -25,18 +25,18 @@ When you are using [`phpstan/extension-installer`](https://github.com/phpstan/ex
Manual installation -If you don't want to use `phpstan/extension-installer`, include `extension.neon` in your project's PHPStan config: +If you don't want to use `phpstan/extension-installer`, include both files in your project's PHPStan config: -``` +```neon includes: - vendor/mglaman/phpstan-drupal/extension.neon + - vendor/mglaman/phpstan-drupal/rules.neon ``` -To include Drupal specific analysis rules, include this file: +`extension.neon` adds Drupal's types and services. `rules.neon` adds the Drupal rules. Two of those rules also load files for the rest of the analysis: `LoadIncludes` loads the file a `ModuleHandlerInterface::loadInclude()` call includes, and `ModuleLoadInclude` does the same for `module_load_include()`. Without `rules.neon`, functions from those files are reported as not found: ``` -includes: - - vendor/mglaman/phpstan-drupal/rules.neon +Function locale_translation_flush_projects not found. ```