php-casbin/php-casbin
An authorization library that supports access control models like ACL, RBAC, ABAC in PHP . observed · 2026-08-28
Health v2 · maintenance only
98/100
- Activity 97
- Release rhythm 97
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 30.0
- age_days: 2879
- days_rel: 21
- days_push: 21
- n_releases_24m: 15
Adoption not part of the score
1335 stars · 135 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
PHP-Casbin is a powerful and efficient open-source access control library for PHP projects that enforces authorization based on models like ACL, RBAC, and ABAC. It is the PHP implementation of the cross-language Casbin ecosystem, with policies loadable from files or databases via adapters.
Use cases
- add role-based access control (RBAC) to a PHP application
- enforce ACL permissions on API endpoints
- implement attribute-based access control (ABAC) in PHP
- store authorization policies in MySQL or PostgreSQL
- manage role hierarchies and permissions in Laravel or other PHP frameworks
- switch authorization models by editing a config file instead of code
When to choose
- you need flexible, model-driven authorization in a PHP project
- you want support for multiple access control models (ACL, RBAC, ABAC) in one library
- you need policy persistence across many storage backends via adapters
- you want API consistency with other Casbin language implementations
When to avoid
- you only need simple hardcoded role checks with no policy management
- your project is not in PHP
- you need authentication (login/identity) rather than authorization - Casbin does not handle that
Facets
library · maturity active
authorization auth middleware security web-development backend developer-tools php rbac acl abac access-control permissions casbin policy-enforcement
10 sources
- readme: https://github.com/php-casbin/php-casbin · fetched 2026-08-28 · 057523a2081e
- homepage: https://casbin.org · fetched 2026-08-29 · bf9a21b944e9
- site_page: https://casbin.apache.org/docs/overview · fetched 2026-08-29 · e6df9330fc66
- site_page: https://casbin.apache.org/docs/downloads · fetched 2026-08-29 · 34577d2c2ff2
- site_page: https://casbin.apache.org/docs/get-started · fetched 2026-08-29 · 1cef184398ca
- site_page: https://casbin.apache.org/docs/category/access-control-models · fetched 2026-08-29 · 323b2c9c0a23
- site_page: https://casbin.apache.org/docs/category/storage · fetched 2026-08-29 · 36570671a14a
- site_page: https://casbin.apache.org/docs/adapters · fetched 2026-08-29 · cd140120068d
- site_page: https://casbin.apache.org/docs/category/api · fetched 2026-08-29 · 4099ba1bb75f
- site_page: https://casbin.apache.org/docs/ide-plugins · fetched 2026-08-29 · 5a9e92f4f45a
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| php-casbin/php-casbin | main | 98 |
For agents
markdown · JSON · MCP: product_card(name="php-casbin/php-casbin")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem