matthiasnoback/lazy-services-bundle
A Symfony bundle for declaring lazy services that are only instantiated when first used. Lightweight proxies stand in for real services, cutting boot-time overhead and memory use in apps with heavy dependencies, without changing how services are wired or consumed.
*Bundle naming, Matthias Noback's ecosystem). It has no application in a Laravel codebase. The first decision it supports is ruling it out of a Laravel dependency evaluation and routing it to a Symfony legacy audit instead.lazy: true on service definitions, plus lazy listeners/controllers) since the 2.x era. The real decision this triggers is "do we need a third-party shim at all, or is the platform feature sufficient?" In nearly all cases, the answer is "use native."Consider only if:
Look elsewhere when:
defer-style or resolve-on-demand patterns instead.lazy: true, service subscribers, and #[Autowire] cover this with first-party support, security patching, and documentation. A 17-star, zero-dependent bundle adds maintenance risk for a solved problem.For executives: This package is a narrow Symfony utility that defers creating expensive objects until they're actually needed — a boot-time performance lever. It is not a Laravel package, despite the catalog classification, so it has no bearing on our Laravel roadmap. Its adoption signals (17 stars, zero dependents) indicate it's a niche, effectively unmaintained tool whose core capability the Symfony framework now provides natively. Recommendation: do not adopt; if already present in a legacy app, schedule removal as tech-debt cleanup.
For engineering: Lazy service instantiation is a legitimate optimization for large DI graphs, but the platform feature (lazy: true, lazy listeners) supersedes this bundle on any supported Symfony version. Profile boot time and container build cost first; if lazy loading is warranted, implement natively and avoid the third-party surface area. Flag any existing usage for migration in the next framework upgrade.
How can I help you explore Laravel packages today?