Ashfaq Muhammad
Ashfaq Muhammad

Reputation: 790

Symfony 3.4 and Fixtures Bundle issue with bundle version 3.0

I am trying to configure the bundle from : https://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html

and when I try to run the command :

$ php bin/console doctrine:fixtures:load

getting error: In LoadDataFixturesDoctrineCommand.php line 95: Could not find any fixture services to load.

Upvotes: 3

Views: 399

Answers (1)

flik
flik

Reputation: 3633

You need to update (app/config/services.yml)

services:
        resource: '../../src/DataFixtures/*'

https://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html

Other problem is here in to the above tutorial

// src/DataFixtures/AppFixtures.php
namespace App\DataFixtures;

name space should be :

namespace DataFixtures;

Upvotes: 2

Related Questions