league/config
Define and validate nested PHP configuration with strict schemas (via Nette Schema). Merge multiple config sources, apply defaults, enforce types/constraints, and read values using convenient dot notation. Ideal for robust, structured app and library config.
Architecture fit: The package excels in PHP applications requiring strictly typed, immutable configuration schemas defined in code. Ideal for services where config is known at compile-time and needs validation, but unsuitable for dynamic or file-based config loading (e.g., YAML/JSON). Best for monolithic apps or microservices with code-driven config.
Integration feasibility: High for PHP 7.4+ projects. Composer installation is trivial, but requires existing config to be pre-processed into PHP arrays (e.g., no native .env parsing). Must replace manual array access with get()/set() calls, requiring code refactoring.
Technical risk: Low adoption (0 direct dependents) raises concerns about real-world testing, though used by league/commonmark. Last release (Dec 2022) suggests stability but limited recent activity. Dependencies (Nette Schema, dflydev/dot-access-data) are well-maintained but add indirect complexity.
Key questions:
Stack fit: Opt
How can I help you explore Laravel packages today?