PHPStan should not crash on startup when projects' composer.json is invalid#5779
Conversation
VincentLanglet
left a comment
There was a problem hiding this comment.
What's the output then ? Should we still have an error message ?
|
the "output" is a regular PHPStan result which ignored settings from composer.json. such a invalid composer.json will already be warned about when running "composer update" or similar. |
|
This pull request has been marked as ready for review. |
I see how you apply existing behavior, but that behavior does sound like a bug. If composer.json is in a bad shape, all bets are off. Better to fail fast and loud. |
|
@talkinnl if you see room for improvement, feel free to contribute |
instead of trusting data we got back from json-decoding
composer.json, we now verify it and skip processing data which does not adhere to the types we expect to prevent crashing down the line.closes phpstan/phpstan#14724