Webonaute / DoctrineFixturesGeneratorBundle

Generate Fixture from your existing data in your database. You can specify the Entity name and the IDs you want to import in your fixture.
63 stars 47 forks source link

Error while loading fixture #23

Closed jkbmaj closed 7 years ago

jkbmaj commented 8 years ago

When I try load fixture I receive this error: php app/console doctrine:fixtures:load [Symfony\Component\Debug\Exception\ContextErrorException] Notice: Undefined variable: IkNrAcolIrBKqAzpvhKCSeUnR7uESLsSH

Description: All values in fixture are in quotation marks, but when I trying to load them like below, hash string is interpreted as variable. $item2->setPassword("$2y$13$IkNrAcolIrBKqAzpvhKCSeUnR7uESLsSH/kHIte8mzAuwshKeF48a");

Solution: Change the quote on the apostrophe like below or escape all special characters: $item2->setPassword('$2y$13$IkNrAcolIrBKqAzpvhKCSeUnR7uESLsSH/kHIte8mzAuwshKeF48a');

Webonaute commented 7 years ago

added escaping for $ sign in v1.3.0