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

v2.0-dev and Symfony 3.4 non Flex #62

Open arnaudgoulpeau opened 4 years ago

arnaudgoulpeau commented 4 years ago

Hi, thanks for your work !

I managed to make your bundle work under a Sf 3.4 non flex project.

I don't know if there are more to do, because it seams a bit hacky but here is what I did :

<?php

namespace AdminBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class AdminBundle extends Bundle
{
    public function __toString()
    {
        return $this->getPath();
    }
}

I said hacky because of the __toString method.

Maybe this 'hack' could end in the documentation, because its a pity not to benefits your work on many-to-many snapshot functionnality.

Again thank you for your work !

arnaudgoulpeau commented 4 years ago

I'm sorry, the solution I proposed leads to an other probleme : the generated namespace is screwed :

namespace /var/www/html/src/AdminBundle\DataFixtures\ORM;