Skip to content
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.5] bcrypt changed to Hash::make and renamed to str_hash :D #20152

Closed
wants to merge 5 commits into from
Closed

[5.5] bcrypt changed to Hash::make and renamed to str_hash :D #20152

wants to merge 5 commits into from

Conversation

Dylan-DPC-zz
Copy link

Small change as requested in laravel/ideas#695

@m1guelpf
Copy link
Contributor

m1guelpf commented Jul 19, 2017

@Dylan-DPC Maybe you could close this in favour of #20155?

@Dylan-DPC-zz
Copy link
Author

no i could merge your changes in this PR?

@m1guelpf
Copy link
Contributor

m1guelpf commented Jul 19, 2017

@Dylan-DPC I'll PR your PR :D

@fernandobandeira
Copy link
Contributor

Maybe hash_make could be used instead? It would be closer to the Hash::make syntax so it could help ppl remember about it...

@m1guelpf
Copy link
Contributor

m1guelpf commented Jul 19, 2017

@fernandobandeira Well, str_hash() is consistent with other str_* functions. I like it 😄

@fernandobandeira
Copy link
Contributor

Yep i get it just a suggestion...

@devcircus
Copy link
Contributor

If the "str_hash" function is going to happen, why not add it alongside bcrypt for now, and change any core references to the new wording.

This way users will be able to continue using bcrypt, but know it is deprecated.

Personally don't see any reason to change at all just because something may be changing in 7.2.

@Dylan-DPC-zz Dylan-DPC-zz changed the title bcrypt changed to Hash::make... :D [5.5] bcrypt changed to Hash::make. and renamed to str_hash :D Jul 19, 2017
@Dylan-DPC-zz Dylan-DPC-zz changed the title [5.5] bcrypt changed to Hash::make. and renamed to str_hash :D [5.5] bcrypt changed to Hash::make and renamed to str_hash :D Jul 19, 2017
@m1guelpf
Copy link
Contributor

m1guelpf commented Jul 19, 2017

@devcircus I'd say that's Taylor decision. It has been suggested lots of times to trigger E_DEPRECATED_ERROR errors and deprecate instead of removing them, but as far as I know, it hasn't been done yet.

@devcircus
Copy link
Contributor

Definitely Taylor's call. Just would be good to avoid needlessly breaking apps due to some possible future change.

@koenhoeijmakers
Copy link
Contributor

Should just put a @depricated docblock by the bcrypt() helper and create str_hash() alongside it to prevent breaking applications i suppose?

@m1guelpf
Copy link
Contributor

@koenhoeijmakers See my comment above.

@koenhoeijmakers
Copy link
Contributor

Also, i'd suggest calling it hasher(), since any hasher class should implement the HasherContract, but thats my opinion.

@m1guelpf yea i just noticed :)

@joshmanders
Copy link
Contributor

Lets give it some uniqueness and call it hashbrowns($str) because they are tasty.

@taylorotwell
Copy link
Member

Don't remove the bcrypt method. I would just add the new method for now and we'll remove bcrypt helper in a later release.

@Dylan-DPC-zz
Copy link
Author

@taylorotwell fine i will add the bcrypt method again. Reopen? or create a new PR?

@m1guelpf
Copy link
Contributor

@Dylan-DPC New PR.

@m1guelpf
Copy link
Contributor

@taylorotwell How about deprecating bcrypt()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants