johnykvsky / fejker
Slim version of Faker. Faker is a PHP library that generates fake data for you.
v0.1.0
2023-06-19 15:46 UTC
Requires
- php: ^8.1
- phpwatch/simple-container: ^2.0
- psr/container: ^1.0 || ^2.0
- symfony/deprecation-contracts: ^2.2 || ^3.0
Requires (Dev)
- ext-intl: *
- bamarni/composer-bin-plugin: ^1.8.2
- doctrine/persistence: ^2.0 || ^3.0
- phpstan/extension-installer: ~1.3.1
- phpstan/phpstan: ~1.10.19
- phpunit/phpunit: ~10.2.2
- squizlabs/php_codesniffer: 3.*
- symfony/phpunit-bridge: ^5.4.16
- thecodingmachine/phpstan-strict-rules: ~1.0.0
Suggests
- ext-curl: Required by Fejker\Provider\Image to download images.
- ext-mbstring: Required for multibyte Unicode string functionality.
- doctrine/orm: Required to use Fejker\ORM\Doctrine
This package is auto-updated.
Last update: 2024-10-19 18:50:56 UTC
README
This is slim (~9Mb less) version of fakerphp.github.io.
Only following languages are available: en_GB
, en_US
, pl_PL
Changes:
- replaced custom DI container with
phpwatch/simple-container
- added typehintint (removed phpdoc params)
- added
declare(strict_types=1);
- removed all languages except
en_GB
,en_US
,pl_PL
- removed ORM support
- removed deprecated code (since this is already BC break from original Faker)
- removed File, Image, HtmlLorem providers
- removed Barcode provider (there still is Barcode Extension)
Basic Usage
Use Fejker\Factory::create()
to create and initialize a Fejker generator, which can generate data by accessing methods named after the type of data you want.
<?php // use the factory to create a Fejker\Generator instance $faker = Fejker\Factory::create(); // generate data by calling methods echo $faker->name(); // 'Vince Sporer' echo $faker->email(); // 'walter.sophia@hotmail.com' echo $faker->text(); // 'Numquam ut mollitia at consequuntur inventore dolorem.'
License
The MIT License (MIT). Please see License File for more information.