laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.69k stars 11.05k forks source link

[11.x] add support for `similar_text` #53492

Closed nuernbergerA closed 2 weeks ago

nuernbergerA commented 2 weeks ago

This PR adds a simple method to the Stringable and Str classes.

Its a simple wrapper around the native PHP function similar_text to get the similarity between two strings.

Cheers Adrian

morloderex commented 2 weeks ago

This would probably be better of as a macro in your own project.

taylorotwell commented 2 weeks ago

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If applicable, please consider releasing your code as a package so that the community can still take advantage of your contributions!