insolita / yii2-fixturegii
gii fixture helper - generate fixture classes; faker templates; fixture data files from table
Installs: 5 225
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 3
Forks: 4
Open Issues: 1
Type:yii2-extension
Requires
- insolita/yii2-validatorpack: ~0.0.1
- yiisoft/yii2: ~2.0.13
- yiisoft/yii2-gii: 2.0.*
Requires (Dev)
- codeception/codeception: ^2.2.3
- codeception/specify: ~0.4.3
- codeception/verify: ~0.3.1
- nesbot/carbon: ~1.9
- vlucas/phpdotenv: *
Suggests
README
Gii fixture helper - generate fixture classes; faker templates; fixture data files from table support bulk template and data-file generations
Installation
composer require --dev --prefer-dist insolita/yii2-fixturegii "~3.0.0"
or add
"insolita/yii2-fixturegii": "~3.0.0"
to the require-dev section of your composer.json
file.
Usage
Register insolita\fixturegii\Bootstrap in bootstrap section of backend application, or add needed generators in section of gii module
Go to gii and use new Generators
Suggest:
define '@test' or '@fixture' alias for quick path setup
Customize
Set up in gii config sections
$config['modules']['gii'] = [ 'class' => 'yii\gii\Module', 'generators' => [ //... 'fixtureClass'=>[ 'class'=>\insolita\fixturegii\generators\ClassGenerator::class, 'templates'=>[ //add your custom ] ], 'fixtureData'=>[ 'class'=>\insolita\fixturegii\generators\DataGenerator::class, 'tableResolverClass'=>'You can set own implementation', 'templates'=>[ //add your custom ] ], 'fixtureTemplate'=>[ 'class'=>\insolita\fixturegii\generators\TemplateGenerator::class, 'tableResolverClass'=>'You can set own implementation', 'columnResolverClass'=>'You can set own implementation', 'templates'=>[ //add your custom ] ], ] //... ];