phpstan/phpstan-nette

Missing parameter 'featureToggles.narrowPregMatches'.

Closed this issue · 6 comments

After running composer update I am getting error in Nette app:

`Nette\InvalidArgumentException

Missing parameter 'featureToggles.narrowPregMatches'. )

File: [\vendor\nette\di\src\DI\Helpers.php:127](
`

I have these packages:
phpstan/extension-installer 1.4.3
phpstan/phpdoc-parser 1.30.1
phpstan/phpstan 1.12.3
phpstan/phpstan-nette 1.3.8

In config i have:

includes:
- ../vendor/phpstan/phpstan-nette/extension.neon

What should be wrong? or is it bug?

Thank you

Can you run PHPStan diagnose command instead of analyse, and paste the output?

If it crashes you can remove the includes section from your config.

My suspicion is that you're running a different PHPStan version than you think. The usage of ../vendor kind of confirms that. You should run the same PHPStan version you installed alongside the extension, not a different one.

`PHPStan diagnose
Note: Using configuration file X:\mania\phpstan.neon.

No rules detected`

When I remove include statement from config, application works.

I the documentation I found that it is not needed. Not sure why I have added it and why it was working :)

So thank you very much for quick reply

We haven't solved the issue yet.

Pass -l 5 or the actual level you're using to the diagnose command and paste the output here. Thanks.

PS X:\mania> PHPStan diagnose --level 6
Note: Using configuration file X:\mania\phpstan.neon.
PHP runtime version: 8.2.4
PHP version for analysis: 8.2 (from config.platform.php in composer.json)

PHPStan version: 1.12.3
PHPStan running from:
X:/mania/vendor/phpstan/phpstan

Extension installer:
phpstan/phpstan-nette: 1.3.8

Discovered Composer project roots:
X:/mania
X:\mania

So it looks like it works for you now!

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.