Comments (4)
$fakes = array();
for ($i=0; $i<100;$i++) {
$fakes[]= $generator->email;
}
You want Faker to automate that?
from faker.
I'd like to automate this
$faker = FakerFactory::create();
$fake = new \stdClass();
$fake->firstName = $faker->firstName;
$fake->lastName = $faker->lastName;
$fake->email = $faker->safeEmail;
$fake->phoneNumber = $faker->phoneNumber;
$fake could be a stdClass or an associative array. I'd like to pass a generic "container" (not an entity) and have it filled with fake data for me.
from faker.
Seems either too specific, or too simple - in the way that a Faker code for doing that would probably be as long as the code you wrote.
from faker.
As for now I'm just starting using faker so I'm not really sure about what I'd like to automate and what it isn't worth it, after a few use cases I would have a better idea about it. If I'll come out with a generic solution I'll PR it to you so you'll be able to review it.
Sounds like we can close this issue for now.
from faker.
Related Issues (20)
- How to generate a column data depend on other column data HOT 1
- eCommerce Feature request HOT 1
- Doctrine Populator: Don't clean entity manager HOT 1
- Kz faker random wrong output from getCenturyByYear
- [BUG] dateTimeThisYear method does not generate a properly date with current year
- Got 'Unknown formatter "tollFreePhoneNumber"' using es_ES locale HOT 1
- Unknown formatter secondaryAddress does not exist HOT 1
- Improvement maybe: Fill any object you want.
- Maximum retries of 10000 reached without finding a unique value HOT 1
- Suggestion - Faker method to randomly execute HOT 1
- Feature request: Codes for the representation of names of scripts (ISO 15924)
- dateTimeThisDecade is previous decade HOT 2
- Add zh_CN PhoneNumber TestCase & TollFreePhoneNumber API & E164PhoneNumber API
- Doctrine\Common\Persistence\ is Deprecated in 5.0 Symfony
- Undefined type 'Database\Seeders\Faker\Factory'.intelephense(1009) HOT 1
- buildingNumber is 0, 00, 000 in some locales
- In DatabaseServiceProvider.php line 88: Class 'Faker\Factory' not found HOT 2
- [Feature request] Add profanity and rude words generator HOT 6
- Lorempixel.com is down HOT 2
- Set next as default branch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faker.