phpstan / phpstan-symfony

Symfony extension for PHPStan
MIT License
698 stars 89 forks source link

Update getArgument return type in interact method #391

Closed VincentLanglet closed 3 months ago

VincentLanglet commented 3 months ago

Solve https://github.com/phpstan/phpstan-symfony/issues/256 (cc @alexander-schranz)

By design, all the arguments can be null in Command::interact method. Doing

/** @var string|null $market */
$market = $input->getArgument('market');

in the interact method is reported as an error by PHPStan so there is currently no satisfying solution except ignoring the error. And updating the dynamic return type extension seems doable.

ondrejmirtes commented 3 months ago

Thank you.