ywh/doctrine-encryption-bundle
A Symfony bundle that adds transparent field-level encryption to Doctrine entities, encrypting sensitive columns at rest via Doctrine DBAL types and event listeners. Configure keys and ciphers to protect data with minimal changes to existing mappings.
ywh/doctrine-encryption-extension, it frames the decision as “adopt, adapt, or reimplement” rather than a full vendor selection. Given the tiny footprint, an in-house implementation of transparent Doctrine field encryption is a realistic alternative.Consider it when:
ywh/doctrine-encryption-extension and wants the Symfony wiring provided by the bundle.Look elsewhere when:
For executives: This is a small, MIT-licensed helper that enables encryption of individual database fields, giving us a lightweight path to meet “encrypted at rest” commitments for regulated customer data. However, it is a near-abandoned, Symfony2-era package with negligible adoption — we should treat it as a reference design rather than a production dependency. The recommendation is to adopt the pattern, not the package: implement field-level encryption inside our own codebase using a maintained, reviewed approach, so we control the security posture and upgrade path.
For engineering: The bundle is a thin Symfony adapter over ywh/doctrine-encryption-extension. It provides a Doctrine field type for transparent encrypt/decrypt on read/write. There is no meaningful community adoption or maintenance signal, so using it directly introduces supply-chain and long-term-maintenance risk on a security-critical path. Recommended action: fork or reimplement the Doctrine type + subscriber in-house (a few hundred lines), use a vetted crypto primitive (libsodium / OpenSSL AES-GCM), and pair it with a proper KMS for key management. Treat this package as prior art for the approach (custom Doctrine type + event hooks), not as a runtime dependency. If we do consume it, pin the version, vendor the code, and schedule an internal review.
How can I help you explore Laravel packages today?