aeliot/doctrine-encrypted-field
Laravel/Doctrine extension that transparently encrypts and decrypts entity fields. Adds an encrypted field type you can map in your entities so sensitive values are stored encrypted in the database and handled normally in your code.
Filter or custom DQL. Requires upfront design for query patterns.doctrine/dbal for DBAL, but not full ORM).defuse/php-encryption (symmetric) or paragonie/halite (asymmetric). Compatibility with Laravel’s existing encryption (e.g., config/app.php key) must be validated.WHERE, JOIN, or ORDER BY without application-layer filtering. May force denormalization or client-side filtering.doctrine/dbal for encrypted fields only (limited to raw SQL queries).encrypt()) or packages like spatie/laravel-encryption.Filter for conditional encryption (e.g., only encrypt in production).defuse/php-encryption, and paragonie/halite.TEXT/BLOB; existing migrations must be updated.doctrine/orm and dependencies.@EncryptedField.doctrine/orm, defuse/php-encryption, and Laravel version compatibility.QueryLogger).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Encryption key loss | Permanent data loss | Offline key backups, KMS integration |
| Corrupted ciphertext | Silent data corruption | Checksum validation, retry logic |
| Decryption failures | Application crashes | Graceful fallbacks, circuit breakers |
| Query timeouts on encrypted fields | Slow responses | Optimize encryption backend, denormalize |
| Key rotation misconfiguration | Data unreadable across deployments | Automated key versioning, rollback plan |
| Doctrine ORM misconfiguration | Model hydration failures | Comprehensive integration tests |
How can I help you explore Laravel packages today?