phpstan-symfony
phpstan-symfony copied to clipboard
Symfony extension for PHPStan
Recently, my PR about [support for Messenger HandleTrait return types](https://github.com/phpstan/phpstan-symfony/pull/404/files) was merged. I would like to use that work done to ability for QueryBus classes to "learn them" how to...
- Ensure TData of FormInterface is provided. - Set TData on mixed since we don't know the type of the child forms. - Add template for DataMapperInterface. I've set TData...
I implemented initial support for the `#[AutowireLocator]` attribute. See https://symfony.com/blog/new-in-symfony-6-4-autowirelocator-and-autowireiterator-attributes The simple syntax is supported now: ```php #[AutowireLocator([FooHandler::class, BarHandler::class])] ``` It also supports when classes are specified via string: ```php...
### Bug Report / Feature Request When implementing the [Symfony Form DataMapperInterface](https://symfony.com/doc/current/form/data_mappers.html) it will currently throw the following error: ```php Method MyApp\FormType::mapDataToForms() has parameter $forms with generic interface Symfony\Component\Form\FormInterface but...
Fixes type inference for primitive scalar types (`int`, `string`, `bool`, `float`) when used with `Serializer::deserialize()`. Currently, the extension wraps all base types in `ObjectType`. This means `int[]` is incorrectly inferred...
Symfony 7.2 added `>stringNode()` method to `NodeBuilder`.
Hi 👋 First of all, thank you for the great work on PHPStan and the Symfony extension! We are working on integrating result cache in our project to speed up...
`symfony/options-resolver` supports defining smart defaults that depend on the value of other options. This works by defining a default value using a Closure that has a first argument using `Symfony\Component\OptionsResolver\Options`...
PHPStan is incorrectly reporting a type error when using `false` as the default parameter for `Symfony\Component\HttpFoundation\InputBag::get()` method. The error states that the method expects `string|null` but `false` is given, which...