michael-rubel/laravel-auto-binder
Laravel Auto Binder automatically registers interface-to-implementation bindings in the service container using naming conventions, so you can drop manual $bindings entries. Point it at your directories and it wires your classes for cleaner, convention-driven dependency injection.
Architecture fit. Unchanged by 6.0.0. laravel-auto-binder remains a container-wiring convenience layer, not a framework extension — it lives inside Laravel's service container and service-provider lifecycle and replaces hand-written $this->app->bind(...) lines with namespace-pair convention scanning. It suits codebases with predictable App\Contracts\* → App\Services\* / App\Repositories\* mapping; it still does not cover contextual binding (when()->needs()->give()), tagged bindings, or runtime selection among multiple implementations of one interface. 6.0.0 changes none of this: the headline items are a reverted internal refactor (collections), dependency bumps, and Laravel 11 support. The evaluation of the pattern itself stands; what changed is the evaluation of the dependency.
Integration feasibility. Materially improved, with one unresolved cliff. The prior assessment was driven by archived: yes and treated the package as frozen. Release 6.0.0 shows a merged Laravel 11 support PR (#21), a reverted experiment (#16 → #17), and Dependabot adoption (#19) — that is evidence of a maintainer still responding, not a dead repo. Caveat for the reviewer: Laravel 11 shipped March 2024, which is consistent with 6.0.0 predating the archive rather than reversing it. Re-verify archive status and the commit date of the 6.0.0 tag before treating this as a revival — the release notes alone don't prove the repo is unarchived today.
Two facts do change our planning position:
illuminate/* versions — possibly a PHP floor change. That is a breaking change for anyone pinned to 5.x and must be confirmed against our constraints, not assumed.Effort estimate drops from 1–2 engineer-days to roughly 0.5–1 engineer-day for the spike, if the 6.0.0 composer.json constraints match our stack.
Technical risk. Ranked:
| Risk | Severity | Change vs. prior | Notes |
|---|---|---|---|
| Framework upgrade lock (Laravel 12 / PHP 8.4) | Medium-High | Downgraded from High | One cycle of headroom bought; wall still ahead |
| Silent or ambiguous binding resolution | High | Unchanged | Convention matching can attach the wrong implementation with no compile-time signal; 6.0.0 did not address this |
| Major-version churn with thin release notes | Medium | New | 6.0.0 notes don't enumerate breaking changes; we must diff the source ourselves |
| Re-archiving / maintainer lapse | Medium | New framing | Single-maintainer, small user base; a revival can reverse |
| Boot-time reflection cost | Medium | Unchanged | Still must confirm map is cached under config:cache and Octane-safe |
| Debuggability regression | Medium | Unchanged | Bindings invisible in AppServiceProvider; container dumps are the audit path |
| No upstream support channel | Low-Medium | Downgraded from Medium | Maintainer is responsive today; no SLA, no vendor |
Key questions to answer before committing.
composer.json constraints (PHP floor, illuminate/* range)? Do they install against our current and next-target Laravel?BindingResolutionException in production traffic? Ambiguous matches — exception, first-match-wins, or silent override?bind only?Recommendation (revised): move from "pattern to adopt, not a dependency" to "depend, with a pre-built fork contingency." Take ^6.0 pinned exactly, run the archived-adjacent diligence above, and keep the vendoring recipe (a few hundred lines into app/Support) written down and rehearsed only if question 3 comes back empty. The prior blanket "vendor it" call is no longer proportionate now that Laravel 11 is supported upstream.
Stack fit. Unchanged. Good fit for a conventional or modular Laravel monolith on the supported PHP floor where interfaces are already the unit of testability. Poor fit for DDD-heavy or multi-tenant code, where per-context implementations force manual bindings alongside the config file — the package then costs a config surface without removing the explicit ones.
Migration path. Largely as before, with 6.0.0 as the entry point rather than a fork. (1) Confirm 6.0.0 constraints satisfy composer why-not for both current and next-target framework; (2) pick one self-contained module with a clean Contracts/Implementations split; (3) move only that module's bindings behind the binder; (4) keep all contextual, tagged, and singleton bindings explicit and commented; (5) snapshot resolved classes for each interface in a test; (6) measure, then decide on expansion. Revert remains a config-block deletion plus restored bind() lines — still a ~30-minute rollback, which is the property that makes this a cheap experiment.
Compatibility. Two checks now, not one: (a) composer why-not michael-rubel/laravel-auto-binder 6.0.0 against our pinned framework; (b) a source diff of 5.1.7 → 6.0.0 to enumerate what the release notes omit. Cross-reference require-dev (orchestra/testbench, phpunit) in the 6.0.0 tag to infer the tested matrix. If we are already on Laravel 12, this release does not help and the fork path from the prior assessment stands unchanged.
Sequencing.
composer why-not against current and next-target framework.Maintenance. Ownership shifts from "ours on day one" to shared: upstream absorbs framework-major compatibility as long as it stays active, and we own only the gap between releases. The cost model is now contingent — near-zero while maintained, a one-off fork-and-take-ownership event if upstream stalls or skips Laravel 12. Budget a standing quarterly check of repo activity rather than a permanent fork burden. Note the version-pinning discipline: 6.0.0's major bump is exactly the kind of change that should never auto-merge.
Support. No vendor, no SLA. Internal model is source-reading plus our tests, plus the option to open an upstream issue while the maintainer is responsive (a real improvement over the prior assessment, though not a commitment). Keep spike notes, the 5.1.7→6.0.0 diff, and the ambiguity-behaviour tests in-repo — they are the support documentation. Onboarding for a Laravel-fluent engineer remains a couple of hours; the durable risk is discoverability, so the convention must be documented and enforced in review.
Scaling. Unchanged mechanics. Resolution is lazy, so per-request cost is bounded by bindings actually resolved; the exposure is boot-time reflection, O(classes scanned), which can add tens to hundreds of milliseconds on a large app if the map isn't cached. Mandatory preconditions before wide rollout: confirm config:cache/optimize collapses the scan, confirm Octane safety (no mutable static registry leaking across requests), and load-test p50/p99 with the binder on vs. off.
Failure modes to instrument.
composer update cross the major.Ramp-up. Low for the implementing engineer; moderate for the team. Half a day of documentation, one code-review checklist entry, and a named owner for the quarterly upstream-health check and the fork contingency. Bottom line for a TPM: 6.0.0 changes the buy-versus-build call from "build" to "buy, with an exit clause." The idea is worth ~1 engineer-week fully derisked; the dependency is now worth roughly 2–3 engineer-days of spike and hardening — an improvement on the prior assessment, contingent on confirming that (a) the repo is genuinely active and (b) 6.0.0's constraints cover our next-target framework. If either fails, revert to the previous recommendation and vendor the source.
How can I help you explore Laravel packages today?