PHPackages                             tourze/doctrine-sensitive-tag-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. [Security](/categories/security)
4. /
5. tourze/doctrine-sensitive-tag-bundle

ActiveLibrary[Security](/categories/security)

tourze/doctrine-sensitive-tag-bundle
====================================

Symfony Bundle for tracking sensitive data access with Doctrine entities

0.1.0(7mo ago)08MITPHPCI passing

Since Mar 29Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/tourze/doctrine-sensitive-tag-bundle)[ Packagist](https://packagist.org/packages/tourze/doctrine-sensitive-tag-bundle)[ RSS](/packages/tourze-doctrine-sensitive-tag-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (25)Versions (6)Used By (0)

Doctrine Sensitive Tag Bundle
=============================

[](#doctrine-sensitive-tag-bundle)

[English](README.md) | [中文](README.zh-CN.md)

[![Latest Version](https://camo.githubusercontent.com/45b1aeee69773901af7e372e47018b65fe3d0fec32e7e159c2fca9ed98241a7b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f646f637472696e652d73656e7369746976652d7461672d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/doctrine-sensitive-tag-bundle)[![Total Downloads](https://camo.githubusercontent.com/ea678797ece2f499e65d96844ac0802eaf6e2dc97d81830e65dfa5ba5a1721ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f75727a652f646f637472696e652d73656e7369746976652d7461672d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/doctrine-sensitive-tag-bundle)[![PHP Version](https://camo.githubusercontent.com/c79c2b311b0c1b04957bc8921e832b32984672a25e7ceccc993f295a56de0edf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f646f637472696e652d73656e7369746976652d7461672d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/doctrine-sensitive-tag-bundle)[![License](https://camo.githubusercontent.com/b55d39c5c296f0da03884225a2f1601dde83ded362613f1b1babd30cee20daf3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746f75727a652f646f637472696e652d73656e7369746976652d7461672d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/doctrine-sensitive-tag-bundle)[![Build Status](https://camo.githubusercontent.com/0346e18af1343d739d0405776c07b83798d5bb0200e3efcfdf657e5e662f6403/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746f75727a652f7068702d6d6f6e6f7265706f2f63692e796d6c3f7374796c653d666c61742d737175617265)](https://github.com/tourze/php-monorepo/actions)

A Symfony bundle to mark and track sensitive data in Doctrine entities, providing automatic logging of access operations for sensitive data.

Features
--------

[](#features)

- Mark sensitive data through the `SensitiveTagAwareInterface` interface
- Automatically log access, creation, update, and deletion operations on sensitive data
- Provides entities and event subscribers for recording sensitive data access logs
- Supports data classification according to network security standards
- Seamless integration with Doctrine ORM and Symfony framework

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Symfony 7.3 or higher
- Doctrine ORM 3.0 or higher
- Doctrine Bundle 2.13 or higher

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

[](#installation)

```
composer require tourze/doctrine-sensitive-tag-bundle
```

Usage
-----

[](#usage)

1. Implement the `SensitiveTagAwareInterface`:

```
use Tourze\DoctrineSensitiveTagBundle\Model\SensitiveTagAwareInterface;

class User implements SensitiveTagAwareInterface
{
    // ...

    public function isResourceSensitive(): bool
    {
        // Determine if this entity contains sensitive data
        return true;
    }
}
```

2. The bundle will automatically record operations on sensitive entities in the `TouchLog` table.

Advanced Usage
--------------

[](#advanced-usage)

### Custom Touch Log Configuration

[](#custom-touch-log-configuration)

You can customize the touch logging behavior by implementing custom event listeners or extending the default `SensitiveEntityListener`.

### Data Classification Levels

[](#data-classification-levels)

According to "Network Security Standard Practice Guide - Network Data Classification Guidelines", data is classified into four levels:

- Level 1: Public data
- Level 2: Internal data, may cause minor harm to rights and interests
- Level 3: Confidential data, may cause general harm to rights and interests
- Level 4: Highly confidential data, may cause serious harm to rights and interests

Sensitive personal information should be at least Level 4, general personal information at least Level 2.

Running Tests
-------------

[](#running-tests)

Execute the following command to run unit tests:

```
./vendor/bin/phpunit packages/doctrine-sensitive-tag-bundle/tests
```

Contributing
------------

[](#contributing)

Contributions are welcome! Please follow these steps:

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run tests to ensure everything works
5. Submit a pull request

Please ensure your code follows the project's coding standards and includes appropriate tests.

License
-------

[](#license)

This bundle is released under the MIT License. See the [LICENSE](LICENSE) file for more information.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance65

Regular maintenance activity

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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 ~56 days

Total

5

Last Release

234d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13899502?v=4)[tourze](/maintainers/tourze)[@tourze](https://github.com/tourze)

---

Top Contributors

[![tourze](https://avatars.githubusercontent.com/u/13899502?v=4)](https://github.com/tourze "tourze (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tourze-doctrine-sensitive-tag-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/tourze-doctrine-sensitive-tag-bundle/health.svg)](https://phpackages.com/packages/tourze-doctrine-sensitive-tag-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M507](/packages/pimcore-pimcore)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)

PHPackages © 2026

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