kyzegs/doctrine-encryption-bundle
A Symfony bundle for Doctrine ORM that adds transparent field-level encryption for sensitive entity data, with configurable encryptors to help protect information at rest while keeping mappings and application code simple.
encrypted_text DBAL type, and blind-index query helpers — the three things teams usually hand-roll badly. Adopting it avoids a bespoke encryption layer and the associated security review burden.doctrine/dbal/ORM bridges, or Symfony services). If we are Eloquent-only, this is a reference implementation at best, not an adoptable dependency.Consider it when:
encrypt()/decrypt() calls scattered through services.Look elsewhere when:
laravel-doctrine/orm caveats, or a vault/KMS envelope-encryption service) will fit better and be easier to support.LIKE on encrypted fields — blind indexes support equality only; that constraint should be surfaced before anyone promises "searchable encryption."For executives: A v2.0.0 release of an encryption library we are evaluating fixed two serious defects — potential data loss and weakened ciphertext integrity — and added a database column type plus a way to look up records by their encrypted values. In plain terms: it now does the two things compliance reviewers ask about (encrypt the field, still find the record) without us building and auditing custom cryptography. The catch is scope and maturity: it fits our Doctrine-based services, not our Eloquent code, and it is maintained by essentially one person, so treating it as a strategic dependency requires a fork-and-own contingency. Recommendation: pilot on one Doctrine-backed service with a sensitive field, not a platform-wide standard.
For engineering: 2.0.0 is a required upgrade for anyone already on 1.x — the integrity fix means existing ciphertext handling had a correctness bug, and the release notes explicitly tell us dry runs now read every value, so migration verification behavior changes. New capability worth designing around: encrypted_text DBAL type (encryption at the type layer, no manual calls) and a blind index query helper (equality search over encrypted columns, with the usual determinism/leakage tradeoffs). Before we commit we need answers on key management and rotation, index key separation from the encryption key, behavior under doctrine/dbal version bumps, and whether the upgrade path is reversible. Assign one owner to read the 1.x→2.0 upgrade doc and produce a migration runbook before we schedule the pilot.
How can I help you explore Laravel packages today?