sprintf/symfony-metadata-loader
Brings Symfony's metadata loading components to Laravel, letting you define and resolve class metadata such as validation, serialization, and ORM mappings using familiar Symfony conventions. Includes service provider wiring and configuration for seamless integration.
Architecture fit
symfony/console, symfony/http-foundation, symfony/process, symfony/var-dumper, symfony/error-handler, symfony/routing, symfony/yaml). A component-level Symfony loader can therefore be a legitimate fit; a framework-level one (bundles, DI extension, Kernel wiring) cannot.sprintf/symfony-metadata-loader suggests a re-packaged or extracted metadata/loader concern (YAML/XML/PHP mapping files, likely analogous to symfony/config's Loader/FileLoader). Whether it is a thin fork or an original implementation determines whether the dependency is worth taking at all — if it is a fork, we should depend on the upstream symfony/* component directly.Integration feasibility
MetadataLoaderInterface in our domain, implement it with this package, and keep the rest of the application unaware. This bounds blast radius to one class and makes replacement a same-day task.composer.json for PHP constraint, symfony/* and psr/* requirements, and transitive weight; confirm it does not pull symfony/framework-bundle or symfony/http-kernel (which would drag conflicting versions into a Laravel app).illuminate/support conflicts and whether its Symfony component constraints overlap the versions Laravel pins. A Laravel 10/11 app pins Symfony 6.x/7.x; a stale package pinning ^4.4 or ^5.0 will cause a Composer resolution deadlock or force an unsafe --with-all-dependencies downgrade.Technical risk
path/vcs fork with a pinned commit SHA) rather than tracking dev-main.Key questions
symfony/yaml + a 40-line reader does not?symfony/config's Loader component? If yes, why not depend upstream?composer.json require/require-dev/conflict entries and the PHP version floor?sprintf, what is their release cadence, and is there a security contact?Stack fit
KernelInterface — those have no Laravel equivalent worth building.Migration path
composer why-not/composer depends, exercise the documented API, and read the full source (a library this small should be readable end to end — if it is not, that is itself the answer).composer.json conflict audit, and require a signed internal release. Do not consume upstream tags directly.MetadataLoaderInterface in our domain; the package lives only in Infrastructure\Metadata. Contract tests assert our interface, not theirs.symfony/yaml + symfony/config FileLoader, or Laravel-native config()/Illuminate\Support\Arr, with the metadata schema unchanged. Because the adapter isolates the dependency, this is a contained revert.Compatibility
psr/* interface versions (a psr/container or psr/simple-cache major mismatch is a common breaker).config:cache — any runtime file-scanning on boot will interact badly with a cached config.Sequencing
composer.json compatibility check (blocking gate).Maintenance
composer outdated alerts; treat any upstream commit as an untrusted change requiring review.Support
Scaling
glob per call, wrap it in a warm-up command (php artisan metadata:warm) run at deploy; treat the loader as unusable at request time until proven otherwise.Failure modes
composer validate --strict gate.Ramp-up
How can I help you explore Laravel packages today?