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
Rbac Bundle

Rbac Bundle Laravel Package

sylius/rbac-bundle

Sylius RBAC Bundle adds role-based access control to Sylius applications, with roles, permissions, and resource-level authorization for admin and storefront access. It integrates with Symfony Security to simplify managing user privileges securely.

View on GitHub
Deep Wiki
Context7

[READ-ONLY] Sylius Hierarchical Role Based Access Control integration with Symfony2.

Frequently asked questions about Rbac Bundle
Can I use sylius/rbac-bundle in a Laravel application?
No. sylius/rbac-bundle is a Symfony2 bundle that registers through a Bundle subclass and YAML service wiring, so it has no Laravel ServiceProvider, config publishing, migrations, or Eloquent models to hook into. For Laravel role-based access control, use a Laravel-native package such as spatie/laravel-permission or build authorization on Gates and Policies.
Which Laravel versions are supported by sylius/rbac-bundle?
None. The package is a Sylius/Symfony2 bundle pinned to legacy Symfony2 and pre-PHP 7-era constraints, and there is no Laravel compatibility layer. You cannot compatibility-test it against Laravel 8, 9, 10, or 11 because there is no Laravel integration to test.
How do I install sylius/rbac-bundle with Composer?
Installation only makes sense inside a legacy Sylius/Symfony2 project: require the package with Composer, register the bundle in the Symfony kernel, and wire its services and security configuration. It is read-only and archived, so new installs are risky even in Symfony projects. Do not add it to a Laravel composer.json expecting it to work.
Is sylius/rbac-bundle maintained and safe for production?
No. The repository is read-only and archived, with no maintainer to patch security issues in the authorization layer, which is a high-risk place to carry unpatched code. It also brings Symfony2 dependency conflicts and likely PHP version mismatches. For production Laravel applications, choose a maintained package or an in-house implementation.
What is the difference between sylius/rbac-bundle and spatie/laravel-permission?
sylius/rbac-bundle is Symfony2/Sylius glue for roles, permissions, and resource-level checks through Symfony Security, and it is not installable in Laravel. spatie/laravel-permission is a Laravel-native package for storing roles and permissions, typically with Eloquent models, migrations, caching, and Gate integration. If you need hierarchical inheritance, spatie/laravel-permission plus a small domain service is the more practical path.
How does sylius/rbac-bundle handle roles, permissions, and resource-level authorization?
It lets you configure roles and permissions and guard Sylius admin and shop resources through Symfony Security, including reusable voters and attributes for custom checks. The overview describes fine-grained view, create, edit, and delete checks on entities. That design is Symfony-specific and does not map directly to Laravel's Gate/Policy pipeline.
Does sylius/rbac-bundle support hierarchical roles and permission inheritance?
The overview focuses on roles, permissions, and resource-level checks; the underlying sylius/rbac component is the part associated with hierarchical roles and inheritance. The bundle itself is Symfony2 glue, so any hierarchy logic would need to be extracted and proven standalone before use elsewhere. In Laravel, model inheritance explicitly with a self-referencing role table, cycle detection, and cache invalidation on writes.
What should I check before copying sylius/rbac-bundle code into a Laravel project?
Review the license and provenance first, then verify whether the role resolver depends on Symfony Security contracts or can run standalone on your PHP runtime. Treat the bundle as a specification rather than a dependency, and reimplement the pattern behind Laravel Gates and Policies. Add tests for cycle detection, permission expansion, and cache invalidation if you build hierarchy.
How do I test role-based authorization in Laravel after moving away from Sylius RBAC?
Use Laravel's testing helpers with actingAs and assert the outcomes of Gate and Policy checks for each role, including inherited permissions if you implement hierarchy. Test denial paths as carefully as allow paths, and cover cache invalidation when roles or permissions change. A small feature test matrix for view, create, edit, and delete keeps the authorization rules honest.
What are the best alternatives to sylius/rbac-bundle for Laravel?
For most Laravel applications, use spatie/laravel-permission for role and permission storage plus Laravel Gates and Policies for resource-level checks. If you need inherited roles, add a small hierarchy service with cycle detection and caching rather than adopting a Symfony2 bundle. Other options include Laravel's built-in authorization and packages such as Bouncer, but evaluate maintenance and security support first.
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.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core