Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Doctrine Encrypt Laravel Package

51systems/doctrine-encrypt

Transparent field-level encryption for Doctrine entities in Laravel. Custom DBAL types and event subscribers encrypt sensitive columns at rest, keeping normal ORM reads and writes seamless while protecting stored data.

Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: Poor for a typical Laravel application. This is a Doctrine ORM/DBAL encryption package, not an Eloquent-native Laravel package. It only fits if the application already uses Doctrine for persistence via a Laravel-Doctrine bridge. Most Laravel codebases are Eloquent-first, so the package would add architectural mismatch rather than leverage.
  • Integration feasibility: Technically possible in a Doctrine-based Laravel app, but the package is archived, last released in 2017, and has a very low health signal. Feasibility depends on whether current PHP, Doctrine ORM, and Doctrine DBAL versions remain compatible. Expect Composer constraint conflicts and abandoned transitive dependencies.
  • Technical risk: High. Key risks include outdated cryptography defaults, unclear key-management model, no upstream security patching, limited community scrutiny, and potential incompatibility with modern PHP/Doctrine versions. Encrypted fields also constrain querying, sorting, indexing, and reporting unless the package supports deterministic encryption with explicit leakage trade-offs.
  • TPM leverage: The TPM should treat this as a legacy or reference implementation, not a strategic dependency. Leverage is limited to evaluating the Doctrine type/field-encryption pattern or supporting an existing Doctrine-based system that already depends on it.
  • Key questions:
    • Does the application use Doctrine ORM/DBAL, or is it Eloquent-based?
    • Which PHP and Doctrine versions are supported, and do they match the target stack?
    • Which cipher, mode, key derivation, and IV/nonce handling are used?
    • Where are keys stored, and is rotation supported without full decrypt/re-encrypt downtime?
    • Are encrypted fields ever queried, indexed, sorted, or joined?
    • What is the data classification and regulatory requirement driving encryption?
    • Is there an internal owner willing to fork, patch, and security-review the package?
    • What is the exit plan if the package cannot be upgraded?

Integration Approach

  • Stack fit: Only pursue if the Laravel application already uses Doctrine persistence. For Eloquent applications, do not force this package in; use Laravel’s encryption facilities, a maintained attribute-casting approach, or database/KMS envelope encryption instead.
  • Migration path: Avoid greenfield adoption. For legacy use, isolate the package behind an application-owned encryption service or repository boundary so the implementation can be replaced. Plan a dual-read/dual-write or decrypt-and-re-encrypt migration to a maintained solution.
  • Compatibility: Run a dependency compatibility spike before commitment: PHP version, Doctrine ORM/DBAL version, Composer resolution, static analysis, and test coverage for encrypt/decrypt round trips. Verify behavior on schema tooling, migrations, fixtures, and serialization.
  • Sequencing:
    1. Confirm data classification and regulatory need.
    2. Confirm ORM choice: Doctrine vs Eloquent.
    3. Perform security review of cipher, key handling, and data format.
    4. Build a non-production proof of concept on one low-risk field.
    5. Define key management and rotation before production data exists.
    6. Wrap the dependency in an internal abstraction.
    7. Migrate or exit to a maintained encryption approach.
  • TPM decision: Default recommendation is “do not adopt for new work.” If already present, contain it, document ownership, and fund an exit plan. Only retain it where the cost of migration exceeds the risk and the data set is low-sensitivity.

Operational Impact

  • Maintenance: No upstream maintenance. Any bug, security issue, or compatibility break becomes an internal fork obligation. This is a material hidden cost and should be budgeted explicitly.
  • Support: Minimal community support, no vendor, and low adoption. The TPM should assume internal ownership for documentation, incident response, and security patching.
  • Scaling: Encryption adds CPU and storage overhead per encrypted field. Encrypted columns generally cannot be searched, sorted, or indexed normally; deterministic encryption may enable equality lookup but leaks patterns. Reporting and analytics may require decrypting outside the primary database path.
  • Failure modes: Lost or mismanaged keys can cause permanent data loss. Rotation can break reads if old and new key versions are not handled. Decrypt failures can break entity hydration and application requests. Backup/restore without keys is insufficient. Algorithm deprecation and Composer conflicts can block upgrades.
  • Ramp-up: Requires Doctrine metadata/type knowledge plus key-management and incident-response literacy. Teams without Doctrine experience will face a steep learning curve for limited strategic benefit.
  • Operational recommendation: Treat this package as high-risk legacy code. If encryption is required, select a maintained Laravel-native or KMS-backed envelope-encryption approach with documented rotation, backup, and recovery procedures.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource