phpstan-symfony
phpstan-symfony copied to clipboard
Symfony's FrameworkConfig methods not found
I just want to make you aware of https://github.com/symfony/symfony/issues/46546
In short: The workaround (scanDirectories) I added in https://github.com/phpstan/phpstan-symfony/pull/190 isn't working anymore.
So the question is: If the Symfony guys don't change anything, is there a change that this can get fixed in PHPStan? If no, I'd delete that workaround from the docs again, and recommend to exclude config/ from analysis.
I am experiencing the same problem after updating.
The generated config has changed to always include |static return type.
For example, FrameworkConfig.form changed between 6.0 and 6.1 to:
- public function form(array $value = []): \Symfony\Config\Framework\FormConfig
+ /**
+ * form configuration
+ * @default {"enabled":false,"csrf_protection":{"enabled":null,"field_name":"_token"}}
+ * @return \Symfony\Config\Framework\FormConfig|$this
+ */
+ public function form(mixed $value = []): \Symfony\Config\Framework\FormConfig|static
Any update on this?