doctrine / DoctrineFixturesBundle

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

Safe array cast to be sure that we are consistent in interfaces … #302

Open idoraquel opened 4 years ago

idoraquel commented 4 years ago

…on a way from InputInterface::getOption() to ::getFixtures()

Fixes https://github.com/doctrine/DoctrineFixturesBundle/issues/301

greg0ire commented 4 years ago

This was introduced in https://github.com/doctrine/DoctrineFixturesBundle/pull/260 . It looks funny to me that we have to do this… isn't there a way to consistently have an array when calling getOption?

greg0ire commented 4 years ago

Also, looks like the build is broken on at least master and 3.3.x, because of a test that depends on a classname that changed after the last version of the persistence lib was released

alcaeus commented 4 years ago

@Codealist why is this necessary? From looking at the code, getOption should always return an array, even if only one option was given. Can you provide a test case that fails with the current code but passes with yours? Thanks!