openclassrooms/use-case-bundle
A Symfony bundle for organizing application logic into explicit use cases. It provides base classes, interfaces, and service wiring to define and execute use cases cleanly, keeping controllers thin and business rules isolated and testable.
Architecture fit. Unchanged. The package is a Symfony bundle, not a Laravel package. Its job is framework glue: registering a DI extension, exposing a configuration tree, and tagging/autowiring handlers into a message bus via compiler passes. Laravel has no bundle concept and no registerBundles() lifecycle, so none of that glue executes under Laravel's kernel. The reusable substance lives one layer down, in the underlying openclassrooms/use-case abstractions (command/query objects, handlers, a bus contract) — those are plain PHP and portable. Net: the pattern fits our stack well; the artifact does not. v5.0.0 does nothing to change this, because it changes no glue — it is a platform-compatibility bump.
Integration feasibility. Two viable paths. (1) Adopt the core use-case library and write a ~150-line Laravel service provider that binds the bus, resolves handlers from the container, and registers a make:-style generator command. (2) Install the bundle and bridge it through a Symfony-container adapter — not recommended; it adds a second container, a second config system, and a debugging surface with no payoff at this scale. Path 1 remains the recommendation and is unaffected by the release, except that the version of the core library we depend on must be checked for the same PHP floor v5.0.0 introduces.
Technical risk.
php constraint in composer.json rather than trusting the release note; that constraint propagates to us through the core library and, if we bridge, through the bundle's Symfony ranges.composer.json adds no test surface.Key questions. (1–4 unchanged; 5 and 6 are new.)
openclassrooms/use-case (the parent library) actively released, and what is its dependency and PHP-version posture — does it also require 8.5?laravel-mediator, or similar)? Duplication risk is real.composer.json? If the floor exceeds our fleet's floor, this package is not adoptable at all until we upgrade — which reorders the whole decision.Stack fit. Unchanged: poor at the artifact level, good at the concept level. Treat this package as a reference implementation of a dispatch pattern, not as a dependency. The bundle's compiler-pass logic is worth reading before we write our own provider — it encodes the author's decisions about handler registration and naming conventions, which is the genuinely non-obvious part. Note when reading it that v5.0.0's diff is composer.json only, so the convention logic you extract is identical to 4.x; read whichever branch matches our PHP floor.
Migration path. Sequence unchanged, with one gate added up front.
0. Gate: read v5.0.0's composer.json and compare its php and Symfony constraints against our fleet's lowest supported runtime. If it exceeds it, stop — do not proceed past the spike, because the core library's floor likely moves in lockstep.
Compatibility. This is the section the release actually changes. Verify the PHP floor explicitly; a "bump for 8.5" major can mean either "requires 8.5" or "supports up to 8.5" and the release note does not say which. Also re-check whether the bundle still depends only on Symfony components we already pull transitively (console, dependency-injection, config) — if the bump widened those ranges, partial reuse of the console command for scaffolding may still be possible without the full bundle lifecycle.
Sequencing. Do this as a timeboxed spike (1–2 days) inside an existing service, not as a platform initiative. Add the PHP-floor check as a 30-minute prerequisite before the spike, not a task inside it — a failed gate should cost us half an hour, not a day. The decision point remains early: if the convention-extraction step takes more than a day, the pattern is not worth the ceremony and we should stay with Laravel's native command bus. Deliverables in order: PHP-floor gate → convention write-up → provider PoC → one migrated handler → team review. Do not sequence this ahead of anything that touches the framework upgrade path; if anything, this release makes the PHP upgrade path a predecessor rather than a parallel track.
Maintenance. If we go the internal-provider route, maintenance burden is ours and small — a few hundred lines with a stable interface. If we consume the bundle under Symfony, we inherit an external cadence with no SLA and no observable community. v5.0.0 improves the picture slightly: the project responded to a PHP release, so "silence" is now "sporadic but real." That is still not a cadence we can plan a roadmap against, and it does not change the recommendation. The substantive change is branch-split maintenance — 4.x now exists for older PHP and should be assumed frozen.
Support. No vendor support, no meaningful issue-tracker throughput expected at 0 stars. Escalation is "read the source" or "fork it." That is acceptable for a glue layer and unacceptable for anything on the critical path of a revenue system. Position it accordingly. One note of caution: a maintainer who responds to platform bumps is a maintainer who may also merge upstream-breaking changes into a major without a migration guide — support burden can arrive from the direction of activity, not just neglect.
Scaling. Negligible runtime cost — this is dispatch plumbing, not a hot path. The scaling concern is organizational: every service that hand-rolls its own version of this pattern creates divergence. Publish once internally and enforce it, or don't adopt it at all. Half-adoption is the failure mode that costs the most. v5.0.0 adds a second scaling axis: version-divergent PHP floors across services now translate directly into divergent library versions.
Failure modes.
Ramp-up. Low for engineers familiar with CQRS-lite: the surface is a handful of interfaces and one convention. Budget roughly half a day of onboarding plus the spike, plus the PHP-floor gate up front. The real cost is cultural — introducing a command bus into a codebase that currently calls services directly changes how controllers are written and reviewed, and that's a multi-sprint adoption curve regardless of which package we install. Nothing in v5.0.0 changes this.
Recommendation. Unchanged in direction, tightened in preconditions. Do not add openclassrooms/use-case-bundle as a dependency in a Laravel codebase. Use it as a design reference, adopt the framework-agnostic core if its scope and PHP floor fit, and own the Laravel integration ourselves. Revisit the bundle itself only for Symfony-based services, where it is a plausible, if unsupported, drop-in. Action this week: read v5.0.0's composer.json, confirm the floor, and confirm whether the core openclassrooms/use-case library moved in lockstep — that single check determines whether this is adoptable at all in the next two quarters.
How can I help you explore Laravel packages today?