Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Command::getHelper dynamic return type resolver #287

Open
VincentLanglet opened this issue Dec 1, 2022 · 0 comments
Open

Add a Command::getHelper dynamic return type resolver #287

VincentLanglet opened this issue Dec 1, 2022 · 0 comments

Comments

@VincentLanglet
Copy link
Contributor

PHPStan added one with phpstan/phpstan-symfony#229

For instance

$this->getHelper('question');

is a QuestionHelper

Until Symfony 6.1, the return type was mixed, so the error was only reported on level 1.
Since 6.2, there is phpdoc https://github.com/symfony/console/blob/6.2/Command/Command.php#L684,
so now $this->getHelper('question')->ask() is reported on higher level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant