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

Fix exception thrown by Command::run

Open VincentLanglet opened this issue 2 years ago • 4 comments

Command::run is doing

try {
     $input->bind($this->definition);
} catch (ExceptionInterface $e) {
     if (!$this->ignoreValidationErrors) {
          throw $e;
    }
}

And the bind method is only throwing ExceptionInterface so the run method is supposed to thrown only ExceptionInterface and not \Exception which is too generic.

This avoid error with static analysis when we ignore some kind of exception thrown.

VincentLanglet avatar Jul 05 '22 12:07 VincentLanglet

Friendly ping @ondrejmirtes if you have time to take a look

VincentLanglet avatar Jul 13 '22 07:07 VincentLanglet

I have around 70 unread emails in my inbox after vacation, I'm going from the oldest thread, if you ping here, it means I'm gonna look at it last 😊

ondrejmirtes avatar Jul 13 '22 07:07 ondrejmirtes

I have around 70 unread emails in my inbox after vacation, I'm going from the oldest thread, if you ping here, it means I'm gonna look at it last 😊

Oh ok. Do you getting an email for every created PR/opened issues on every phpstan repository ?

Have good vacation then

VincentLanglet avatar Jul 13 '22 07:07 VincentLanglet

Yes, and every comment and every push too 😊

ondrejmirtes avatar Jul 13 '22 08:07 ondrejmirtes

Friendly ping, in case the notification got lost @ondrejmirtes ^^'

VincentLanglet avatar Aug 15 '22 08:08 VincentLanglet

I'll close this since it was released in Symfony 4.4, 5.4 and 6.x. People just have to use the latest versions.

VincentLanglet avatar Aug 27 '22 08:08 VincentLanglet