manojx/encrypter-bundle
manojx/encrypter-bundle is a lightweight encryption wrapper for Laravel and PHP applications, bundling encrypt/decrypt helpers and a simple service for protecting sensitive strings consistently across projects.
Architecture fit — Poor, and the mismatch is the headline finding. Despite being routed as a Laravel/PHP package, the description explicitly targets Symfony ("simplifies adding encryption features to your Symfony applications," "Encrypter Bundle"). A Symfony bundle is a Symfony\Component\HttpKernel\Bundle\Bundle subclass plus a DI Extension and services.yaml wiring. Laravel does not load bundles; it uses service providers over its own container. There is no drop-in path — adoption means either porting the bundle or running it alongside a Symfony kernel we don't have. Worse, on the Laravel side the capability is already native: Illuminate\Encryption\Encrypter and the Crypt facade provide AES-256-CBC with encrypt-then-MAC and key rotation via previous_keys. This package, at best, re-implements a subset of framework core.
Integration feasibility — Low without a fork. The package is a single release (2024-10-05), zero stars, zero dependents, and a NOASSERTION license — meaning we cannot confirm redistribution or derivative-work rights. For a component that sits directly in the confidentiality path, unverifiable licensing is a compliance stop, not a nit. Packagist presence and autoload validity are unconfirmed.
Technical risk — High and concentrated:
Key questions
Bundle class actually exist, or is this a mislabeled plain PHP library? What are the PHP and Symfony version constraints?Stack fit — If our stack is Laravel (the assumed context), fit is effectively zero and the correct answer is Crypt::encryptString() / decryptString() with APP_KEY managed by our secrets store. If any team is genuinely on Symfony, fit improves to moderate but still competes with symfony/security primitives and direct sodium_crypto_secretbox. Either way this package is not the shortest path.
Migration path — There is no migration to perform; there is nothing in production using it. If we were to adopt, the only defensible path is: fork → audit → vendor (Composer VCS/path repo) → wrap behind an internal EncryptionService interface → port the DI wiring to a Laravel service provider or Symfony extension we control. That is a multi-sprint effort to obtain functionality we already have.
Compatibility — Unknown until verified against our PHP version, Laravel/Symfony version, and config:cache. Note the Laravel-specific trap: any third-party key read via env() outside a config/ file silently breaks under php artisan config:cache, and decryption ordering during boot can fail if the key itself is encrypted. These are standard integration hazards for third-party crypto packages.
Sequencing — (1) Confirm the actual requirement: confidentiality at rest? field-level PII encryption? envelope encryption with KMS? (2) Baseline against native Crypt and confirm the gap. (3) If a gap is real, evaluate managed KMS or libsodium before any third-party package. (4) Only then consider this package, forked and audited. Do not run a pilot on this package to "learn" — the learning cost exceeds the build cost.
Maintenance — Assume we own it. One maintainer, one release, no visible cadence or triage. Any CVE or PHP-version break becomes our patch. Budget a permanent fork-maintenance line item if adopted.
Support — No commercial support, no SLA, no community to escalate to. Internal security review and incident response would be entirely on us — for a cryptographic component, that is the wrong trade.
Scaling — Performance is a non-issue: AES-256-CBC is fast and the per-call cost is irrelevant at typical field-encryption volumes. The scaling constraint is key management — how many keys, what rotation window, how re-encryption of existing rows is backfilled, and whether large encrypted columns blow up storage (base64 + IV + MAC overhead ~33%+). Those are unaddressed by the package and are the real design work.
Failure modes — Padding-oracle decryption errors surfaced to users or logs; IV reuse if generation is weak; silent truncation or encoding corruption on binary payloads through JSON/DB layers; total data loss on APP_KEY rotation without multi-key fallback; config:cache and env-order failures at boot. Each of these is a data-availability or confidentiality incident, and none is documented as handled.
Ramp-up — Trivial to use, expensive to trust. The API surface is likely two calls, so engineer ramp-up is hours; the assurance work — audit, license clearance, key-management design, rotation testing — is weeks. The asymmetric cost is the whole argument.
Recommendation — Do not adopt. Score of 0.1 with 0 dependents and an unresolved license is consistent with our read. Close the evaluation and route the underlying requirement to native Crypt plus a KMS-backed key strategy; revisit only if a concrete capability gap survives that comparison.
How can I help you explore Laravel packages today?