doctrine / DoctrineFixturesBundle

Symfony integration for the doctrine/data-fixtures library
MIT License
2.45k stars 202 forks source link

Error while running LoadDataFixturesDoctrineCommand with the 'group' argument using Command::run() #326

Closed jonmldr closed 4 years ago

jonmldr commented 4 years ago

I get an error when I try to run doctrine:fixtures:load with the group argument using run() method of the Symfony Console Command class. This way of calling other commands is recommended and described in the documentation of the Symfony Console component.

This is the error: Argument 1 passed to Doctrine\Bundle\FixturesBundle\Loader\SymfonyFixturesLoader::getFixtures() must be of the type array, string given, called in /vendor/doctrine/doctrine-fixtures-bundle/Command/LoadDataFixturesDoctrineCommand.php on line 109

When I run doctrine:fixtures:load --group=test in the CLI, the group argument is parsed as a single-element array. When I call the command as described by the documentation, the group argument is parsed as a string.

jonmldr commented 4 years ago

This should be an issue for the Console component :)