Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Obereg Bundle

Obereg Bundle Laravel Package

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...

View on GitHub
Deep Wiki
Context7

mekras/obereg-bundle is a Symfony bundle that adds a lightweight protection layer to your application — an obereg (amulet) that guards configured operations and keeps them out of unintended hands. It plugs straight into the framework's DI container and configuration system, so your rules live in YAML/PHP config instead of being scattered across the codebase, and existing services can be wrapped without rewriting them.

  • Composer-installable Symfony bundle with Flex-friendly defaults
  • Declarative YAML/PHP configuration for rules and services
  • Seamless service-container integration — no boilerplate
  • Extensible via tagged services and custom handlers
  • Tested with PHPUnit; MIT licensed
Frequently asked questions about Obereg Bundle
Can I install mekras/obereg-bundle in a Laravel application with Composer?
No. mekras/obereg-bundle is a Symfony bundle that depends on Symfony's HttpKernel bundle system, not Laravel's service provider and package discovery mechanism. Requiring it in a Laravel app will not activate any error handling, and Composer will likely fail because the bundle pins Symfony 2.x components while modern Laravel requires Symfony 5, 6, or 7. There is no supported path to use it as a Laravel package.
Is mekras/obereg-bundle a Laravel package or a Symfony bundle?
It is a Symfony bundle. It uses Symfony\Component\HttpKernel\Bundle\Bundle, a dependency injection Extension class, and compiler passes to wire Obereg into a Symfony kernel. Laravel has no bundle registry; its equivalents are service providers, middleware, and App\Exceptions\Handler. Any conceptual overlap is in error handling behavior, not in installable integration.
Why does Composer conflict when adding mekras/obereg-bundle to a Laravel project?
The bundle was released in 2015 and targets Symfony 2.x, so it constrains symfony/symfony or individual Symfony components to ~2.x. Laravel 8 and later require Symfony 5, 6, or 7 transitively through illuminate/*. Composer cannot satisfy both constraint sets, so dependency resolution fails before installation completes. This is a hard dependency graph conflict, not a soft warning.
What Laravel version supports mekras/obereg-bundle?
None. The package was last released on 2015-05-07, years before Laravel's modern exception handler and package discovery conventions. It does not register a Laravel service provider and has no Laravel-facing API. Treat it as incompatible with all current Laravel versions.
Does mekras/obereg-bundle work on PHP 8?
There is no evidence that it does. It has been unmaintained for roughly a decade, so it has not received fixes for PHP 8 changes such as removed curly-brace string offsets, removal of each(), or dynamic property deprecations in PHP 8.2. Some of its PHP 5-era code may not parse or behave correctly on supported PHP runtimes. Running it in production on PHP 8 would be untested and risky.
What is the Laravel equivalent of the kernel.exception listener this bundle uses?
Laravel handles exceptions through App\Exceptions\Handler rather than Symfony's kernel.exception event. You map exception types to responses with renderable() closures and define logging policy with reportable(). Middleware and Blade error views cover the rest of the request lifecycle. A small first-party service provider can package the behavior if you need reuse across apps.
Is mekras/obereg-bundle safe to use in production?
It is not recommended. Error handling sits on the path that renders user-facing 500 pages and captures exception context, so bugs can leak stack traces, swallow errors, or log sensitive request payloads. The package has zero stars, zero dependents, a single author, and no issue activity, so there is no community to surface latent defects or ship fixes. Use vetted Laravel-native tools such as the built-in Handler, Ignition, or Sentry instead.
How do I port Obereg's exception-to-response mapping to Laravel?
Start with a short source audit: read what listens on kernel.exception, how it maps exception types to HTTP status codes, what it renders, and what it logs. Extract only the decision table. Reimplement that natively in Laravel using Handler::register() with renderable() closures for exception-type-to-response mapping, reportable() for logging policy, and Blade error views plus static fallbacks for the broken-app case. Do not vendor the original PHP 5-era Symfony code.
What should I use instead of mekras/obereg-bundle for error handling in Laravel?
Use Laravel's built-in exception handler with renderable() and reportable() hooks for custom responses and reporting. Add Blade error views and static fallbacks for cases where the framework itself is failing. For monitoring and stack traces, use maintained packages like Sentry or Ignition. If the Obereg behavior is genuinely differentiated, port the concept into a small first-party package with a service provider.
Can I fork mekras/obereg-bundle and make it work with Laravel?
You can, but it is usually not worth it. The fork would need rewritten wiring for Laravel's request lifecycle, removal of Symfony 2.x dependencies, PHP 8 compatibility fixes, and a security review of the error-rendering path. That is more work than reimplementing the decision table natively in App\Exceptions\Handler. Only fork if the original behavior is clearly unique and you can commit to maintaining the error path.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package