achinon/yaml_classer
Symfony bundle that converts YAML config files into generated PHP classes, enabling IDE-friendly, callable access to YAML values. Install via Composer, run a console command to generate a class, then use via DI or instantiate directly.
spatie/array-to-object), saving dev time while adding IDE-friendly features.services.yml, app.yml) into reusable classes.new ExampleConfig() instead of parsing YAML per test).spatie/array-to-object or native PHP json_decode).Symfony\Component\Yaml\Yaml::parseFile()) over static classes.paragonie/yaml).webmozart/assert or symfony/yaml validators).For Executives:
"This package turns our YAML configs into reusable PHP classes, giving developers IDE autocompletion and type safety—just like our core code. It reduces bugs from manual YAML parsing and aligns with our DI architecture. For example, instead of hardcoding config['database']['host'], devs can use new DatabaseConfig()->host, cutting errors and speeding up development. Low-risk to pilot (just composer require + one CLI command per config file), with potential to modernize legacy systems and improve onboarding."
For Engineering:
*"Problem: YAML configs are static files—no autocompletion, no type hints, and manual parsing is error-prone.
Solution: achinon/yaml_classer converts YAML to PHP classes (e.g., ExampleConfig) that:
Yaml::parseFile() calls).
How to Start:composer require achinon/yaml_classer.php artisan achinon:yaml_classer config.yml AppConfig.$config = new AppConfig(); or inject via DI.
Tradeoffs: Minimal maintenance risk (simple CLI tool), but lacks schema validation out of the box. Pair with existing validators if needed.
Next Steps: Pilot with 1–2 critical configs (e.g., services.yml) and measure dev feedback on IDE experience."*How can I help you explore Laravel packages today?