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

[Configuration] Fix provided type does not have to exists #1624

Merged
merged 1 commit into from
Jan 4, 2022

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Jan 4, 2022

In case of configuring type checks in rector.php - https://github.com/rectorphp/rector-symfony/blob/b92de39d109c19cd3db5e965fe9a339ff568cfb1/config/sets/symfony/symfony6/symfony-return-types.php#L81

Sometimes the class does not exists. The type check should return false in that case, but instead crashes, as PHPStan requires all the objects to exist.

This fixes it

@TomasVotruba TomasVotruba merged commit 74b90d3 into main Jan 4, 2022
@TomasVotruba TomasVotruba deleted the tv-fix-optional-configuration-type branch January 4, 2022 15:12
@TomasVotruba
Copy link
Member Author

Related fix rectorphp/rector-symfony#93

@TomasVotruba TomasVotruba changed the title Configuratoin provided type does not have to exists [Configuration] Fix provided type does not have to exists Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant