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

Permissions Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • Abandonment: last release 2017-12-26, roughly eight years stale. 18 stars, 0 dependents, score 0.12. There is no maintainer, no security policy, no CVE monitoring, and no community to escalate to. This sits in the unmaintained long tail.
  • Runtime drift: the code targets the PHP 5.6/7.x and Symfony 2.8/3.x era. 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.
  • Blast radius: this is authorization code. A defect is a security incident, and there is no upstream to patch it.

Key questions for the team:

  1. Is the goal to reuse this code, or to reuse this pattern (single voter + declarative rules)? If the latter, the package is a 200-line reference, not a dependency.
  2. What does your current authorization model need — RBAC, ABAC, or resource-scoped policies? Laravel Gate/Policy covers the first and third natively.
  3. Who owns an internal fork if we adopted it, and what is the ongoing cost of that ownership versus a reimplementation?
  4. Are there any hard constraints (legacy Symfony co-residency, a shared service) that make a Symfony bundle relevant to this Laravel codebase at all?

Integration Approach

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:

  • Preferred: implement a config-driven ability resolver in 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.
  • If RBAC/role-permission tables are needed: adopt 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.

  1. Day 1–2 spike: read the bundle's voter and config-tree source to extract the rule model (how permissions are declared, matched, and short-circuited). Document it.
  2. ADR: record the decision to consume the pattern, not the package, with the abandonment and framework-mismatch rationale.
  3. Reimplement the resolver natively behind a feature flag; keep the interface narrow so a future swap to spatie/laravel-permission is a one-file change.
  4. Test matrix: allowed/denied/unauthenticated/guest cases per ability, plus cache-warm and cache-clear behavior.
  5. Data model decision: if permissions need persistence, define tables now; do not inherit a config-file-only model by accident.
  6. Decommission the spike branch. Do not leave the Composer require in any lockfile.

Operational Impact

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.

  • Fail-open: a misconfigured or empty permission map silently granting access. Mitigate with an explicit deny-by-default and a startup assertion that the map is non-empty.
  • Runtime fatal: interface-signature drift or PHP version incompatibility causing a hard error on the auth path — an outage, not a degradation.
  • Dependency deadlock: the package pinning symfony/* versions and blocking future Laravel upgrades. This is the most likely long-term cost and is entirely avoidable.
  • Silent security regression: no CVE feed, so a vulnerability in the voter logic is never reported to you.

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.

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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin