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

Symfony extension for PHPStan

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

Just a feature idea: UrlGeneratorInterface::generate as well as proxy methods in the base controller could check if the given route name is part of the defined routes in the application....

When enabling PHPStan's `checkUninitializedProperties`, using `@required` to autowire a public property, or through a public method will still mark the property as uninitialized, although Symfony's autowiring will make sure it...

When the `$request->request` come from JSON, the resulting associative array from `$request->request->all()` can have keys with `null` values. ```php #[Route(path: '/my-test', methods: ['POST'])] public function myTest(Request $request): void { var_dump($request->request->all());...

Related to https://github.com/phpstan/phpstan/issues/7650 and PR https://github.com/phpstan/phpstan-symfony/pull/294 cc @alexander-schranz and @ondrejmirtes I saw the following example https://phpstan.org/r/95a7bcea-3198-4297-8770-823861adacfb (btw now it's full of error: https://phpstan.org/r/339c6e0b-c988-4a01-b203-1047ec4f71ee) I wrote the following code ``` /**...

`\Symfony\Contracts\HttpClient\ResponseInterface::getInfo` defines the return type as `mixed` in phpdoc. However, when the value of the argument is known, we could have more precise info thanks to the type defined for...

I have a simple compiler pass like below: ```php

Currently one can not use PHPStans `bootstrapFiles` to create the container (dump) which could then be ready by `symfony.containerXmlPath`. This as the order of initialization results in the `XmlServiceMapFactory` /...

I currently did stumble today over some issue in my code base which I think would be interesting for every project. I have a controller which used the UriSigner to...

symfony/phpunit-bridge defines a convention where adding `@group legacy` on a test (either by adding it on the method or on the class as PHPUnit considers that a `@group` added on...

the `$options` argument of the various methods in FormTypeInterface and FormTypeExtensionInterface are typed as `array` for now, because there is no other way to type them in phpdoc. However, the...