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

ActiveLibrary[Database &amp; ORM](/categories/database)

doctrineencryptbundle/doctrine-encrypt-bundle
=============================================

Encrypted symfony entity's by verified and standardized libraries

7.0.2(3mo ago)29415.1k—7.9%7[4 issues](https://github.com/DoctrineEncryptBundle/DoctrineEncryptBundle/issues)[1 PRs](https://github.com/DoctrineEncryptBundle/DoctrineEncryptBundle/pulls)MITPHPPHP &gt;=8.2CI passing

Since Jul 17Pushed 3mo ago5 watchersCompare

[ Source](https://github.com/DoctrineEncryptBundle/DoctrineEncryptBundle)[ Packagist](https://packagist.org/packages/doctrineencryptbundle/doctrine-encrypt-bundle)[ RSS](/packages/doctrineencryptbundle-doctrine-encrypt-bundle/feed)WikiDiscussions 7.0 Synced 1mo ago

READMEChangelog (10)Dependencies (27)Versions (15)Used By (0)

[![Logo](https://camo.githubusercontent.com/4a1e91cf1cded782059fd9c2d47889eae038994f49e2144fe03a10d23d24af5b/68747470733a2f2f692e696d6775722e636f6d2f73666d553677742e706e67)](https://github.com/DoctrineEncryptBundle/DoctrineEncryptBundle)

[![Build status](https://camo.githubusercontent.com/1386f7dc0a71425270a10e9e8712ad959582e0907b4d97a490b27f40426af193/68747470733a2f2f7472617669732d63692e6f72672f446f637472696e65456e637279707442756e646c652f446f637472696e65456e637279707442756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/DoctrineEncryptBundle/DoctrineEncryptBundle)[![License](https://camo.githubusercontent.com/69271fc904683bf306a91c63d7b4c228f5e114738449df41c3ab2a5842e4b9ad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f446f637472696e65456e637279707442756e646c652f446f637472696e65456e637279707442756e646c652e737667)](https://raw.githubusercontent.com/DoctrineEncryptBundle/DoctrineEncryptBundle/master/LICENSE)[![Latest version](https://camo.githubusercontent.com/deae33da347a15a91b4524c51978c7af26ff16c47e3a517dcf6231fff39292e4/68747470733a2f2f706f7365722e707567782e6f72672f446f637472696e65456e637279707442756e646c652f646f637472696e652d656e63727970742d62756e646c652f76657273696f6e)](https://packagist.org/packages/DoctrineEncryptBundle/doctrine-encrypt-bundle)[![Latest Unstable Version](https://camo.githubusercontent.com/15c13913acc89887aae24bbde48f50c31c1145eb6d094e0bf43bbaae55bbb278/68747470733a2f2f706f7365722e707567782e6f72672f446f637472696e65456e637279707442756e646c652f646f637472696e652d656e63727970742d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/DoctrineEncryptBundle/doctrine-encrypt-bundle)[![Total downloads](https://camo.githubusercontent.com/c59a4c7453a3ff2fd5f8344846c5e3199287d373a27eb04b5ddfbcbdef297986/68747470733a2f2f706f7365722e707567782e6f72672f446f637472696e65456e637279707442756e646c652f646f637472696e652d656e63727970742d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/DoctrineEncryptBundle/doctrine-encrypt-bundle)[![Downloads this month](https://camo.githubusercontent.com/02504986b0499cd876a69c71d2acdb79c58858c5a6be3d30e68a9385e88cd38c/68747470733a2f2f706f7365722e707567782e6f72672f446f637472696e65456e637279707442756e646c652f646f637472696e652d656e63727970742d62756e646c652f642f6d6f6e74686c79)](https://packagist.org/packages/DoctrineEncryptBundle/doctrine-encrypt-bundle)

### Introduction

[](#introduction)

This version of the DoctrineEncryptBundle was initially forked from: [integr8rs/DoctrineEncryptBundle](https://github.com/integr8rs/DoctrineEncryptBundle)

This version was created due to be maintained and managed by a GitHub organization (DoctrineEncryptBundle) due to all previous versions that were installable not being actively maintained any longer. This includes the most popular on as well: [michaeldegroot/doctrine-encrypt-bundle](https://github.com/absolute-quantum/DoctrineEncryptBundle)

The original bundle created by ambta can be found here: -[ambta/DoctrineEncryptBundle](https://github.com/ambta/DoctrineEncryptBundle)

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

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

[](#using-halite)

*All deps are already installed with this package*

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

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

[](#using-defuse)

*You will need to require Defuse yourself*

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

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

### Secret key

[](#secret-key)

The secret key should be a max 32 byte hexadecimal string (`[0-9a-fA-F]`).

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
ambta_doctrine_encrypt:
    secret_directory_path: '%kernel.project_dir%'   # Default value
```

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

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

### Documentation

[](#documentation)

- [Installation](src/Resources/doc/installation.md)
- [Requirements](src/Resources/doc/installation.md#requirements)
- [Configuration](src/Resources/doc/configuration.md)
- [Usage](src/Resources/doc/usage.md)
- [Console commands](src/Resources/doc/commands.md)
- [Upgrading](src/Resources/doc/upgrading.md)
- [Custom encryption class](src/Resources/doc/custom_encryptor.md)

### Demo

[](#demo)

Demo-installations can be found in this repository within the [`demo`](demo) directory. These demonstrates how to use the various supported encryption and decryption implementations.

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance80

Actively maintained with recent releases

Popularity48

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor4

4 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 ~72 days

Recently: every ~1 days

Total

14

Last Release

92d ago

Major Versions

5.4.x-dev → 6.0.02025-10-26

6.0.0 → 7.0.02026-02-01

6.0.x-dev → 7.0.12026-02-11

PHP version history (4 changes)5.3.0PHP ^7.2|^8.0

5.4.x-devPHP ^7.2 || ^8.0

6.0.0PHP &gt;=8.1

7.0.0PHP &gt;=8.2

### Community

Maintainers

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

---

Top Contributors

[![absolute-quantum](https://avatars.githubusercontent.com/u/1427870?v=4)](https://github.com/absolute-quantum "absolute-quantum (67 commits)")[![r3hp1c](https://avatars.githubusercontent.com/u/22657235?v=4)](https://github.com/r3hp1c "r3hp1c (41 commits)")[![dev-marcel](https://avatars.githubusercontent.com/u/11071510?v=4)](https://github.com/dev-marcel "dev-marcel (33 commits)")[![Zombaya](https://avatars.githubusercontent.com/u/13340313?v=4)](https://github.com/Zombaya "Zombaya (32 commits)")[![sh41](https://avatars.githubusercontent.com/u/6237786?v=4)](https://github.com/sh41 "sh41 (25 commits)")[![vmelnik-ukraine](https://avatars.githubusercontent.com/u/1994051?v=4)](https://github.com/vmelnik-ukraine "vmelnik-ukraine (23 commits)")[![flavou45](https://avatars.githubusercontent.com/u/46626945?v=4)](https://github.com/flavou45 "flavou45 (18 commits)")[![andheiberg](https://avatars.githubusercontent.com/u/820962?v=4)](https://github.com/andheiberg "andheiberg (8 commits)")[![phansys](https://avatars.githubusercontent.com/u/1231441?v=4)](https://github.com/phansys "phansys (8 commits)")[![michaelfeinbier](https://avatars.githubusercontent.com/u/503543?v=4)](https://github.com/michaelfeinbier "michaelfeinbier (6 commits)")[![ambta](https://avatars.githubusercontent.com/u/10357868?v=4)](https://github.com/ambta "ambta (4 commits)")[![encreinformatique](https://avatars.githubusercontent.com/u/22235605?v=4)](https://github.com/encreinformatique "encreinformatique (4 commits)")[![benr77](https://avatars.githubusercontent.com/u/2156742?v=4)](https://github.com/benr77 "benr77 (3 commits)")[![metadan](https://avatars.githubusercontent.com/u/301940?v=4)](https://github.com/metadan "metadan (3 commits)")[![mkraemer](https://avatars.githubusercontent.com/u/1070200?v=4)](https://github.com/mkraemer "mkraemer (2 commits)")[![andreybolonin](https://avatars.githubusercontent.com/u/2576509?v=4)](https://github.com/andreybolonin "andreybolonin (2 commits)")[![maks-rafalko](https://avatars.githubusercontent.com/u/3725595?v=4)](https://github.com/maks-rafalko "maks-rafalko (2 commits)")[![Fichtme](https://avatars.githubusercontent.com/u/2284107?v=4)](https://github.com/Fichtme "Fichtme (1 commits)")[![PH-Lars](https://avatars.githubusercontent.com/u/10357876?v=4)](https://github.com/PH-Lars "PH-Lars (1 commits)")[![dbu](https://avatars.githubusercontent.com/u/76576?v=4)](https://github.com/dbu "dbu (1 commits)")

---

Tags

symfonydoctrineencryptdecryptDefusehalite

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[michaeldegroot/doctrine-encrypt-bundle

Encrypted symfony entity's by verified and standardized libraries

1521.0M1](/packages/michaeldegroot-doctrine-encrypt-bundle)

PHPackages © 2026

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