orbitale/permissions-bundle
Symfony bundle for managing permissions and access control with simple annotations. Define permissions in YAML, attach them to controller actions, and check user rights through a lightweight, cache-friendly API that integrates cleanly into existing Symfony security setups.
Architecture fit — critical mismatch. orbitale/permissions-bundle is a Symfony bundle, not a Laravel package. Its value proposition — a single security voter driven by a declarative permissions config directive — addresses a real Symfony pain point (voter proliferation). Laravel solves the same problem differently: Gate::define(), policies, and AuthServiceProvider bootstrapping. There is no Kernel::registerBundles(), no bundle DI extension, no Symfony config tree in a Laravel application. The concept maps to a config-driven Gate::before or a custom ability resolver; the code does not map at all.
Integration feasibility — low. The package will pull symfony/framework-bundle, symfony/security-bundle, symfony/dependency-injection, and symfony/config. On a modern Laravel 10/11 application (Symfony 6/7 components), Composer will either refuse to resolve or force a downgrade of shared Symfony packages — a non-starter given Laravel's own dependency on those components. Making it work would require a hand-written service provider that manually instantiates the voter and rehydrates the config, at which point you have effectively reimplemented the package and inherited its code without its (nonexistent) maintenance.
Technical risk — high, concentrated in two areas.
VoterInterface::vote() changed signature in Symfony 4.1+/5.x, and PHP 8.x tightened typed signatures and dynamic-property behavior. Expect hard fatals, not deprecation warnings, on any contemporary runtime.Key questions for the team:
Stack fit — none. Do not attempt Composer installation into a Laravel application. The shared-Symfony-component conflict makes the install either impossible or an implicit framework downgrade. Treat the repository as a design reference only.
Migration path. Two viable routes, neither of which involves the package as a dependency:
AuthServiceProvider — a single Gate::before (or a custom Gate subclass) that consults a config/permissions.php map of ability => closure/rules. This reproduces the bundle's core idea in roughly 100–200 lines with full Laravel idiom, testability, and caching via php artisan config:cache.spatie/laravel-permission — actively maintained, large install base, Laravel-native. It is the low-risk substitute for the capability this bundle gestures at.Compatibility. Assume Symfony 2.8/3.x constraints and PHP 5.6/7.0 syntax. Modern PHP 8.2+ and Laravel 10/11 are out of scope for the upstream code. Any fork must be re-tested against your exact PHP and Laravel versions and against the current VoterInterface contract.
Sequencing.
spatie/laravel-permission is a one-file change.Maintenance. Zero upstream maintenance. Adopting the dependency means the team owns the entire authorization surface from day one, including every future PHP and Laravel upgrade. Reimplementing the pattern internally reduces that ownership burden to code you wrote and can read.
Support. No maintainer, no issue triage, 0 dependents, no meaningful Stack Overflow corpus. Internal engineers debugging an authorization failure at 2 a.m. will find no external help. Budget for the internal ramp-up explicitly.
Scaling. Authorization checks are on the hot path of nearly every request. The bundle's config-tree parsing is a Symfony compile-time concern; in a Laravel context you must replicate that with config:cache or an in-memory permission map. Plan for a request-scoped memoization layer — repeated Gate calls with the same ability/argument tuple should not re-evaluate closures.
Failure modes.
symfony/* versions and blocking future Laravel upgrades. This is the most likely long-term cost and is entirely avoidable.Ramp-up. High relative to value delivered. Engineers must internalize Symfony bundle internals — Kernel registration, DI extension, config tree — to extract a few hundred lines of logic. The reimplementation is cheaper than the integration and produces code the team already understands. Recommend rejecting the dependency and documenting the pattern as prior art in the ADR.
How can I help you explore Laravel packages today?