Laminas Permissions ACL

Role-based access control lists for PHP applications.

Library
Composer
v2.18.0
32stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
59/100Fair
Development Activity76
Maintenance52
Community36
Maturity60
Momentum12

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
74/100Good
Architecture80
Code Quality82
Innovation60
Learning Curve74

Laminas Permissions ACL provides a lightweight, flexible implementation of access control lists (ACL) for PHP. It lets you model authorization as roles, resources, and privileges, then query whether a given role is allowed to perform an action on a resource.

Roles and resources support inheritance, and rules can be layered with allow/deny semantics and assertion callbacks for context-sensitive decisions. As part of the Laminas project (formerly Zend Framework), it is a mature, well-documented building block for application authorization.

What You Get

  • An Acl API for defining roles, resources, and privileges
  • Allow/deny rules with role and resource inheritance
  • Assertion interface for context-sensitive authorization checks
  • A simple isAllowed() query for authorization decisions

Common Use Cases

  • Enforcing role-based permissions across an application’s actions
  • Modeling hierarchical roles such as guest, member, and admin
  • Applying dynamic authorization rules via custom assertions

Under The Hood

Architecture - The Acl class maintains registries of Role and Resource objects (each supporting parent references for inheritance) and a rules table keyed by role, resource, and privilege. isAllowed() walks the inheritance chains applying the most specific matching allow/deny rule, and optionally invokes an AssertionInterface for dynamic checks. Tech Stack - Modern PHP (8.x) organized under the Laminas\Permissions\Acl namespace with PSR-4 autoloading, PHPUnit tests, and PHPStan/psalm static analysis in CI. Code Quality - Long-lived, high-coverage code inherited from Zend Framework with continuous-integration workflows and strict typing; well-documented on docs.laminas.dev. API Design - Clear and composable: addRole(), addResource(), allow(), deny(), and isAllowed() read almost like a specification of your permission model.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search