spiechu/symfony-commons-bundle
Symfony Commons Bundle provides reusable helpers and base classes for Symfony applications, including common controller, service, and Doctrine utilities that reduce boilerplate and speed up building standard CRUD and admin features.
composer require," which removes the maintenance liability entirely while capturing the value.assert() usage in value objects is a reusable convention for our own app/ValueObjects layer. This feeds a coding-standards decision: do we enforce invariants via assert() (dev-only, disabled in prod) or via exceptions that always fire? Product impact is real — silent invalid state is a data-integrity bug class.Consider mining it (patterns only) when:
assert() vs. exceptions in production.Look elsewhere when:
ServiceProvider, no facade, no config bridge, and installing it yields un-bootable classes. The effort is pure waste.assert() is disabled by default (zend.assertions=-1), so a value object relying solely on assertions is a dev-only guard, not a domain rule.Concrete adoption criteria (all must be true): a real Symfony runtime in our estate, a verified non-conflicting dependency graph, the specific classes proven framework-agnostic, and a decision on assertion-vs-exception in production. Absent any one of these, decline.
For executives — one paragraph: A small open-source PHP library surfaced as a candidate for our Laravel work. My recommendation is not to adopt it as a dependency. It is a Symfony bundle, last released in January 2018, with minimal community traction and no Laravel integration; forcing it in would create a permanent maintenance obligation with no offsetting benefit. However, it contains two genuinely useful engineering patterns — a clean way to enforce domain invariants in value objects, and a clean separation between data collection and rendering for debugging tools. I am recommending we extract those patterns internally at zero dependency cost. Net: no new vendor risk, no licensing cost, small but real quality gain, and a documented "no" that saves us from re-litigating this class of decision.
For engineering leadership: Treat this as a reference implementation, not a package. Two artifacts to read: the value-object assert() idiom (0.3 hardened it) and the DataCollector/ Twig-decoupling diff (the clearest signal in the release — it shows collection separated from presentation). Copy the collection/presentation split into any Telescope-adjacent work we do. Do not copy the assertion pattern blindly: PHP assertions are compiled out in production, so our house rule is exceptions for domain invariants, assert() only for developer sanity checks — and that rule should be written down as part of this evaluation.
For the requesting team: The honest answer is no with a caveat. If you need the behavior, spend a day porting the two or three classes you actually want into packages/ or app/ValueObjects with your own tests, and mirror the release's CI shape (functional tests on the wiring, static analysis on the public API). Note that PHPStan level 4 catches dead code and return-type mismatches — it is not a type-safety guarantee, so do not treat the upstream quality signals as stronger than they are. Pin nothing, because we are not installing anything.
Risk summary table for the decision log:
| Dimension | Assessment |
|---|---|
| Framework fit (Laravel) | Poor — Symfony bundle, no service provider, no auto-discovery |
| Maintenance | Dormant since 2018-01-24; pre-1.0 (0.3) with no stated BC policy |
| Community signal | 5 stars — negligible; expect to fork if anything breaks |
| Security/licensing | MIT — no licensing concern; no security surface in value objects |
| Cost of adoption | Low install, high integration; a bridge would be net-new owned infrastructure |
| Cost of pattern extraction | ~1 engineer-day, no ongoing dependency |
| Recommendation | Decline as a dependency. Mine two patterns. Document the "no." |
How can I help you explore Laravel packages today?