- Can I use pierrre/encrypter-bundle in a Laravel application?
- No. pierrre/encrypter-bundle is a Symfony2 bundle, and Laravel has no AppKernel, bundle registration, or Bundle class resolution. Laravel's service-provider model is not binary or API compatible with Symfony's DI container extension format. Composer resolution will also fail against any modern Laravel release.
- Is pierrre/encrypter-bundle still maintained?
- It is not maintained. The repository is archived, has zero dependents, and only about 20 stars, so there are no upstream fixes, no security disclosure channel, and no compatibility work. Symfony 2.8 reached end of life in November 2018, and the package targets PHP 5.x. Treat it as a legacy artifact, not a dependency to adopt.
- How do I install pierrre/encrypter-bundle with Composer?
- Do not install it for a Laravel or modern Symfony application. A composer require will almost certainly fail dependency resolution, and forcing it with --ignore-platform-reqs trades a clean install failure for runtime fatal errors. For legacy extraction work, pin the existing lockfile and plan removal rather than adding it to new projects.
- What Laravel or Symfony versions does pierrre/encrypter-bundle support?
- It targets Symfony 2.x on PHP 5.x. It does not support Laravel at all and has no path into Symfony 4, 6, or 7 applications. Symfony 2.8 is end of life, and PHP 5.x plus 7.0/7.1 are outside security support.
- Is pierrre/encrypter-bundle safe for encrypting production secrets?
- The technical evaluation says do not adopt it as a security control. Packages of this vintage typically wrap mcrypt_*, which was removed in PHP 7.2, and commonly use CBC or ECB with a static or key-derived IV, padding without a MAC, and no AEAD. There is no security policy or disclosure channel, so your team would own any CVE. Use a vetted library or the framework's native encrypter instead.
- What should I use instead of pierrre/encrypter-bundle in Laravel?
- Use Laravel's built-in Crypt facade backed by Illuminate\Encryption\Encrypter with AES-256-GCM or AES-256-CBC. For standalone PHP, defuse/php-encryption, paragonie/halite, or libsodium secretbox are vetted options. Put encryption behind an interface you control so the implementation stays swappable. Do not shim a Symfony2 bundle into Laravel's container.
- Does pierrre/encrypter-bundle support key rotation or key versioning?
- No. The bundle-era design exposes a single symmetric key from configuration with no key rotation, no key versioning on the ciphertext envelope, and no KMS, HSM, or vault integration. Rotation without versioning turns into a re-encryption project later. Modern designs should use envelope encryption with versioned keys and a managed key custody story.
- How do I migrate an existing app away from pierrre/encrypter-bundle?
- Treat it as an extraction project, not an adoption. Identify every production use, read the cipher source line by line to determine mode, IV strategy, and authentication, then re-encrypt values with a vetted library or Laravel's Crypt facade under a controlled interface. Plan for key custody and rotation before you migrate data. If it already runs in production, you have a migration deadline, not an evaluation.
- Can I test pierrre/encrypter-bundle in a modern PHP CI pipeline?
- No. Composer dependency resolution will fail against modern PHP and framework versions, and --ignore-platform-reqs only moves the failure to runtime. CI should treat installation failure as the correct signal, not something to bypass. For legacy code, test extraction and re-encryption paths in isolation rather than trying to boot the bundle.
- How is pierrre/encrypter-bundle configured?
- It is configured through Symfony2 bundle conventions such as YAML or XML service definitions and a secret key in bundle configuration. Laravel has no equivalent bundle config, and those definitions do not map to Laravel's config files or service container. If you need configurable encryption in Laravel, use the Crypt facade with an APP_KEY and keep key management outside application code.