PHPackages                             osw3/symfony-entity-encrypt - 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. osw3/symfony-entity-encrypt

ActiveSymfony-bundle[Security](/categories/security)

osw3/symfony-entity-encrypt
===========================

Encrypt &amp; Decrypt entity data in database.

0.0.10(2mo ago)014MITPHP

Since Sep 18Pushed 2mo agoCompare

[ Source](https://github.com/OSW3/symfony-entity-encrypt)[ Packagist](https://packagist.org/packages/osw3/symfony-entity-encrypt)[ Docs](https://osw3.net)[ RSS](/packages/osw3-symfony-entity-encrypt/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (11)Used By (0)

Symfony EntityEncrypt
=====================

[](#symfony-entityencrypt)

Encrypt &amp; Decrypt entity data in database

How to install
--------------

[](#how-to-install)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
composer require osw3/symfony-entity-encrypt
```

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    OSW3\EntityEncrypt\EntityEncryptBundle::class => ['all' => true],
];
```

How to use
----------

[](#how-to-use)

### Step 1: Edit the configuration

[](#step-1-edit-the-configuration)

Edit the configuration file `config/packages/entity_encrypt.yaml`

```
entity_encrypt:
    algo: aes256
```

### Step 2: Add `Encrypted` attribute to your entities

[](#step-2-add-encrypted-attribute-to-your-entities)

```
use OSW3\EntityEncrypt\Attribute\Encrypted;

class Message
{
    // ...

    #[ORM\Column(type: Types::TEXT)]
    #[Encrypted] // Just add this Attribute
    #[Encrypted(salt: 'my-salt')] // or add this Attribute with salt
    private ?string $secret = null;

    // ...
}
```

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance89

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

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

Recently: every ~0 days

Total

10

Last Release

85d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3fb494ca5da6d3783e7ccfa656354d43d111a024b573051f5ca8f922b0d386ca?d=identicon)[osw3](/maintainers/osw3)

---

Top Contributors

[![ArnaudBDL](https://avatars.githubusercontent.com/u/53226044?v=4)](https://github.com/ArnaudBDL "ArnaudBDL (11 commits)")

### Embed Badge

![Health badge](/badges/osw3-symfony-entity-encrypt/health.svg)

```
[![Health](https://phpackages.com/badges/osw3-symfony-entity-encrypt/health.svg)](https://phpackages.com/packages/osw3-symfony-entity-encrypt)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M212](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M112](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

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