h4cc / AliceFixturesBundle

A Symfony2 bundle for using Alice and Faker with data fixtures. Abled to use Doctrine ORM as well as Doctrine MongoDB ODM.
MIT License
75 stars 25 forks source link

On errors give the fixture yaml filename #58

Open ousamabenyounes opened 8 years ago

ousamabenyounes commented 8 years ago

First of all Thank you for this very nice/usefull Bundle.

When we get errors using it, we often don't have the yaml filename on our error stack. For exemple the following error: "[Symfony\Component\Debug\Exception\ContextErrorException] Catchable Fatal Error: Argument 1 passed to FOS\UserBundle\Model\User::setRoles() must be of the type array, string given, called in ...\vendor\nelmio\alice\src\Nelmio\Alice\Loader\Base.php on line 506 and defined"

To fix our bug, we must comment yaml files to be able to find where the current error is located and then fix it.

With the concerned fixture yaml filename given, we could save precious time debugging :)