Giter Club home page Giter Club logo

Comments (7)

pimjansen avatar pimjansen commented on June 23, 2024

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

from faker.

laraluke avatar laraluke commented on June 23, 2024

@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.

from faker.

pimjansen avatar pimjansen commented on June 23, 2024

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.

from faker.

laraluke avatar laraluke commented on June 23, 2024

@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 ->catchPhrase worked as it fell back to en_US, but the newly created en_GB doesn't contain this method - causing the issue.

from faker.

laraluke avatar laraluke commented on June 23, 2024

I believe that ->catchPhrase will be used in many other Laravel applications with the locale set to en_GB - so I propose that this method is moved into either the base Company class or added to the en_GB class too.

I'd be happy to submit a PR with either of the above solutions.

from faker.

pimjansen avatar pimjansen commented on June 23, 2024

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.

from faker.

stale avatar stale commented on June 23, 2024

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.

from faker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.