byjg/config
A lightweight configuration library for PHP that loads settings from arrays, INI, JSON, YAML, and environment variables, with dot-notation access, defaults, merging, and environment-specific overrides for flexible app configuration.
Definition::addConfigDirectory() adds layered config loading with merge semantics, which aligns with common framework patterns (e.g., Laravel's config publishing) where packages ship defaults and applications override them. This fits well into Laravel package ecosystems, especially for modular or multi-tenant applications requiring per-context configuration layers.addConfigDirectory()) and should not break existing usage. The DependencyInjection API improvements and validations suggest hardening, likely reducing misconfiguration risks. Integration with Laravel's native container is possible but requires careful mapping—Laravel's container is opinionated, and this package may serve as a complementary or alternative DI layer for specific modules.DependencyInjection validations may surface new exceptions for previously tolerated invalid definitions—potential breaking change for edge cases. Risk is higher if the package is used as a drop-in replacement for Laravel's container without thorough testing.addConfigDirectory() follow Laravel's config merge semantics (e.g., recursive merge vs. replace)?DependencyInjection validations—are there new failure modes for existing definitions?php artisan config:cache)?addConfigDirectory() to replace ad-hoc config merging logic. For existing projects, map current config sources to directory layers (e.g., vendor defaults → package defaults → application overrides) and test precedence thoroughly.bind/singleton resolution.DependencyInjection validations improve reliability but may require ongoing adjustments as service definitions evolve.How can I help you explore Laravel packages today?