libre-informatique/decorator-bundle
Libre Informatique Decorator Bundle provides reusable decorator-pattern support for Symfony applications, letting you wrap services or objects with extra behavior while keeping core classes clean and extensible.
Architecture fit. The package is a Symfony bundle, not a Laravel package — the -bundle suffix, the blast-project/libre-informatique vendor, and the "GUI for Libre Informatique Symfony2 projects" description all confirm it. For a Laravel-targeted product this is an immediate architectural mismatch: Laravel has no bundle registry, no config/bundles.php, and no compile-time container pass model. Even if the internal classes are framework-agnostic, the value proposition (auto-registration and container composition at build time) evaporates outside Symfony.
What it actually contributes. Stripped of the bundle wrapper, the durable idea is the Decorator pattern plus a thin convention for declaring wrapped services declaratively instead of hand-wiring services.yaml. That is a genuine architectural concept — layered caching, logging, validation, formatting, feature flags, tenant context — but it is not novel IP. Symfony ships native decorates:/#[AsDecorator]; Laravel ships $this->app->extend(), contextual binding, and pipeline/middleware composition. The package is at best a convenience wrapper around a first-class framework capability.
Integration feasibility: low, and only via extraction. Two paths exist. (a) Install it and inherit its Symfony dependency graph inside a Laravel app — reject; the transitive surface and lifecycle mismatch outweigh any benefit. (b) Read the source, lift the small amount of genuinely useful code (a base decorator, a forwarding proxy, possibly an attribute marker), and re-express it as first-party app/Support classes bound through a service provider. Path (b) is viable precisely because the code footprint is likely a few hundred lines or fewer — but at that size the "integration" is really a reimplementation, and should be scoped and estimated as such.
Technical risk: high.
NOASSERTION) — no recognized license detected. This is a legal-review blocker for anything shipped commercially and a diligence landmine if discovered post-launch. It cannot be waived by engineering.Key questions to resolve before any decision.
composer.json? Legal gate — blocking.Stack fit: poor to none. Under Laravel the bundle degrades to "some classes you may call manually." Auto-registration, compiler passes, and configuration merging — the only reasons a bundle exists — have no Laravel analogue. If the package touches Twig (plausible given the decorator framing and the Symfony2 GUI origin), it is definitively non-portable to Blade without a rewrite.
Recommended path: do not add it as a dependency. Run a timeboxed extraction spike instead:
src/ end to end (expect under an hour), inventory Symfony contract dependencies (Symfony\Component\... type hints must be replaced with our own interfaces).Decorator class, a forwarding proxy, and a DecoratorServiceProvider registered via extend() or explicit interface bindings.Compatibility notes. Expect no extra.laravel.providers auto-discovery and no Laravel-style ServiceProvider. PSR-4 namespaces under the vendor name will not map to App\. Any Symfony-specific interfaces used in signatures must be swapped for framework-agnostic equivalents. Vendoring the class rather than requiring the package removes a supply-chain hop and makes ownership explicit.
Sequencing. Legal → audit → spike (≤1 day) → decision → ADR. Do not allow the spike to run in parallel with a production dependency commitment; the license outcome may terminate the effort outright.
Product framing for stakeholders. This is a build-vs-buy call where "buy" carries a legal unknown and zero support, and "build" costs roughly one engineer-day. The pattern belongs in our architecture guidance; this specific artifact does not belong in our dependency graph.
Maintenance: ours regardless. With zero dependents and zero stars, upstream will not track our PHP upgrades, framework upgrades, or security advisories. Installing it transfers the burden to us while adding an external party we cannot influence; porting it transfers the same burden but with visible ownership.
Support: effectively none. No issue triage, no CVE response process, no release cadence, no SLA. A defect becomes our defect with no escalation path. For anything customer-facing this fails our third-party dependency bar on recognized license, evidence of use, and active maintenance simultaneously.
Scaling: not a concern. This is in-process PHP object composition — no I/O, no network, no shared state. Runtime cost is negligible at any realistic request volume. The scaling risk is organizational: knowledge concentration in whoever performed the port.
Failure modes to anticipate.
composer.json long after the last call site is removed, adding review noise and false signal to dependency audits.Ramp-up: low but non-zero. The code is small enough for a mid-level engineer to absorb in a day. The recurring cost is that a bespoke internal decorator helper is a convention every new hire must learn — which argues for keeping the port minimal and documented, or for using Laravel's native container decoration and skipping the abstraction entirely.
Recommendation. Treat this as a pattern reference, not a dependency. Adopt the idea, own the implementation, keep the license clean. If no concrete codebase problem is identified in step 1 of the spike, close the evaluation outright.
How can I help you explore Laravel packages today?