Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue in remove command when allow-plugins is not present at all, f…
…ixes #10629
- Loading branch information
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ca3b874
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reads like a error which should have been catched by phpstan.. it seems type information was missing to cover this properly
ca3b874
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah absolutely, it's on my todo list to write a PHPStan extension for Config::get.. unfortunately it's not possible to simply type it as it returns all sorts of stuff.
ca3b874
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you prefer I could write a extension within a few days..?
ca3b874
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you do it I won't complain ;) See https://github.com/composer/composer/blob/main/src/Composer/Config.php and https://github.com/composer/composer/blob/main/res/composer-schema.json#L280 (probably taking the types from the schema by default would be the best so it automatically works with new config values, but I suspect some will need to be overridden). In any case, if you can get it started that'd be already pretty cool, I am familiar enough to tweak stuff in PHPStan but writing from scratch I'm still pretty slow.