PHPackages                             linkage/doctrine-row-level-security - 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. [Security](/categories/security)
4. /
5. linkage/doctrine-row-level-security

ActiveLibrary[Security](/categories/security)

linkage/doctrine-row-level-security
===================================

v2.0.0(1y ago)39.8k↓30.9%[1 issues](https://github.com/77web/doctrine-postgresql-row-level-security/issues)MITPHPPHP &gt;=8.2

Since Mar 17Pushed 11mo agoCompare

[ Source](https://github.com/77web/doctrine-postgresql-row-level-security)[ Packagist](https://packagist.org/packages/linkage/doctrine-row-level-security)[ RSS](/packages/linkage-doctrine-row-level-security/feed)WikiDiscussions main Synced 1mo ago

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

linkage/doctrine-row-level-security
===================================

[](#linkagedoctrine-row-level-security)

A package to provide projects with Doctrine ORM PostgreSQL's Row Level Security features.

Installation
------------

[](#installation)

1. Install this package via composer.

```
composer require linkage/doctrine-row-level-security
```

2. Add this package's EventSubscriber to your doctrine configuration

for Symfony:

```
# services.yaml
services:
    rls.subscriber:
        class: Linkage\DoctrineRowLevelSecurity\RowLevelSecurityListener
        tags:
            - { name: doctrine.event_subscriber, connection: default }
```

for laravel-doctrine/orm:

```
// config/doctrine.php
            'events'        => [
                'listeners'   => [],
                'subscribers' => [
                    Linkage\DoctrineRowLevelSecurity\RowLevelSecurityListener::class,
                ],
            ],
```

Usage
-----

[](#usage)

Add "#\[RowLevelSecurity\]" attribute to your Entity associated with table under Row Level Security.

There are 3 required options for RowLevelSecurity attribute:

- name: a name for policy which should be attached to the table
- role: a name of role which should be attached to RowLevelSecurity users
- using: a sql clause which describes the role's access condition

Then you can use doctrine:migrations:diff or doctrine:schema:create command as usual. SQL to enable Row Level Security will appear in your migration files or be executed on schema creation.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance42

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~362 days

Total

3

Last Release

433d ago

Major Versions

v0.9.0 → v1.0.02023-08-02

v1.0.0 → v2.0.02025-03-11

PHP version history (2 changes)v0.9.0PHP &gt;=8.1

v1.0.0PHP &gt;=8.2

### Community

Maintainers

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

---

Top Contributors

[![77web](https://avatars.githubusercontent.com/u/296615?v=4)](https://github.com/77web "77web (33 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/linkage-doctrine-row-level-security/health.svg)

```
[![Health](https://phpackages.com/badges/linkage-doctrine-row-level-security/health.svg)](https://phpackages.com/packages/linkage-doctrine-row-level-security)
```

###  Alternatives

[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58723.9M36](/packages/scienta-doctrine-json-functions)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[damienharper/auditor-bundle

Integrate auditor library in your Symfony projects.

4542.8M](/packages/damienharper-auditor-bundle)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)

PHPackages © 2026

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