fastd/container
A lightweight PSR-11 dependency injection container for PHP applications. It provides service registration, lazy loading, autowiring, aliases, and service providers, with simple integration into the FastD framework and other PSR-compatible projects.
Architecture fit. fastd/container is a standalone PSR-11 dependency-injection container from the FastD microframework ecosystem. It is not a Laravel integration package — it is a competing container to Illuminate\Container. In a Laravel codebase, the framework container is load-bearing: service providers, facades, deferred providers, contextual binding, tagged bindings, method injection into controllers/listeners/jobs, and Octane's sandboxing all assume Illuminate\Contracts\Container\Container semantics. Replacing it is not a realistic integration; the only plausible architectures are (a) an isolated, framework-agnostic component (CLI tool, standalone worker, reusable library) that should not depend on Laravel, or (b) a bounded context with its own composition root running alongside Laravel. Fit is therefore conditional and narrow, not framework-wide.
Integration feasibility. PSR-11 compliance is the single strongest argument: if the package correctly implements Psr\Container\ContainerInterface, it can be consumed behind an interface and swapped. Feasibility hinges on whether a bridge is needed in both directions — resolving Laravel services inside fastd (delegation/fallback container) and resolving fastd-managed services from Laravel ($app->bind() to a factory closure that calls the fastd container). Both are straightforward to write but are custom glue code you own forever. There is no published Laravel service provider, no facade, no documented bridge, and zero dependents to crib from.
Technical risk. High, driven by adoption signals rather than code quality. Three GitHub stars and zero dependents mean effectively no production validation, no Stack Overflow corpus, and no third-party tutorials. The project is single-maintainer and tied to a niche framework whose documentation and issue traffic are largely non-English; bus factor is the dominant risk. The reported last release date (2026-10-27) is in the future and should be treated as a data-quality anomaly until verified against Packagist — it may indicate a re-tagged or backdated release, and it undermines confidence in the metadata used to score this package. The composite score of ~19.9/100 with opportunity at 27.14 is a weak signal overall.
Key questions.
psr/container correctly in Composer?Illuminate\Container on a realistic graph?Stack fit. Composer-installable, PSR-11, MIT — mechanically trivial to add. The fit question is organizational, not technical: adopting it means operating two containers in one repository. That is justified only where the alternative — depending on illuminate/container — is worse, i.e., a library you intend to publish for non-Laravel consumers, or a standalone process (consumer, scheduler, CLI) where booting the full framework is disproportionate.
Migration path. Do not migrate. Sequence instead:
ContainerInterface boundary in that component; bind fastd behind it.Compatibility. PSR-11 gives container-level interop but not framework-level interop. Laravel-specific contracts (Illuminate\Contracts\Container\Container, Container::tag, extend, when()->needs()->give()) will not be satisfied. Facades, app(), resolve(), and container-aware testing helpers ($this->app->instance(), mock() in container) will not see fastd bindings. Plan for parallel test scaffolding.
Sequencing. Pilot in a non-critical, low-blast-radius component for one release cycle. Instrument resolution paths and failure cases. Gate broader use on: verified maintenance cadence, a written fallback plan (fork/vendor), and demonstrated equivalence of lifecycle semantics. Do not sequence this ahead of any Laravel upgrade work — it is an optimization, not a dependency.
Maintenance. You will likely own the integration glue and possibly the package itself. With one maintainer and near-zero community, assume you may need to vendor the source, pin the version, or fork. Budget for periodic review of upstream commits; there is no security-advisory pipeline you can rely on, though the attack surface of a DI container is small (no network, no deserialization of untrusted input — verify the latter).
Support. No commercial support. Documentation and issue responses are likely in the FastD project's native language and oriented to that framework, not Laravel. Internal runbooks and a short design note explaining why a second container exists are mandatory — otherwise the next engineer will "simplify" by deleting it or, worse, wire it into core.
Scaling. Container resolution cost is negligible relative to framework bootstrap; the real scaling concern is cognitive and operational. In long-running processes (Octane, queue workers), stateful or per-request bindings in a second container are a leak vector that Laravel's own lifecycle hooks will not reset for you. If the package supports compiled/cached containers, wire that into the deploy pipeline; if not, cold-start reflection cost compounds per process.
Failure modes.
Ramp-up. The API surface is small and PSR-11 is well understood, so individual ramp-up is measured in hours. Organizational ramp-up is the cost: two idioms, two debugging mental models, and an extra concept in every onboarding. For a team already fluent in Laravel's container, this is friction with no offsetting velocity gain inside the framework boundary. Recommend a default position of decline for framework-adjacent code, conditional approval for genuinely framework-agnostic components, pending answers to the maintenance and lifecycle questions above.
How can I help you explore Laravel packages today?