Recommend this page to a friend! |
Download .zip |
Info | Example | View files (36) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2024-04-22 (15 hours ago) | Not yet rated by the users | Total: Not yet counted | Not yet ranked |
Version | License | PHP version | Categories | |||
yii2-fixturegii 1.0 | MIT/X Consortium ... | 5 | Databases, Libraries, Code Generation, C... |
Description | Author | |
This package can Generate fixture code files from templates scripts. |
#!/usr/bin/env php |
Gii fixture helper - generate fixture classes; faker templates; fixture data files from table support bulk template and data-file generations
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.
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
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
]
],
]
//...
];
Files |
File | Role | Description | ||
---|---|---|---|---|
src (1 file, 6 directories) | ||||
tests (3 files, 4 directories) | ||||
.dockerignore | Data | Auxiliary data | ||
.php_cs.dist | Example | Example script | ||
CHANGELOG.md | Data | Auxiliary data | ||
codeception.yml | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
docker-compose.yml | Data | Auxiliary data | ||
Makefile | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
Files | / | src |
File | Role | Description | ||
---|---|---|---|---|
contracts (2 files) | ||||
forms (3 files) | ||||
generators (3 files) | ||||
objects (2 files) | ||||
services (2 files) | ||||
templates (3 files) | ||||
Bootstrap.php | Class | Class source |
Files | / | src | / | contracts |
File | Role | Description |
---|---|---|
IFakerColumnResolver.php | Class | Class source |
ITableResolver.php | Class | Class source |
Files | / | src | / | forms |
File | Role | Description |
---|---|---|
class_form.php | Example | Example script |
data_form.php | Example | Example script |
template_form.php | Example | Example script |
Files | / | src | / | generators |
File | Role | Description |
---|---|---|
ClassGenerator.php | Class | Class source |
DataGenerator.php | Class | Class source |
TemplateGenerator.php | Class | Class source |
Files | / | src | / | objects |
File | Role | Description |
---|---|---|
TableIndex.php | Class | Class source |
TableRelation.php | Class | Class source |
Files | / | src | / | services |
File | Role | Description |
---|---|---|
FakerColumnResolver.php | Class | Class source |
TableResolver.php | Class | Class source |
Files | / | src | / | templates |
File | Role | Description |
---|---|---|
fixture_class.php | Example | Example script |
fixture_data.php | Aux. | Auxiliary script |
fixture_tpl.php | Aux. | Auxiliary script |
Files | / | tests |
File | Role | Description | ||
---|---|---|---|---|
config (1 file) | ||||
helpers (1 file, 1 directory) | ||||
migrations (2 directories) | ||||
unit (4 files) | ||||
bootstrap.php | Aux. | Auxiliary script | ||
unit.suite.yml | Data | Auxiliary data | ||
yii | Example | Example script |
Files | / | tests | / | migrations | / | mysql |
File | Role | Description |
---|---|---|
m170428_223742_mysqltest_migration.php | Class | Class source |
Files | / | tests | / | migrations | / | pg |
File | Role | Description |
---|---|---|
m170428_223742_pgtest_migration.php | Class | Class source |
Files | / | tests | / | unit |
File | Role | Description |
---|---|---|
bootstrap.php | Aux. | Auxiliary script |
FakerColumnResolverTest.php | Class | Class source |
TableResolverMysqlTest.php | Class | Class source |
TableResolverPgTest.php | Class | Class source |
Version Control | Unique User Downloads | |||||||
100% |
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.