PHPackages                             lm-commons/rbac - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. lm-commons/rbac

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

lm-commons/rbac
===============

Clone of zfr/rbac v1.2.0 for PHP 8 support

v1.2.1(1y ago)073.0k↓29.4%1MITPHPPHP ^8.0

Since Aug 9Pushed 1y ago2 watchersCompare

[ Source](https://github.com/LM-Commons/rbac)[ Packagist](https://packagist.org/packages/lm-commons/rbac)[ Docs](https://github.com/lm-commons/rbac)[ RSS](/packages/lm-commons-rbac/feed)WikiDiscussions 1.x Synced 1w ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Rbac
====

[](#rbac)

[![Build Status](https://github.com/lm-commons/rbac/actions/workflows/build_test.yml/badge.svg)](https://github.com/lm-commons/rbac/actions/workflows/build_test.yml)[![Latest Stable Version](https://camo.githubusercontent.com/c6c24c68fe378a0bf7adfb996943e7ea4c061cc39bbd5f541e26947bd92a3388/687474703a2f2f706f7365722e707567782e6f72672f6c6d2d636f6d6d6f6e732f726261632f76)](https://packagist.org/packages/lm-commons/rbac)[![Total Downloads](https://camo.githubusercontent.com/f5dea99a458c7754dde72214a6fb6fc85e341de10720a2a50d6b7b57de2a7663/687474703a2f2f706f7365722e707567782e6f72672f6c6d2d636f6d6d6f6e732f726261632f646f776e6c6f616473)](https://packagist.org/packages/lm-commons/rbac)[![License](https://camo.githubusercontent.com/556968e05b4467c21656ccbbc55529d59f0a2a3dca6f9bf1f041eda5119c350b/687474703a2f2f706f7365722e707567782e6f72672f6c6d2d636f6d6d6f6e732f726261632f6c6963656e7365)](https://packagist.org/packages/lm-commons/rbac)[![Coverage Status](https://camo.githubusercontent.com/e6e7e28bf0e12ba52c930e4dfa9c3520ae87ee4fae97ef4f412410ede99b2437/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4c4d2d436f6d6d6f6e732f726261632f62616467652e7376673f6272616e63683d312e78)](https://coveralls.io/github/LM-Commons/rbac?branch=1.x)[![Static Badge](https://camo.githubusercontent.com/4733757db413065eb426cf4f302e61b97405a85e96574e1d9a5d559476379b28/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436861745f6f6e2d536c61636b2d626c7565)](https://join.slack.com/t/lm-commons/shared_invite/zt-2gankt2wj-FTS45hp1W~JEj1tWvDsUHQ)

[![Dynamic JSON Badge](https://camo.githubusercontent.com/3e0253bc59502656511e7c5f4e892cd29721f61e9ca54bdff8c2da19da981071/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64796e616d69632f6a736f6e3f75726c3d68747470732533412532462532466170692e6769746875622e636f6d2532467265706f732532466c6d2d636f6d6d6f6e732532467262616325324670726f7065727469657325324676616c7565732671756572793d253234253542253341312535442e76616c7565266c6162656c3d4d61696e74656e616e6365253230537461747573)](https://camo.githubusercontent.com/3e0253bc59502656511e7c5f4e892cd29721f61e9ca54bdff8c2da19da981071/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64796e616d69632f6a736f6e3f75726c3d68747470732533412532462532466170692e6769746875622e636f6d2532467265706f732532466c6d2d636f6d6d6f6e732532467262616325324670726f7065727469657325324676616c7565732671756572793d253234253542253341312535442e76616c7565266c6162656c3d4d61696e74656e616e6365253230537461747573)

### **IMPORTANT!!**

[](#important)

### The only purpose of this package is to provide a version of zfr/rbac 1.2 that support PHP 8 and fixes the deprecation notices.

[](#the-only-purpose-of-this-package-is-to-provide-a-version-of-zfrrbac-12-that-support-php-8-and-fixes-the-deprecation-notices)

Rbac (not to be confused with ZfcRbac/LmcRbac) is a pure PHP implementation of the RBAC (*Role based access control*) concept. Actually, it is a Zend Framework 3 prototype of the ZF2 Zend\\Permissions\\Rbac component.

It aims to fix some design mistakes that were made to make it more usable and more efficient.

It differs on those points:

- A `PermissionInterface` has been introduced.
- `RoleInterface` no longer have `setParent` and `getParent` methods, and cannot have children anymore (this is used to implement a simpler "flat RBAC").
- A new `HierarchicalRoleInterface` has been introduced to allow roles to have children.
- Method `hasPermission` on a role no longer recursively iterate the children role, but only check its own permissions. To properly check if a role is granted, you should use the `isGranted` method of the `Rbac` class.
- `Rbac` class is no longer a container. Instead, it just has a `isGranted` method. The container was complex to properly handle because of role duplication, which could lead to security problems if not used correctly.

This library is used in LM-Commons/LmcRbacMvc v3.

###  Health Score

33

—

LowBetter than 73% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

669d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/39ff13f678d45f5296af1e1a2a5807db794bfd9835b64302c9bcc43156854a03?d=identicon)[visto9259](/maintainers/visto9259)

---

Top Contributors

[![visto9259](https://avatars.githubusercontent.com/u/7890483?v=4)](https://github.com/visto9259 "visto9259 (24 commits)")

---

Tags

laminassecurityrbaczf2zf3

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/lm-commons-rbac/health.svg)

```
[![Health](https://phpackages.com/badges/lm-commons-rbac/health.svg)](https://phpackages.com/packages/lm-commons-rbac)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k98.0M1.3k](/packages/spatie-laravel-permission)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k3.5M115](/packages/bezhansalleh-filament-shield)[zfr/rbac

Zend Framework 3 prototype for Zend\\Permissions\\Rbac.

271.1M7](/packages/zfr-rbac)[owasp/phprbac

PHP-RBAC is the de-facto authorization library for PHP. It provides developers with NIST Level 2 Standard Role Based Access Control and more, in the fastest implementation yet.

435985.8k4](/packages/owasp-phprbac)[laminas/laminas-permissions-rbac

Provides a role-based access control management

363.6M32](/packages/laminas-laminas-permissions-rbac)[saeven/zf3-circlical-user

Complete user entity, rights, and access module for Laminas

3718.9k](/packages/saeven-zf3-circlical-user)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
