In a Laravel project, Faker is provided using a config parameter, 'faker_locale', so the dependency is well instantiated. If not set, fallsback to en_US
Tracking the error message, it seems that there is a typo in Faker\Provider\es_ES\PhoneNumber: function is called tollFreeNumber instead of tollFreePhoneNumber
Changing the function's name solves the issue.
Versions
Version
PHP
7.3.18
fzaninotto/faker
1.9.1
Self-enclosed code snippet for reproduction
// file config\app.php
/*
|--------------------------------------------------------------------------
| Facker Locale Configuration
|--------------------------------------------------------------------------
|
| The facker locale determines the default locale that will be used
| by the generators.
|
*/
'faker_locale' => 'es_ES',
Summary
In a Laravel project, Faker is provided using a config parameter, 'faker_locale', so the dependency is well instantiated. If not set, fallsback to en_US
Tracking the error message, it seems that there is a typo in Faker\Provider\es_ES\PhoneNumber: function is called tollFreeNumber instead of tollFreePhoneNumber
Changing the function's name solves the issue.
Versions
fzaninotto/faker
Self-enclosed code snippet for reproduction
Expected output
Actual output