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

Imagine scenario: - With `bin/console cache:clear` you dump DI container - In code you use `$container->get('foo');` - PHPStan reports `Service "foo" is not registered in the container` - You fix...

PHPStan already supports analysis for valid parameters count and type. ```sh Method A::a() invoked with 0 parameters, 1 required. ``` ```sh Parameter #1 $a of method A::a() expects B, C...

Hey there :wave: I updated to version 1.1.2 and now I got the following error during the analysis: >Call to an undefined method Symfony\Component\Console\Helper\HelperInterface::ask() We do not extend directly from...

I think it would be great if the extension could automatically recognize the type of [`HandleTrait`](https://github.com/symfony/symfony/blob/5.4/src/Symfony/Component/Messenger/HandleTrait.php) of symfony. The given message to the handle trait example: ```php $this->handle(new CreateUserMessage()); ```...

I'm trying to run the unit tests locally, and I'm running into a strange error. I've cloned the project, and ran `composer install` and `make`. The unit test step then...

# Support question Hello! I'm trying to use ServiceSubscriberInterface after reading this article https://symfonycasts.com/screencast/symfony-doctrine/service-subscriber They suggest to use service locator pattern for the sake of performance in voters. And the...

Hi.. I have an issue with sf and PHPStan... which I don't know if it is sf or PHPStan.. Until today I had a `make` command like this: ```make phpstan-src:...

I guess the title doesn't really say it all ;-) So let me show you what I have: ```php foreach($users as $user) { // If the user is not OK...

I have around 10 compiler passes in my code base. I have NOT configured the path to container XML as I am not interested in testing for existing/non-existing services. However,...

I saw https://github.com/phpstan/phpstan-symfony/issues/61 and that works as an okay workaround, but I would posit that developers shouldn't have to carry the burden of dynamically generating a configuration file or symlinking...