studio201/doctrine-encrypt-bundle
A Symfony bundle that adds transparent field-level encryption to Doctrine entities, letting you mark sensitive properties for automatic encrypt/decrypt on persist and hydrate with configurable ciphers and key management.
Type + event subscriber is small (a few hundred LOC). The real decision is whether to own that code or adopt a maintained cryptographic stack (libsodium/paragonie/halite, a cloud KMS SDK, envelope encryption).Adopt-consider criteria:
Look elsewhere when:
laravel-doctrine/orm plus a maintained encryption layer, or an Eloquent-native alternative, instead.For executives: This is a small, MIT-licensed helper that encrypts individual database columns in Symfony/Doctrine applications. It can close a compliance checkbox quickly, but the project has no visible community, no dependents, and no maintenance signal — so it is not a strategic dependency we should standardize on. Recommendation: use it as a reference implementation or in contained internal contexts only, and budget a short spike to decide between forking it under our ownership or building the equivalent in-house on a managed key service. Licensing (MIT) is not a concern; supply-chain and cryptographic correctness are.
For engineering: Integration cost is genuinely low — a Doctrine type plus an event subscriber, configured per entity. The cost you inherit is ownership. Two viable paths: (1) vendor and fork, ~1 week to audit the cipher/IV/key-derivation path and add tests, then own it; or (2) implement the same behavior in-house against libsodium with keys from our managed KMS, which gives us rotation and auditability the package doesn't offer. Do not add it as an unpinned dependency. Either way, keep key management and rotation out of scope of the library and in our platform layer.
For security and legal: MIT license is permissive and compatible with commercial use. The residual risks are (a) unmaintained cryptography code and (b) unverified claims about the underlying primitives. Both are addressable with a focused review before any production use, and both argue for fork-and-own rather than consume-as-is.
How can I help you explore Laravel packages today?