FakerPHP / Faker

Faker is a PHP library that generates fake data for you
https://fakerphp.github.io
Other
3.48k stars 331 forks source link

Unable to get any other text but Latin #801

Closed hitriyvalenok closed 8 months ago

hitriyvalenok commented 8 months ago

Summary

Faker ignores providers, continuing to generate Latin text

Versions

1.23.0

Self-enclosed code snippet for reproduction

$faker = Factory::create( 'en_US' );
$faker->addProvider( new Faker\Provider\en_US\Text( $faker ) );
echo $faker->text;

Expected output

Alice was beginning to get very tired of sitting by her sister on the bank.

Actual output

Vero aut nobis soluta vitae. Amet quo enim inventore tempore.
pimjansen commented 8 months ago

What are your trying to do? See the code examples in the docs. There is no need to add the provider at all?

hitriyvalenok commented 8 months ago

I'm sorry, but your answer absolutely senseless. It's pretty obvious that I'm trying to generate text other than Latin. I've been using Faker for a few months and already have read the docs. Please, show me a sample where Faker generates English words.

bram-pkg commented 8 months ago

For actual English text realText() is used. It is also not recommended to use property access, but rather call the methods with the same name.

hitriyvalenok commented 8 months ago

Thanks! Is there a way also to get an English word?