Can't Not Run Faker

Hi all,

I have a difficulty trying to use the fixture. After adding “yiisoft/yii2-faker”: “*” to composer.json, and setting ‘tests’ in main.php for console app (I’m using advanced template), I run the faker with this command : “php yii fixture users”. It return an error :

Any ideas how to fix this.

Thanks all so much.

Hi, yeah, this is because fixture controller for faker is extended from yii console fixture controller, that is using trait that was removed. As a quick fix you can simply remove this row (https://github.com/yiisoft/yii2/blob/master/framework/console/controllers/FixtureController.php#L55) from you code in vendor dir.

I will have time tomorrow to fix yii\console\FixtureController according last changes in fixture features, because they were completle redesigned and now there is no DbFixtureManager.

Thanks Ragazzo, I’ll wait for your fix.

Ragazzo,

have you fixed this? If I remove that line, it generate another error,

Please take time to review it. Thanks,

Nope, not yet. We are thinking of different approaches for fixing FixtureController, maybe will remove it, after that Faker will be fixed.

FixtureController also was fixed, docs updated, some actions were renamed: apply/clear -> load/unload.