From c42a3b4af3df18c6794985d9dfe39a5da86a40fd Mon Sep 17 00:00:00 2001 From: Alex Wells Date: Tue, 16 Sep 2025 14:13:47 +0200 Subject: [PATCH] docs: Mention disabling phpstan extension --- docs/src/content/docs/index.mdx | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/docs/src/content/docs/index.mdx b/docs/src/content/docs/index.mdx index bc97e93..fbff21b 100644 --- a/docs/src/content/docs/index.mdx +++ b/docs/src/content/docs/index.mdx @@ -31,16 +31,30 @@ import { Steps } from '@astrojs/starlight/components'; ## PHPStan extension -Upon installation, if you're using `phpstan/extension-installer`, an extension will be enabled automatically. -Alternatively, you can enable it manually in your `phpstan.neon`: +A PHPStan extension is shipped with the package. If you're using `phpstan/extension-installer`, it will be +enabled automatically. We recommend keeping it on, but it's not required. + +If it's causing you any issues or you just don't want it, you can disable it through your `composer.json`: + +```json +{ + "extra": { + "phpstan/extension-installer": { + "ignore": ["good-php/reflection"] + } + } +} +``` + +#### If you aren't using `phpstan/extension-installer` + +You can, of course, enable it manually in your `phpstan.neon`: ```neon includes: - vendor/good-php/reflection/phpstan-extension.neon ``` -It improves some type inference, so we recommend keeping it on, but it's not required :) - ## Customizing cache It's crucial that you use some kind of cache. Out of the box, we support file-based cache and in-memory cache.