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.
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.
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.
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:
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.
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.
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.
How can I help you explore Laravel packages today?