PHPackages                             joshpme/doctrine-encrypt-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. joshpme/doctrine-encrypt-bundle

Abandoned → [michaeldegroot/doctrine-encrypt-bundle](/?search=michaeldegroot%2Fdoctrine-encrypt-bundle)Library[Database &amp; ORM](/categories/database)

joshpme/doctrine-encrypt-bundle
===============================

Encrypted symfony entity's by verified and standardized libraries

4.0.5(7y ago)05.2kMITPHPPHP &gt;=7.2

Since Nov 14Pushed 7y agoCompare

[ Source](https://github.com/joshpme/DoctrineEncryptBundle)[ Packagist](https://packagist.org/packages/joshpme/doctrine-encrypt-bundle)[ RSS](/packages/joshpme-doctrine-encrypt-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (9)Versions (28)Used By (0)

### Introduction

[](#introduction)

This is a fork from the original bundle created by ambta which can be found here: [ambta/DoctrineEncryptBundle](https://github.com/ambta/DoctrineEncryptBundle)

This bundle has updated security by not rolling it's own encryption and using verified standardized library's from the field.

### Using [Halite](https://github.com/paragonie/halite)

[](#using-halite)

To use Halite (much faster, but uses php-extension sodium, and libsodium)

`composer require "ext-sodium >=7.2" "paragonie/halite >=4.3" "paragonie/sodium_compat >=1.5"`

```
// Config.yml
doctrine_encrypt:
    encryptor_class: Halite
```

### Using [Defuse](https://github.com/defuse/php-encryption)

[](#using-defuse)

To use Defuse, you will only need the package.

`composer require "defuse/php-encryption ^2.0"`

```
// Config.yml
doctrine_encrypt:
    encryptor_class: Defuse
```

### Annotation

[](#annotation)

Add the `@Encrypted` annotation on entities you wish to encrypt.

Currently this package only supports strings and blobs. Encrypted strings will take more space than their un-encrypted counterparts, so if you limit their length, you may want to consider increasing the length by around 4x (with a minimum of around 250 characters for even very short strings).

***For example***

```
/**
 * @ORM\Column(type="string", length=250)
 */

```

changes to

```
/**
 * @Encrypted
 * @ORM\Column(type="string", length=1000)
 */

```

[See Usage](Resources/doc/usage.md)

### Secret key

[](#secret-key)

Secret key is generated if there is no key found. This is automatically generated and stored in the folder defined in the configuration

```
// Config.yml
doctrine_encrypt:
    secret_directory_path: '%kernel.project_dir%'   # Default value
```

Filename example: `.DefuseEncryptor.key` or `.HaliteEncryptor.key`

If you lose this key, you've lost access to the data. So you may want to back it up securely.

**Do not forget to add these files to your .gitignore file, you do not want this on your repository!**

### Documentation

[](#documentation)

- [Installation](Resources/doc/installation.md)
- [Requirements](Resources/doc/installation.md#requirements)
- [Configuration](Resources/doc/configuration.md)
- [Usage](Resources/doc/usage.md)
- [Console commands](Resources/doc/commands.md)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~113 days

Total

26

Last Release

2587d ago

Major Versions

1.0.0 → 2.0.02012-11-17

2.5.4 → 3.0.12017-05-14

3.0.3 → 4.0.02018-01-18

PHP version history (5 changes)1.0.0PHP &gt;=5.3.2

2.4.1PHP &gt;=5.4

4.0.0PHP &gt;=7.0

4.0.3PHP ^7.2

4.0.5PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17512822?v=4)[Josh P](/maintainers/joshpme)[@joshpme](https://github.com/joshpme)

---

Top Contributors

[![absolute-quantum](https://avatars.githubusercontent.com/u/1427870?v=4)](https://github.com/absolute-quantum "absolute-quantum (54 commits)")[![dev-marcel](https://avatars.githubusercontent.com/u/11071510?v=4)](https://github.com/dev-marcel "dev-marcel (33 commits)")[![vmelnik-ukraine](https://avatars.githubusercontent.com/u/1994051?v=4)](https://github.com/vmelnik-ukraine "vmelnik-ukraine (23 commits)")[![joshpme](https://avatars.githubusercontent.com/u/17512822?v=4)](https://github.com/joshpme "joshpme (18 commits)")[![andheiberg](https://avatars.githubusercontent.com/u/820962?v=4)](https://github.com/andheiberg "andheiberg (8 commits)")[![michaelfeinbier](https://avatars.githubusercontent.com/u/503543?v=4)](https://github.com/michaelfeinbier "michaelfeinbier (6 commits)")[![Zombaya](https://avatars.githubusercontent.com/u/13340313?v=4)](https://github.com/Zombaya "Zombaya (5 commits)")[![encreinformatique](https://avatars.githubusercontent.com/u/22235605?v=4)](https://github.com/encreinformatique "encreinformatique (4 commits)")[![ambta](https://avatars.githubusercontent.com/u/10357868?v=4)](https://github.com/ambta "ambta (4 commits)")[![benr77](https://avatars.githubusercontent.com/u/2156742?v=4)](https://github.com/benr77 "benr77 (3 commits)")[![mkraemer](https://avatars.githubusercontent.com/u/1070200?v=4)](https://github.com/mkraemer "mkraemer (2 commits)")[![maks-rafalko](https://avatars.githubusercontent.com/u/3725595?v=4)](https://github.com/maks-rafalko "maks-rafalko (2 commits)")[![paragonie-scott](https://avatars.githubusercontent.com/u/11591518?v=4)](https://github.com/paragonie-scott "paragonie-scott (1 commits)")[![PH-Lars](https://avatars.githubusercontent.com/u/10357876?v=4)](https://github.com/PH-Lars "PH-Lars (1 commits)")[![Valegar](https://avatars.githubusercontent.com/u/658117?v=4)](https://github.com/Valegar "Valegar (1 commits)")[![BboyKeen](https://avatars.githubusercontent.com/u/1192309?v=4)](https://github.com/BboyKeen "BboyKeen (1 commits)")[![wassafr](https://avatars.githubusercontent.com/u/10235180?v=4)](https://github.com/wassafr "wassafr (1 commits)")[![wcoppens](https://avatars.githubusercontent.com/u/181460?v=4)](https://github.com/wcoppens "wcoppens (1 commits)")[![westinpigott](https://avatars.githubusercontent.com/u/1909859?v=4)](https://github.com/westinpigott "westinpigott (1 commits)")[![dbu](https://avatars.githubusercontent.com/u/76576?v=4)](https://github.com/dbu "dbu (1 commits)")

---

Tags

symfonydoctrineencryptdecryptDefusehalite

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/joshpme-doctrine-encrypt-bundle/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

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

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)[doctrineencryptbundle/doctrine-encrypt-bundle

Encrypted symfony entity's by verified and standardized libraries

32477.7k](/packages/doctrineencryptbundle-doctrine-encrypt-bundle)

PHPackages © 2026

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