christian-riesen/password-hash-bundle
password_hash API (with a fallback for older versions), which is now obsolete (PHP 5.x is EOL since 2018). Modern Symfony (4+) uses Symfony’s built-in password hashing (Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface), which is more flexible and secure.security.encoder.passwordhash), which may not align with modern Symfony’s multi-encoder strategy (e.g., bcrypt, argon2). This could complicate future upgrades.ircmaxell/password_compat, which is unnecessary in modern PHP (7.0+ has native password_hash).password_hash without a cost parameter (default is 10, which is weak by today’s standards).symfony/security-password-hasher (built-in, supports Argon2).Illuminate\Hashing\BcryptHasher or paragonie/sodium (for Argon2).Illuminate\Contracts\Hashing\Hasher interface.password_hash() vs. bcrypt()).password_hash() but still lacks modern features.| Scenario | Approach | Risks |
|---|---|---|
| Symfony2 → Symfony3+ | Replace with symfony/security-password-hasher |
High (bundle is obsolete) |
| Symfony2 → Laravel | Rewrite as custom Laravel hasher | Medium (requires refactoring) |
| Legacy PHP 5.x | Use as-is (short-term) | Critical (security & maintenance risk) |
| Modern PHP 7.4+ | Abandon this bundle—use built-in solutions | None |
UserInterface and EncoderInterface.security.yml example is generic, but custom user models may need adjustments.password_hash()—no way to plug in Argon2 or custom algorithms.AppKernel.php and security.yml.symfony/security-password-hasher) in the next major release.password_compat is unmaintained (last update: 2015).password_hash() is CPU-bound (bcrypt by design), but no tuning options (e.g., cost factor).| Risk | Impact | Mitigation |
|---|---|---|
| PHP Upgrade | Bundle breaks on PHP 7+ | Isolate in a legacy environment |
| Security Vulnerability | No patches for password_compat |
Migrate to paragonie/sodium |
| Symfony Upgrade | Incompatible with Symfony 3+ | Replace before upgrading |
| Password Cracking | Weak bcrypt defaults (cost=10) | Force higher cost via custom encoder |
| Legacy Hash Collisions | No fallback for old formats | Document supported hash types |
Final Recommendation:
Avoid this package unless absolutely necessary for a Symfony2/PHP 5.x project. For all other cases, use modern alternatives (symfony/security-password-hasher for Symfony, Illuminate\Hashing\BcryptHasher for Laravel, or paragonie/sodium for Argon2). If this bundle is used, plan a migration away within 12-18 months.
How can I help you explore Laravel packages today?