laravel-doctrine/acl
Provides ACL support for Laravel Doctrine, letting you define roles and permissions as Doctrine entities and check access to resources through a Laravel-friendly API. Useful for adding role-based authorization to Doctrine-backed Laravel apps.
What 2.1.0 actually is: A single-PR minor release ("Soltmar/laravel 13") that appears to add framework-compatibility support for a newer Laravel major. No new features, no API changes, no deprecations signalled in the changelog. Treat this as a maintenance signal, not a capability change.
Package role and architecture fit: laravel-doctrine/acl is a thin adapter that wires Doctrine's ACL/permission-granting subsystem into Laravel's authorization layer (Gate/Gate::allows, @can, policies). It is only architecturally relevant to applications running Doctrine ORM inside Laravel (typically via laravel-doctrine/orm) rather than Eloquent. For an Eloquent-first codebase this package has no fit — Laravel policies plus a permission table cover the same ground with fewer moving parts. Where it does fit, it is a narrow integration seam: entity-level ACL checks delegated to Doctrine, resolved through Laravel's Gate so existing can() call sites keep working. That seam is its main virtue and its main fragility — correctness of authorization now depends on two frameworks agreeing on object identity.
Integration feasibility: Mechanically easy (composer constraint bump), semantically non-trivial. The gating question is the transitive matrix: Laravel major × Doctrine ORM major × PHP floor × the ACL component. Doctrine ORM 3 removed APIs that historically broke ACL-adjacent packages, and a minor release that widens a framework constraint does not by itself prove the ORM combination is exercised in CI. Feasible in a branch in under a day; proving it is safe to ship takes a test pass over every authorization path.
Technical risk: Low for the release itself (minor, additive, no migration). Moderate-to-high for the dependency as a whole: single-maintainer project (TomHAnderson), low commit velocity, narrow install base. The failure mode is asymmetric — a broken ACL either 403s loudly (visible, cheap) or grants too much silently (invisible, expensive). That asymmetry, not the version number, is what should drive scrutiny.
Key questions for the maintainer / our own validation:
composer.json constraints merely widened?illuminate/auth Gate integration or service-provider registration that could alter resolution order against existing Gate::before/after hooks?Evidence caveat: This evaluation is derived from the 2.1.0 changelog only; no repository, CI, or dependency-graph data was supplied. Items above are validation tasks, not findings.
Stack fit: Laravel + Doctrine ORM + Doctrine ACL schema. Prerequisites: a configured second (or primary) DBAL connection with the acl_* tables, the ORM service provider, and this package's provider registering the Gate bridge. Incompatible with Eloquent-only applications and with apps that expect per-record row-level tenancy out of the box (ACL object identities are not tenant-scoped by default — this must be layered on).
Migration path: Minor bump. composer require laravel-doctrine/acl:^2.1 in a branch, then resolve. Expect the real friction to be composer why-not output pointing at a pinned Laravel or ORM version, not at this package. If we are already on 2.0.x, the diff should be constraint-only and the upgrade a no-op at runtime.
Compatibility checklist before merge:
acl_* tables.Sequencing:
Gate/can() with Doctrine entities.composer update --with-dependencies for the ACL chain only.Maintenance: Minimal footprint, infrequent releases, one effective maintainer. Budget for the possibility of upstream stagnation: pin the minor, subscribe to releases, and periodically re-verify the Laravel/ORM matrix ourselves rather than assuming a release implies coverage. Because authorization is security-relevant, treat this dependency as "reviewed quarterly" rather than "set and forget."
Support: Community-only, no vendor. The realistic mitigation is an exit ramp: because ACL checks surface through Laravel's Gate, the blast radius of replacing this package is contained to the provider registration and the permission-resolution internals. A DB-backed permission table plus policies is a credible fallback and should be documented as such before it's needed.
Scaling: Doctrine ACL is DB-backed and normalized (acl_classes, acl_object_identities, acl_entries, acl_security_identities). Cost grows with object-identity cardinality and graph depth, not user count — deep hierarchies and bulk grant/revoke are the expensive operations, not steady-state isGranted calls. Mitigate with ACL caching (Doctrine supports it) and by keeping object identities coarse rather than per-row. Invalidation on grant/revoke is the trade-off to design deliberately.
Failure modes to instrument:
acl_* migrations on a new environment → runtime exceptions on first authorized request.Ramp-up: Two distinct skill gaps: Doctrine's entity/UnitOfWork model (a real adjustment for Eloquent-fluent engineers) and ACL concepts (security identities, object identities, permission masks, granting strategies). Budget roughly one to two sprints before a mid-level engineer can safely modify authorization code, and require review from whoever owns the ACL schema. Document the mask semantics in-repo — that knowledge is the least discoverable part of the system and the most consequential to get wrong.
Recommendation: 2.1.0 warrants no action beyond routine evaluation if the target Laravel major matters to us. Continue/adopt only if Doctrine ORM is already the persistence layer; otherwise the correct decision is to not introduce it. Answer the support-matrix questions above before treating 2.1.0 as validated for production.
How can I help you explore Laravel packages today?