Error running doctrine:fixtures:load in heroku

Symfony 4

For the next people running into this issue, if you are on Symfony 4, add this line in the config/bundles.php array:

Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['all' => true]

Then clear your cache (as Rick Slinkman said in the comments)


I solved adding this to my AppKernel:

if (in_array($this->getEnvironment(), array('prod'))) {
    $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
}

Thanks anyways.