tourze/doctrine-row-permission-bundle
A Symfony bundle for enforcing row-level permissions on Doctrine entities, helping control access to individual records based on the current user and integrate per-row security checks into queries and operations.
The 0.1.0 release is a pre-1.0 version bump for tourze/doctrine-row-permission-bundle, with no substantive changelog beyond a diff link. From a TPM perspective, this is a signal release rather than a feature release: it confirms active development but provides no evidence of API stability, security review, or production hardening. Treat everything as subject to change.
Architecture fit. Despite being framed as a "Laravel/PHP package," this is a Doctrine bundle. Row-level permissions are implemented at the Doctrine ORM/DBAL layer (filters, listeners, metadata), not at Eloquent. Any Laravel integration therefore requires the laravel-doctrine bridge or a hybrid Eloquent+Doctrine architecture. That is a material architectural constraint, not a footnote. The package fits naturally into Symfony/Doctrine applications; in a Laravel-first codebase it introduces a second ORM and a second persistence mindset.
Integration feasibility. Feasible for greenfield Doctrine-backed services where row-level access control must be enforced close to the database. Infeasible as a drop-in for typical Eloquent-based Laravel apps without rewriting models and repository assumptions. Enforcement is query-time, so raw SQL, native queries, and non-Doctrine access paths will bypass it unless separately constrained.
Technical risk.
Key questions for the maintainer/vendor.
Stack fit. Best fit: Symfony 6/7 + Doctrine ORM 2/3. Conditional fit: Laravel with laravel-doctrine and a willingness to run Doctrine alongside Eloquent. Poor fit: Laravel-idiomatic apps that rely on Eloquent scopes, policies, and Gate for authorization. If the team's mental model is Laravel policies, this package asks them to learn a parallel authorization model.
Migration path.
Compatibility. Pin the version explicitly and avoid floating constraints given pre-1.0 status. Verify PHP version support and Doctrine ORM/DBAL major-version compatibility against the project's actual dependency graph before committing. Check transitive dependency weight and whether the package pulls in Tourze-specific abstractions that complicate upgrades.
Sequencing. (1) Spike: one entity, one permission rule, one integration test proving a denied row is filtered. (2) Verify bypass resistance with raw SQL and native query tests. (3) Benchmark query plans and add indexes for permission predicate columns. (4) Roll out to a bounded domain behind a feature flag. (5) Only then consider broader adoption, and only after a version-pinning and upgrade-review policy is in place.
Maintenance. Pre-1.0 packages shift under you. Budget for upgrade reviews at every minor release and maintain a pinned version with a documented upgrade log. The sparse release notes increase the cost of each upgrade because diffs must be read manually. Assign a named owner for this dependency.
Support. No visible commercial support, SLA, or maintainer responsiveness guarantee from the release data. Escalation path is the upstream GitHub repository. For a security-critical authorization component, that is a risk to record explicitly in the risk register with an owner and a mitigation (fork, vendor, or in-house implementation fallback).
Scaling. Row-level predicates execute per query. At scale this affects query planning and index requirements. Expect to add composite indexes covering tenant/permission columns, and to monitor slow-query logs after rollout. Caching is a specific hazard: cached result sets keyed without the permission context will leak rows across users. Any cache layer in front of these queries must include the permission identity in the cache key.
Failure modes.
Ramp-up. Engineers need working knowledge of Doctrine metadata, DBAL configuration, and filter/listener lifecycles — a non-trivial ramp for a Laravel-native team. Estimate one to two weeks of focused effort before productive contribution, plus additional time for security review of the enforcement model. Document the permission model and the bypass risks in the team's runbook; the package will not document them for you.
TPM recommendation. Proceed only as a spike for a bounded Doctrine domain. Do not adopt in a Laravel/Eloquent core path at 0.1.0. Gate broader adoption on: a readable changelog for the next two releases, a demonstrated bypass test suite, a named maintainer contact, and a documented upgrade policy.
How can I help you explore Laravel packages today?