-
Notifications
You must be signed in to change notification settings - Fork 335
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
Unknown formatter "catchPhrase" #310
Comments
As far as i know this has always been a locale specific method for en_US and never for the GB locale here. So i do not really think it is a bug |
@pimjansen it has definitely been available to en_GB as I use it in most of my Laravel applications. It was working before I updated to the latest version today. |
The en_GB locale only has a new Company class since january 2021. Before this it did not even exist and that class never had a catchPhrase method. It only exists in the en_US locale. Therefor i also do not see this as a bug. |
@pimjansen The commit I referenced did include the new en_GB Company class as you say, which is the problem. The class didn't exist before this commit which meant that the default fallback was the en_US Company class as shown here: https://github.com/FakerPHP/Faker/blob/main/src/Faker/Factory.php#L7 So before the new en_GB Company class was created |
I believe that I'd be happy to submit a PR with either of the above solutions. |
Feel free to raise a PR for this. Meaning implementing the catchPhrase methods on the en_GB provider if needed. Please note that we do not want linking between the locales itself. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 1 week if no further activity occurs. Thank you for your contributions. |
Summary
After updating to 1.14.1
->catchPhrase
now throws the following error:After brief investigations I believe it has been caused by the following commit affecting Laravel app's with
faker_locale
set toen_GB
7e6c6b0#diff-c65f89c9fc1f2402100a21efa32250b826e08a21c73aa1c84a6d023523132795
Versions
fakerphp/faker
Self-enclosed code snippet for reproduction
Expected output
Actual output
The text was updated successfully, but these errors were encountered: