-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.6] rename bcrypt to hasher and allow null value #21502
Conversation
Can we keep the previous bcrypt helper method and mark it as deprecated in the spirit of laravel/ideas#383 ? |
It doesn't make sense to pass a string to a function named |
And that brings us again to the name problem... |
definitely open to other names. I just don't think bcrypt is appropriate. |
Yeah i would prefer if |
even though I'm targeting Master? BTW, I'll fix the tests if and when we get this discussion sorted out. |
To me there is no need to replace it with anything as we have Hash::make. If we were going to add any other I would think it would be something like Str::hash? |
I mean, if we just want to go with the Facade, and drop the helper completely, I'm okay with that. Personally I use the helpers over the Facades, but that's me. I don't think adding As long as we get rid of (or deprecate) the |
Alternate names:
In the near future we would probably have a new Argon2 password hasher. I think that the Having more than one password hasher implementation I think that we could use some config to instrument the password hashing algorithm being used by both the |
@paulofreitas If you name the helper like that, you're implying it'll be used to hash a password, which could not be the case... Same with |
@m1guelpf PHP itself use the |
I don't think we really need a Str::hash and we'll evaluate removing or deprecating this when we actually do have an alternative hasher out of the box. |
the helper, like the Facade, should be implementation agnostic. while we currently do use Bcrypt as our hashing algorithm, it is possibly it will switch to a more updated algo in the future.
also allow passing a
null
value to get the Hasher instance back. this pattern is used in many of the other helpers. this was originally sent as a separate PR to 5.5, but after a discussion with @Dylan-DPC it was determined this was a BC break.