phpstan-symfony icon indicating copy to clipboard operation
phpstan-symfony copied to clipboard

Symfony extension for PHPStan

Results 95 phpstan-symfony issues
Sort by recently updated
recently updated
newest added

Right now calling this triggers an error as the returned header is string|null, but really after `->has($key)` returns true, we can assert that `->get($sameKey)` will be `string`. At least as...

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Eomm/why-don-t-you-tweet](https://redirect.github.com/Eomm/why-don-t-you-tweet) | action | major | `v1` -> `v2` | --- ### Release...

The goal is to cover https://github.com/phpstan/phpstan-symfony/issues/207. That's my very first PR in phpstan-symfony plugin, so any feedback/tips/advices are very welcome :)

The EventSubscriberInterface from Symfony has an `@return` annotation, and all classes that implement it and have no native return type get a deprecation error message. ```php class Foo implements EventSubscriberInterface...

Symfony 6.4 introduced an [attribute called `#[AutowireLocator]`](https://symfony.com/doc/6.4/service_container/service_subscribers_locators.html#the-autowirelocator-and-autowireiterator-attributes) which automatically creates and injects a `ServiceLocator` into a service. Looks like a similar feature was already implemented with #151. Is it possible...

When using a custom symfony normalizer as [defined in the documentation](https://symfony.com/doc/current/serializer/custom_normalizer.html), the first parameter of the `normalize` method is the same as the return type of the `supportsNormalization` method. Let's...

Every time I work with forms in Symfony and PHPStan, I'm struggling with making sure PHPStan properly understands what's going on. After the form has been submitted and validated, I...

KernelTestCase does not have a `$container` static property

When using `$container->getParameter('parameter_containing_a_list')`, the type provided by the extension is `array` (with the appropriate type for `T`). This causes issues when running phpstan in bleeding and passing that value to...