- What is laravel-doctrine/acl used for?
- It is a thin adapter that connects Doctrine's ACL and permission-granting subsystem to Laravel's authorization layer, so you can define roles and permissions as Doctrine entities and check them through Gate, @can, and policies. It only makes sense in Laravel applications that run Doctrine ORM instead of, or alongside, Eloquent. For an Eloquent-first codebase, native policies plus a permissions table cover the same ground with fewer moving parts.
- Does laravel-doctrine/acl work with Eloquent models?
- No. The package targets Doctrine ORM entities and relies on the Doctrine ACL schema, the acl_* tables, on a configured DBAL connection plus the ORM service provider. Eloquent models are not part of its object-identity model, so an Eloquent-only application has no real fit for it.
- Which Laravel versions does laravel-doctrine/acl 2.1.0 support?
- Version 2.1.0 is a minor release that widens framework compatibility, apparently adding support for a newer Laravel major, with no new features or API changes in the changelog. Check the composer.json constraints and confirm whether the new constraint adds a Laravel major or replaces an older one, since that decides your effective floor. Also verify the CI matrix actually runs that combination rather than the constraint merely being widened.
- How do I install laravel-doctrine/acl?
- Install it with composer require laravel-doctrine/acl:^2.1 in a branch and resolve dependencies. You need a configured DBAL connection with the Doctrine ACL tables, the laravel-doctrine/orm service provider, and this package's provider, which registers the Gate bridge. Expect most dependency friction to come from pinned Laravel or Doctrine ORM versions rather than from this package itself.
- How does laravel-doctrine/acl integrate with Gate and @can?
- It registers a bridge so entity-level ACL checks are delegated to Doctrine and resolved through Laravel's Gate, which means existing can() call sites, @can directives, and policies keep working. Review how it interacts with any existing Gate::before or Gate::after hooks, because resolution order can change effective authorization. Correctness depends on Doctrine and Laravel agreeing on object identity.
- Is laravel-doctrine/acl compatible with Doctrine ORM 3?
- That is not guaranteed by a version bump alone. Doctrine ORM 3 removed APIs that historically broke ACL-adjacent packages, and a minor release that widens a Laravel constraint does not prove the ORM combination is exercised in CI. Validate your specific Laravel major, Doctrine ORM major, PHP floor, and ACL component combination before shipping.
- Is laravel-doctrine/acl tenant-aware or multi-tenant safe?
- Not by default. ACL object identities are not tenant-scoped, so per-record row-level tenancy has to be layered on yourself. If your application expects tenant isolation out of the box, plan that work explicitly rather than assuming the ACL layer handles it.
- Is laravel-doctrine/acl safe to use in production?
- It is a single-maintainer project with low commit velocity and a narrow install base, so treat it as a dependency worth watching. The risk is asymmetric: a broken ACL either returns 403 loudly or silently grants too much, and the silent case is the expensive one. Pin versions, cover every authorization path with tests, and track releases.
- What are the alternatives to laravel-doctrine/acl?
- For Eloquent applications, Laravel's built-in gates and policies combined with a permissions table, or a package such as spatie/laravel-permission, cover the same role-based authorization needs. This package's value is specifically the seam between Doctrine ACL and Laravel's Gate, so it only wins when you already run Doctrine ORM inside Laravel.
- How do I upgrade laravel-doctrine/acl from 2.0.x to 2.1.0?
- It is a minor bump with no changelog entries for new features, API changes, or deprecations, so the diff should be constraint-only and a runtime no-op. Resolve it in a branch, then run a full test pass across authorization paths instead of trusting the version number. If resolution fails, read the composer why-not output to find the pinned Laravel or ORM constraint responsible.