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

Multiple Inheritance Bundle Laravel Package

megogo/multiple-inheritance-bundle

Symfony bundle that brings multiple inheritance to PHP, letting classes inherit behavior from several parent classes at once. Helps share reusable logic across services without duplication. Installs via Composer and integrates with Symfony's service container.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The first finding is a category mismatch: this is a Symfony2 bundle, not a Laravel package. Laravel has no bundle inheritance model — its composition primitives are service providers, config/route/view merging, and Composer autoloading. There is therefore no architectural slot into which this package drops. Even within Symfony, the fit is poor: bundle inheritance (Bundle::getParent(), bundle:inherit) was deprecated in Symfony 4.0 and removed in 5.0, so the mechanism this bundle extends no longer exists in any supported Symfony release. Anything we would build on it is pinned to an end-of-life framework.

Integration feasibility. Effectively zero without a fork. The bundle works by hooking the kernel's bundle resolution and resource path lookup at container compile time to allow one child bundle to draw resources from multiple parents with a precedence chain. That is kernel-internal monkey-patching against an API surface that has since been deleted. A port to modern Symfony would mean reimplementing the behavior as a compiler pass that prepends Twig/translation/asset paths or merges extension config — a different product, not an upgrade of this one.

Technical risk. High and asymmetric. Signals: archived, 5 stars, 0 dependents, a composite score of 0.0425. That profile matches an organization-internal tool published to Packagist and later abandoned, not a library with a user base exercising edge cases. Specific risks: no security response path, no compatibility guarantee with PHP 8 or any current framework, undocumented precedence semantics, and a "magic" inheritance model that defeats static analysis, IDE resolution, and container introspection. The failure surface (silent resource shadowing) is the kind that surfaces in production rather than in CI.

Key questions.

  • What problem are we actually solving — template/asset override across modules, or shared behavior across bundles? These have well-supported answers today (Twig path namespacing, container extension config merging, a shared Composer package).
  • Do we own any Symfony 2.x/3.x application still in service? If yes, this becomes a legacy-scoped evaluation; if no, the package is out of scope entirely.
  • Is "multiple inheritance" a real domain requirement, or a workaround for unclear module boundaries that we should fix at the design level?
  • If we adopt, who owns the fork, and what is the deprecation plan for the framework version it targets?

Recommendation: do not adopt. The only defensible use is a vendored, pinned fork inside an existing Symfony 2.x codebase that cannot be migrated, and even then a targeted compiler pass is likely cheaper than inheriting this code.

Integration Approach

Stack fit. For our Laravel-centric stack: none. The equivalent capability is achieved natively — a shared Composer package with a ServiceProvider that calls mergeConfigFrom, loadViewsFrom, loadRoutesFrom, plus view namespace precedence for overrides. That is roughly a day of work and uses only documented framework behavior.

Migration path. Two branches:

  1. Greenfield / current stack: no migration. Implement the shared-package pattern directly. Capture the requirement as "reusable module with overridable views and config," not "bundle inheritance."
  2. Legacy Symfony 2.x in service: fork into an internal namespace, pin to a specific commit, add a smoke test that asserts resource-resolution precedence, and record it as technical debt with a migration ticket tied to the framework upgrade.

Compatibility. Targets a PHP 5.x-era runtime and a Symfony major version that is end-of-life and unsupported. No compatibility statement exists for PHP 8.x, modern Twig, or Composer 2 semantics. Anything we build inherits that ceiling.

Sequencing. (1) Spike: two days to confirm no consumer application depends on it. (2) Requirements capture: enumerate the actual override/merge needs. (3) Prototype the native alternative against those needs. (4) Decide fork-vs-reimplement only if the prototype fails. Do not begin with the fork — it anchors the design to a dead mechanism.

Operational Impact

Maintenance. We would own 100% of it from day one. An archived repository with no maintainer means no upstream patches, no CVE response, and no framework-compatibility work. Budget for internal ownership against a component whose functionality is a framework anti-pattern.

Support. No community, no issue triage, and documentation limited to a README describing intent rather than precedence rules or edge cases. Every operational question routes to whichever engineer did the fork, creating a single-point-of-knowledge risk.

Scaling. Runtime cost is negligible — the work happens at container compile time. The scaling concern is organizational: implicit multi-parent inheritance chains are hard to reason about as the module count grows. Precedence becomes emergent rather than declared, and onboarding cost rises with every added parent. This is the classic case where a mechanism that saves an hour at two modules costs days at ten.

Failure modes.

  • Nondeterministic resolution when bundle registration order changes.
  • Silent resource shadowing: a parent's template wins and nothing errors, so regressions appear as wrong output rather than failures.
  • Stale container cache after deploy, producing environment-specific behavior that is hard to reproduce.
  • Hard breakage on any framework or PHP upgrade, with no upstream to absorb the change.
  • Autoload/class-resolution edge cases where the child's classes shadow a parent's without warning.

Ramp-up. Steep relative to value delivered. Engineers must learn a nonstandard inheritance model that exists nowhere else in the ecosystem, and that knowledge does not transfer to the framework versions we are actually standardizing on. For a Laravel team specifically, the ramp-up is pure cost with no reusable return.

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.
alphabalex/messaging-made-easy
rawphp/warp
shootkiran/merobug
narakode/fineauth
numencode/wn-syncops-plugin
ibnnajjaar/mib-global-pay
ably/pubsub-server
mstfkhazaal/defender
mfonte/base62x
karnoweb/metapilot
tobya/bcsapiwrapper
swalker2/cpanel
vish4395/laravel-translation-manager
morningtrain/economic
teksite/systeminfo-laravel
atomcms/voting
run6/weather
siokas/laravelembeddirectives
adamlien/pkuuids
gilsonsouza/lara-doc-generator