stargazer-team / yii-doctrine-fixture
Yii3 integration Doctrine fixture extension
1.0.2
2024-08-10 16:03 UTC
Requires
- php: >=8.1.0
- doctrine/data-fixtures: ^1.7.0
- stargazer-team/yii-doctrine: ^2.0.0
Requires (Dev)
- rector/rector: ^0.15.25
- roave/infection-static-analysis-plugin: ^1.29
- vimeo/psalm: ^4.30|^5.9
This package is not auto-updated.
Last update: 2024-11-16 17:10:37 UTC
README
Yii3 Doctrine Fixture Extension
Installation
The preferred way to install this extension is through composer:
composer require stargazer-team/yii-doctrine-fixture --dev
Config
<?php declare(strict_types=1); use Yiisoft\Yii\DoctrineFixture\Enum\ConfigOptions; 'yiisoft/yii-doctrine-fixture' => [ ConfigOptions::ENTITY_MANAGERS => [ 'default' => [ ConfigOptions::DIRS => [ '@src/Fixture', ], ConfigOptions::FILES => [ '@src/Fixture/UserFixture.php', ], ConfigOptions::CLASSES => [ UserFixture::class, ], ], ], ]
Command:
- doctrine:fixture:load
Load fixture:
php yii doctrine:fixture:load --em=default