Roave / BetterReflection

:crystal_ball: Better Reflection is a reflection API that aims to improve and provide more features than PHP's built-in reflection API.
MIT License
1.18k stars 131 forks source link

Removed need for manually checking for parsing errors on `composer.(json|lock)` and `installed.json` #1435

Closed Ocramius closed 3 months ago

Ocramius commented 3 months ago

This marginally reduces code size, and reduces mixed types a bit, but would benefit tons from removing direct usage of json_decode(), which is an unsafe construct, when the results of its calls go un-checked.

Ideally, we'd use azjezz/psl, but that library comes with added dependencies that we can't afford here, for now.

Ocramius commented 3 months ago
97.980% src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJson.php (2 mixed)
98.942% src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJsonAndInstalledJson.php (2 mixed)
98.742% src/SourceLocator/Type/Composer/Factory/MakeLocatorForInstalledJson.php (2 mixed)

No real improvement here :-\