PHPackages                             a5sys/acl-doctrine-filter-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. a5sys/acl-doctrine-filter-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

a5sys/acl-doctrine-filter-bundle
================================

2.0.0(4y ago)01.5k1MITPHPPHP &gt;=7.3CI failing

Since Oct 5Pushed 4y ago3 watchersCompare

[ Source](https://github.com/A5sys/AclDoctrineFilterBundle)[ Packagist](https://packagist.org/packages/a5sys/acl-doctrine-filter-bundle)[ RSS](/packages/a5sys-acl-doctrine-filter-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (4)Dependencies (3)Versions (6)Used By (0)

*Deprecated in favor of *

AclDoctrineFilterBundle
=======================

[](#acldoctrinefilterbundle)

This bundles allow to filter doctrine entities automatically

Installation
============

[](#installation)

Composer
--------

[](#composer)

```
composer require "a5sys/acl-doctrine-filter-bundle"

```

Activate the bundle
===================

[](#activate-the-bundle)

In your AppKernel, add the bundle:

```
new A5sys\AclDoctrineFilterBundle\AclDoctrineFilterBundle(),

```

Configuration
=============

[](#configuration)

Add the doctrine filter configuration to your config.yml

```
doctrine:
    orm:
        filters:
            acl:
                class: 'A5sys\AclDoctrineFilterBundle\Filter\AclFilter'
                enabled: true

```

You can also disable the ACL for some roles:

```
acl_doctrine_filter:
	    no_acl_roles:
	        - "ROLE_ADMIN" #mandatory list of user roles that does not have acl

```

Usage
=====

[](#usage)

Guess you have 3 entities:

- User
- UserProject (link between user and project, it is our acl)
- Project

In your code, if you do:

```
	$projectRepository->findAll();

```

You will get all projects without any ACL

Modify the Project.php entity, add the **AclAnnotation**:

```
namespace AppBundle\Entity;

```

\*\* use A5sys\\AclDoctrineFilterBundle\\Annotation\\AclAnnotation;\*\* use Doctrine\\ORM\\Mapping as ORM;

```
/**
 * @ORM\Table(name="project")
 * @ORM\Entity
 * @AclAnnotation(aclSql="##TABLEALIAS##.id in (select distinct project.id from project inner join user_project ON user_project.project_id = project.id where user_project.user_id = ##USERID##)")
 */
class Project
{
....

```

and automatically, the sql of the annotation will be appended to all SQL queries and no forbidden entities will ever be retrieved.

You do the same for all entities you want to protect with ACL.

Reserved keyword
----------------

[](#reserved-keyword)

```
##TABLEALIAS##

```

This keyword will be automatically replaced par the table alias generated by the DQL

```
##USERID##

```

This keyword will be automatically replaced par the id of the logged user

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~122 days

Total

5

Last Release

1603d ago

Major Versions

1.0.2 → 2.0.02022-02-08

PHP version history (2 changes)1.x-devPHP &gt;=7.4

1.0.2PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/c429f46d826a96644aa39a86ad00a6834bfa6b9190b7a62b8c42c53baf66b4b1?d=identicon)[jonag](/maintainers/jonag)

![](https://www.gravatar.com/avatar/3a644d41501105bc7aded710d1682ac2a3abdceaf9c02e97d1cb1d6e2607c9d9?d=identicon)[ttx-a5](/maintainers/ttx-a5)

---

Top Contributors

[![mfe-a5sys](https://avatars.githubusercontent.com/u/87469153?v=4)](https://github.com/mfe-a5sys "mfe-a5sys (8 commits)")[![jonag](https://avatars.githubusercontent.com/u/2146169?v=4)](https://github.com/jonag "jonag (3 commits)")[![JumpIfBelow](https://avatars.githubusercontent.com/u/3481835?v=4)](https://github.com/JumpIfBelow "JumpIfBelow (3 commits)")[![thomasbeaujean](https://avatars.githubusercontent.com/u/5817919?v=4)](https://github.com/thomasbeaujean "thomasbeaujean (1 commits)")[![ttx-a5](https://avatars.githubusercontent.com/u/14219718?v=4)](https://github.com/ttx-a5 "ttx-a5 (1 commits)")

---

Tags

acldoctrinesymfony-bundle

### Embed Badge

![Health badge](/badges/a5sys-acl-doctrine-filter-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/a5sys-acl-doctrine-filter-bundle/health.svg)](https://phpackages.com/packages/a5sys-acl-doctrine-filter-bundle)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[kimai/kimai

Kimai - Time Tracking

4.8k8.7k1](/packages/kimai-kimai)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

939.0k](/packages/ahmed-bhs-doctrine-doctor)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
