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 Extra Bundle Laravel Package

rickysu/di-extra-bundle

A Symfony bundle that adds annotation-based dependency injection configuration, letting you declare services, parameters, and injections directly in PHP classes instead of XML or YAML files.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — category mismatch, not a version mismatch. The cataloguing says "Laravel/PHP package," but rickysu/di-extra-bundle is a Symfony 4 bundle (RSDiExtraBundle). Bundles are discovered and compiled by Symfony's Kernel and ContainerBuilder compiler-pass pipeline. Laravel has no bundle loader, no compiler passes, and no equivalent extension point. Nothing in this package executes inside a Laravel request lifecycle. This is the decisive fact and it should be recorded before any spike is funded.

Integration feasibility — blocked on two independent fronts. First, mechanism: consuming this in Laravel is a from-scratch rewrite as an Illuminate\Support\ServiceProvider, not an install. Second, dependencies: a Symfony 4 bundle pins symfony/* to ^4.x (and likely PHP ^7.1), while Laravel 10/11 ship Symfony 6/7 components. Composer resolution will fail, and forcing it (--ignore-platform-reqs, replace) corrupts the framework's own dependency tree. That's a stop, not a configuration exercise.

Technical risk — high, and mostly adoption risk rather than code risk. Seven stars, zero dependents, single maintainer, composite score 0.125, and a target runtime (Symfony 4.4) that reached EOL in November 2022. Zero dependents means no third party has validated the code against real workloads, filed bugs, or produced hireable tribal knowledge. The code almost certainly predates PHP 8's removal of ReflectionParameter::getClass() and the tightening of container compilation APIs, so PHP 8.2/8.3 would require source patches. MIT is the one clean positive: fork-and-patch is legally unencumbered if we ever chose to own it.

Key questions (gate before spending any engineering time):

  • Do we operate any Symfony 4 estate? A Laravel-centric stack suggests no, which ends the evaluation immediately.
  • What does the bundle actually do beyond autowire/autoconfigure sugar? The README and DependencyInjection/ compiler passes must be read to answer this; the description alone is insufficient.
  • Is there a first-party Symfony successor (#[Autowire], #[TaggedIterator], #[AsDecorator], service decoration) that superseded these features by 5.3+? If yes, the package is superseded even within its own ecosystem.
  • What concrete developer-experience pain are we solving? If the answer is "our service providers are verbose," the fix is internal conventions and codegen — not a 7-star abandoned bundle.
  • What is the maintainer's responsiveness and bus factor? Currently one and one.

Verdict: Recommend reject — category mismatch and abandoned upstream. Optionally timebox a one-day read of the source purely as a pattern catalog for improving our own provider ergonomics. Do not sequence an integration.

Integration Approach

Stack fit — none for Laravel. There is nothing to sequence into an install plan. The productive framing for engineering is: "other ecosystems solved DI ergonomics problems; here is how we solve them natively in Illuminate\Container." If a spike extracts the bundle's feature set, each item should land on a Laravel-native equivalent rather than a port:

Bundle concept (inferred) Laravel-native equivalent
Auto-registration by interface/namespace config/app.php providers + composer.json extra.laravel.providers; make:provider
Conditional / contextual injection #[ContextualAttribute] (L11+), $this->app->when(...)->needs(...)->give(...)
Service decoration $this->app->extend(Service::class, fn ($svc, $app) => ...)
Tagged service collection $this->app->tag([...], 'tag') + tagged(); #[Tag] attributes
Lazy / proxy services Deferred providers + constructor injection discipline
Interface binding conventions #[Bind] / #[Singleton] attributes, or a small internal provider base class

Migration path — there is nothing to migrate from. If a legacy Symfony 4 service surfaces in the estate, the path is: freeze the service, extract its compiler-pass logic into explicit PHP, and rewrite bootstrapping onto Symfony 5.4/6.4 before anything else. Do not introduce this bundle as a compatibility shim; that converts an existing EOL problem into an EOL problem plus an owned dependency.

Compatibility work required even for a read-only spike: PHP 7.4 + Symfony 4.4 in an isolated container. Do not add it to any application composer.json, and do not add it to any shared CI image.

Sequencing (recommended):

  1. Gate (0.5 day): confirm no Symfony 4 in scope; record the rejection in the architecture decision log so the question doesn't resurface.
  2. Mine (1 day, optional, timeboxed): read Resources/config/, the extension class, and compiler passes; enumerate features and mark which are now first-party Symfony.
  3. Spike (3–5 days, only if step 2 finds a genuine gap): implement the two highest-value patterns as a ~150-line internal provider base class against 3–5 representative services.
  4. Measure: provider boilerplate removed, container compile-time delta, code-review clarity.
  5. Decide: adopt internal, or standardize on framework-native attributes and close the ticket.

Operational Impact

Maintenance — would be total ownership. Abandonment means inheriting security patching, PHP 8+ compatibility fixes, Symfony constraint loosening, and test coverage, with no upstream triage to piggyback on. Estimate 2–5 engineer-days of initial remediation plus a recurring tax every PHP or Symfony major cycle — for a capability the framework already ships.

Support — effectively zero. No maintainer SLA, no community forum, no Stack Overflow corpus, no AI-assistant coverage. When a container compile fails at 2 a.m., on-call debugs unfamiliar compiler-pass code with no searchable precedent. We would become the world's leading experts on this package by default, which is not a position worth holding.

Scaling — the constraint is team scale, not throughput. A DI container compiles at boot and caches; runtime performance is a non-issue. The real cost is cognitive: bespoke DI conventions create invisible autowiring that produces wrong-service-resolved bugs far from their cause and lengthens onboarding for every new hire. Standard Laravel idioms are hireable and documented; this is neither.

Failure modes to document:

  • Hard: CI composer install resolution failure when Symfony 4 pins meet Laravel's Symfony 6/7 components — blocks every build, not just the feature.
  • Hard: container compilation failure at deploy after a PHP minor upgrade (removed reflection APIs, deprecations-as-errors).
  • Silent: autowiring resolves a plausible-but-wrong concrete class; passes tests, fails on a specific production path.
  • Silent: decoration ordering nondeterministic relative to other providers — intermittent and hard to reproduce.
  • Security: unpatched transitive dependency with no disclosure channel and no CVE watcher coverage for a zero-dependent package.

Ramp-up — negative ROI. Reading the bundle is cheap; the knowledge is non-transferable and expires with the framework. Every hour spent on a Symfony-4-era DI dialect is an hour not spent on container idioms the team uses across the portfolio. A mid-level Laravel engineer is productive with contextual binding and tag attributes in under an hour precisely because documentation, community answers, and assistant coverage all exist.

Bottom line for portfolio review: 0.125 with 7 stars and 0 dependents is an accurate signal, and the Symfony-bundle/Laravel-stack mismatch makes this a clean reject rather than a conditional one. Recommended action: a one-paragraph ADR closing the question, and — if DI verbosity is a genuine pain point — a small internal spike on native provider ergonomics funded from the same budget.

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.
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator