colinodell/json5
PHP JSON5 parser/decoder. Adds json5_decode() as a drop-in replacement for json_decode(), supporting comments, trailing commas, single quotes, and more. Always throws SyntaxError on parse failure. Includes a json5 CLI to convert JSON5 to JSON.
Architecture fit: The package remains suitable for human-readable configuration scenarios but now requires PHP 8.0+ due to dropped PHP 7.x support. Core integration limitations with Laravel's native config system persist, though parameter name changes don't alter this fundamental constraint.
Integration feasibility: Medium feasibility due to breaking changes. Composer installation remains straightforward, but existing code using renamed parameters ($source→$json, $options→flags) or SyntaxError constructor arguments ($linenumber→$lineNumber, $columnNumber→$column) requires refactoring. PHP 7.x environments cannot upgrade.
Technical risk: High. PHP 7.x incompatibility creates immediate upgrade barriers for legacy projects. Parameter name changes introduce runtime errors if not addressed during migration. Return type changes (mixed) may require type-checking adjustments in dependent code.
Key questions:
SyntaxError constructor arguments?Stack fit: Requires PHP
How can I help you explore Laravel packages today?