mekras/obereg-bundle
Obereg is a lightweight PHP bundle that adds a reusable protection layer to your application, packaging common guard and safety checks as configurable services. Install with Composer, enable the bundle, and set the rules that fit your project. Small footprint, sensible defaults, and easy integration...
Architecture fit — critical mismatch. Despite the framing as a Laravel/PHP package, mekras/obereg-bundle is a Symfony bundle, not a Laravel package. Bundles rely on Symfony\Component\HttpKernel\Bundle\Bundle, a DI Extension class, and compiler passes. Laravel has no bundle registry; its equivalents are service providers, middleware, and the App\Exceptions\Handler. There is no path to composer require this into a Laravel application and have it activate. Any value here is conceptual, not installable.
Integration feasibility — very low as-is. Two hard blockers stack on top of each other:
kernel.exception, bundle bootstrapping) do not exist in Laravel's request lifecycle. The kernel.exception listener concept maps roughly to Handler::renderable() callbacks or middleware, but only after rewriting the wiring.symfony/symfony or individual components to ~2.x. Every modern Laravel release (8+) requires symfony/* ^5 or ^6/^7 transitively via illuminate/*. Composer will refuse to install both. This is not a soft warning; it is a failed dependency graph.Technical risk — high, concentrated in three areas:
each(), dynamic properties deprecations in 8.2, etc.). Even as a reference implementation, some code may no longer parse or behave correctly on a supported PHP runtime.Key questions for the requesting team:
Handler, renderable()/reportable() hooks, and packages like Sentry/Ignition do not already cover?Assessment: do not adopt for a Laravel stack. Treat it as a readable reference for error-handling design at best.
Stack fit. None for Laravel. For a legacy Symfony 2.x/3.x application it is a plausible native fit, but that is increasingly rare and itself an end-of-life platform. Recommended position: no direct integration; a targeted concept port if the error-handling behavior is genuinely differentiated.
Migration path (if the concept is worth keeping):
kernel.exception, what it renders, how it maps exception types to HTTP status codes, what it logs. Extract the decision table only.App\Exceptions\Handler::register() with renderable() closures for exception-type → response mapping,reportable() hook for the logging policy,Compatibility. If someone insists on running it natively, confirm the target is Symfony ≤2.8 and PHP ≤7.x, and accept that this places the service outside supported-version policy. On any modern PHP or Laravel, expect parse errors, deprecation noise, and unresolvable Composer constraints.
Sequencing. Audit → build-vs-port decision → native implementation spike behind a feature flag → test coverage on the failure path → rollout. Front-load the audit; it is cheap and will almost certainly resolve the question without further spend.
Maintenance. Adopting this means owning a fork from day one. MIT licensing permits it, but the practical cost is a permanent internal maintenance line item for code you did not write, on your most failure-prone execution path, with no upstream to rebase against. Budget for a security review on adoption and annually thereafter.
Support. Zero. No maintainer responsiveness, no CVE feed, no upgrade guidance. Internal on-call absorbs any defect, and defects surface precisely when the system is already degraded.
Scaling. Runtime cost is negligible — the handler executes only on failed requests. The real scaling concern is behavior under cascading failure: if error rendering depends on the database, cache, or a logging transport that is itself down, the handler can recurse or time out. Any port must include static, dependency-free fallback pages and a bounded logging path.
Failure modes to design against:
Ramp-up. The codebase is small; a mid-level PHP engineer can read it in a few hours. The friction is idiom unfamiliarity: Symfony 2-era conventions (DI extensions, compiler passes, event listener registration in XML/YAML) will slow engineers whose context is Laravel. Treat the audit as a knowledge-transfer exercise rather than a build task.
Recommendation. Decline adoption for the Laravel stack on framework-fit and dependency-conflict grounds alone; the decade of unmaintenance and the sensitivity of the error path make the risk disproportionate to any plausible benefit. If the underlying error-handling behavior is valued, fund a 2–5 day native Laravel implementation instead — it will be smaller, supported, and auditable.
How can I help you explore Laravel packages today?