modera/foundation-bundle
Modera Foundation Bundle provides shared base services, utilities, and integration helpers for Modera-based PHP applications. It gives other bundles a consistent foundation for configuration, common functionality, and extension.
Framing correction (material to the decision): despite being filed here as a "Laravel/PHP package," modera/foundation-bundle is a Symfony bundle (ModeraFoundationBundle). Its integration surface is the Symfony HttpKernel/DI contract — a Bundle subclass, a DependencyInjection/*Extension that merges a Configuration tree, compiler passes, and XML/YAML service definitions. Laravel has no equivalent lifecycle: no bundle registration, no config-tree merge, no compiler passes, no services.xml ingestion. This is not a packaging detail; it changes the integration cost from "install and configure" to "build an adapter or fork."
Architecture fit: Poor for a Laravel codebase. The composer autoload (PSR-0/PSR-4) will resolve, so individual value objects or utilities are technically importable, but the bundle's reason for existing is the Symfony wiring layer, which is exactly the part Laravel cannot use. Any value extracted is per-class, not per-package, and must be re-hosted behind Laravel service providers.
Integration feasibility: Low-to-moderate for a Symfony 2.x/3.x monolith of the same era; near-zero for a modern Laravel application. A modern Laravel baseline (PHP 8.1+, Laravel 10/11) implies illuminate/* constraints that will almost certainly conflict with transitive pins from a 2016 Symfony/Doctrine dependency graph. Expect composer require to fail on constraint resolution before you ever reach a runtime error.
Technical risk (ranked):
each(), removal of curly-brace string offsets, create_function removal, deprecated dynamic properties (8.2), and Serializable/Countable signature changes. Each is a fork-and-patch, not a config change.Key questions to resolve before any spike:
composer.json actually require — PHP floor, Symfony major, Doctrine major? Does it conflict with our illuminate/* set?ModeraFoundationBundle has hard require edges to sibling modera/* packages.Stack fit: Mismatch. Target stack (Laravel, PHP 8.1+, PSR-4, Composer 2) versus a 2016 Symfony bundle. The only honest fits are a legacy Symfony 2.8/3.x application already inside Modera's ecosystem, or a research spike — not a production Laravel service.
Migration path (in preference order):
symfony/dependency-injection container inside a Laravel service provider to host the bundle. Technically possible; adds a second DI paradigm, a second config system, and a second error surface to every request. Reject unless there is no alternative.Compatibility checklist for any spike: PHP floor vs. our 8.x target; Symfony major vs. any Symfony components we already pull transitively; Doctrine ORM/Common major (Laravel apps often carry these for other reasons — conflict risk); PSR-0 remnants; PHPUnit version in require-dev (vintage 4.x/5.x will not run on modern PHP).
Sequencing if pursued: (a) license and composer.json review — one day, may end the evaluation outright; (b) composer why-not resolution test in a throwaway branch — one day; (c) static analysis pass (PHPStan/Rector) to size the PHP 8 port — two days; (d) go/no-go on the port scope; (e) only then, a timeboxed proof-of-concept behind an adapter interface with contract tests. Gate each step; do not let the spike roll into implementation.
Maintenance: Total ownership transfer. There is no upstream to patch, so every CVE in the transitive graph becomes our incident. Estimate carrying cost as "internal library," not "vendor dependency" — and note that internal libraries without a named owner rot within two quarters.
Support: No maintainer responsiveness, no issue triage, no release cadence. Escalation path is "read the source." Bus factor is effectively zero, and the 2-star/0-dependent profile means no peer community to fall back on. Any production incident traces to a single team that reverse-engineered the code once, possibly a year earlier.
Scaling: Server-side scaling is not the concern — the code predates modern PHP and will likely be the bottleneck first. The real scaling question is the client: this stack's admin UI heritage is ExtJS, which implies heavy front-end assets and a widget framework orthogonal to our Vue/React/Livewire direction. Adopting that drags a second front-end paradigm into the org — a hiring, training, and design-system cost that dwarfs the server-side integration.
Failure modes:
Ramp-up: No current documentation, no runnable examples, no test suite to read as spec. Realistic ramp-up is 1–2 weeks for an engineer to reach "can explain what this does," and that cost is paid before any value is realized. Compare against the near-zero ramp-up of a maintained, documented Laravel package.
Recommendation: Decline adoption. The opportunity score (26.03) and package score (0.04) are consistent with the qualitative read: minimal upside, asymmetric downside. Revisit only if a concrete business requirement surfaces that this package uniquely satisfies — and even then, budget it as an extraction-and-own project, not an integration.
How can I help you explore Laravel packages today?