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(6mo ago)014MITPHP

Since Sep 18Pushed 6mo 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 2w 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

31

—

LowBetter than 65% of packages

Maintenance68

Regular maintenance activity

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

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

186d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2088750?v=4)[OSW3](/maintainers/osw3)[@OSW3](https://github.com/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

[phpids/phpids

PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web application

791150.0k2](/packages/phpids-phpids)[paragonie/ecc

PHP Elliptic Curve Cryptography library

25866.3k44](/packages/paragonie-ecc)[sansec/magento2-module-shield

15218.6k](/packages/sansec-magento2-module-shield)[nicobleiler/php-passphrase

Passphrase generator with Laravel integration, inspired by Bitwarden. Uses the EFF long word list by default with support for custom wordlists.

4912.6k](/packages/nicobleiler-php-passphrase)[dwgebler/encryption

Encryption wrapper for PHP using libsodium — simple API for symmetric and asymmetric encryption, password hashing, digital signing, and message authentication.

317.5k](/packages/dwgebler-encryption)

PHPackages © 2026

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