Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Di Laravel Package

slick/di

Slick\DI is a lightweight dependency injection container for PHP that wires services through autowiring, explicit bindings, and lazy resolution. It offers a small, PSR-11 friendly API for managing object lifecycles in Laravel, Slim, and standalone applications.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on service wiring. This package still forces the question "do we need a DI container we own, or do we use the one already shipped with the framework?" For a Laravel codebase the honest answer is almost always the latter; Illuminate\Container already provides autowiring, contextual binding, interface binding, tagging, and method injection. v2.10.0 does not change that answer — it narrows the capability gap slightly but adds nothing Laravel lacks.
  • Framework-portability strategy. The one legitimate space for this package remains code that must run outside Laravel — a shared PHP library, a CLI tool, a lightweight service scaffold — where you want a small autowiring container without the full framework. v2.10.0's additions are directly aimed at that use case and materially improve it (see below), so this is now the only decision this release informs.
  • Public package / SDK roadmap. If the roadmap includes shipping reusable components to third parties, the container you standardize on becomes an API surface. That calculation is unchanged by a feature release: the license question (NOASSERTION) is still unresolved, and that is what gates redistribution.
  • Buy vs. adopt risk. The release cadence signal has improved: a 2.10.0 version line indicates a long-running release history rather than the "one release and done" picture the earlier metadata suggested. Treat the project as maintained but unadopted — no meaningful dependent community, no visible governance — rather than abandoned.
  • Not supported: feature prioritization, pricing, or customer-facing roadmap calls. This remains an infrastructure dependency question with a narrow blast radius.

Bottom line for planning: still a replaceable implementation detail, not a platform commitment. Nothing in the product surface should depend on it. The release makes it a more credible implementation detail for non-Laravel code; it does not make it a platform.

When to Consider This Package

Consider it when all of the following hold:

  • You are explicitly building something outside the Laravel runtime and want a minimal, autowiring container. v2.10.0 improves exactly this scenario: setter-level #Autowire attributes on object creation, name-based resolution of scalar arguments (instead of throwing on string services), and nullable arguments resolving to null rather than failing. Those three together remove a large share of the manual binding boilerplate that previously made small containers annoying to use.
  • Your team is willing to vendor the code and own it — patching, security triage, PHP version bumps. Adoption signals are still thin; a healthy version line is not the same as a maintainer community.
  • Legal has cleared the license. NOASSERTION still means GitHub could not detect a recognized license, and v2.10.0 does not address it. Until counsel confirms the actual terms, this cannot ship in a commercial or redistributed product. This remains the single hardest blocker.
  • You have verified PHP version support, PSR-11 conformance, and test-doubles ergonomics by reading the source, not the README — note that the release removed the old documentation pending a move to GitHub Pages, so README-based evaluation is now less reliable than before, not more.
  • You have confirmed the new implicit resolution behavior is acceptable. Name-based scalar resolution and null-on-missing are convenience defaults that can mask typos: a misspelled string parameter may now silently resolve from a same-named binding, and a missing optional service silently becomes null instead of failing fast. Validate this against your error-handling expectations before adopting.

Look elsewhere when:

  • You are in a standard Laravel application. Use the framework container. Two containers means two resolution graphs, ambiguous binding precedence, and confusing stack traces during incidents — v2.10.0 does not change this.
  • You need maintenance guarantees, security response, or a documented upgrade path. A long version line without a visible dependent base is still a bus-factor-of-one risk with no backstop.
  • You need contextual bindings, scoping, decorators, or tag-based resolution at framework parity — mature alternatives exist and are better documented, which matters more now that this package's docs are mid-migration.
  • Alternatives to evaluate instead: illuminate/container (framework-native, zero new dependency), Symfony DependencyInjection (battle-tested, widely deployed), PHP-DI (mature, autowiring-focused, active), League\Container (small, PSR-11, active).

Caveat: this update is driven by the v2.10.0 release note plus repository metadata, not a code audit. If the portability use case is real, budget a one-day spike against the new scalar/nullable resolution behavior before committing.

How to Pitch It (Stakeholders)

To executives: We revisited the third-party dependency-injection container after a new release. The maintainers shipped useful features — easier autowiring, fewer manual bindings — which tells us the project is alive rather than abandoned. It does not change our recommendation. The package still has no meaningful user base, and the license is still unresolved, which means we would own the legal and maintenance risk ourselves in exchange for capability we already get free in Laravel. If we ever need a container outside Laravel, this is now a reasonable candidate to compare, not a default to adopt.

To engineering: v2.10.0 closes some of the ergonomics gap: #Autowire on setters at creation time, scalars resolved by parameter name instead of throwing, and nullable arguments defaulting to null. That is real convenience for standalone libraries and CLI tools. The trade-offs are unchanged for us: a second resolution graph inside a Laravel app, two places to look when a class won't resolve, and worse incident debugging for zero capability gain. Watch the new implicit behavior too — name-based scalar resolution and silent null can hide typos, so anything adopting this needs tests that assert failures, not just successes. The docs were also pulled pending a GitHub Pages migration, so source is the only reliable spec right now.

Recommendation: No-go for production adoption inside Laravel — keep the framework container as the standard. Upgrade the portability track from "not viable" to "viable candidate": if a genuine framework-portability requirement appears, run a timeboxed spike comparing this package, PHP-DI, and League\Container against our real binding patterns, now including the v2.10.0 implicit-resolution behavior. Revisit only with a cleared license and a named internal owner.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console