illuminate/hashing
Laravel’s hashing component for securely storing and verifying passwords. Provides simple APIs and drivers for bcrypt and Argon2 (including Argon2id), automatic rehashing when options change, and configurable settings for cost and memory/time limits.
Architecture fit: The package is designed as a standalone component of Laravel's ecosystem, making it highly compatible with Laravel-based applications. However, when used outside Laravel, it requires additional dependencies (e.g., illuminate/contracts, illuminate/support), which may introduce complexity. The subtree split approach ensures alignment with Laravel's core architecture but ties its evolution to Laravel's release cycle.
Integration feasibility: High due to Composer-based installation. The package is well-documented within Laravel's ecosystem, but standalone usage requires manual dependency management. The API consistency with Laravel's Hash facade simplifies integration for existing Laravel projects.
Technical risk: Dependency management is a key risk; improper handling could lead to version conflicts. Maintenance is tightly coupled to Laravel's updates, potentially introducing breaking changes if not tracked closely. As a subtree split, standalone testing coverage may be limited compared to the full framework.
Key questions: What are the exact Composer dependencies for standalone usage? How frequently does the package receive updates outside Laravel releases? Are there known issues with non-Laravel environments? What PHP versions are supported, and how does it handle deprecated PHP features?
Stack fit: Ideal for Laravel projects where it integrates natively with the framework's service container and configuration. For non-Laravel stacks (e.g., Slim, Symfony), integration is possible but requires additional setup for dependency injection and configuration.
Migration path: For projects using other hashing libraries (e.g., password_hash), migration involves replacing direct calls with the Hash facade. Laravel's documentation provides clear guidance, but custom implementations may require adapter layers for compatibility.
Compatibility: Supports PHP 7.3+ and aligns with Laravel's version requirements. Older PHP versions (e.g., 7.2 or below) are incompatible, which could block adoption in legacy environments.
Sequencing: Install via Composer, configure the hashing driver in environment variables or config files, then replace existing hashing logic with Illuminate\Hashing\HashManager or the Hash facade. Prioritize testing edge cases (e.g., password resets, authentication flows) during rollout.
Maintenance: Handled by Laravel's core team, ensuring regular security patches and updates
How can I help you explore Laravel packages today?