-
Notifications
You must be signed in to change notification settings - Fork 47
v2.0-dev and Symfony 3.4 non Flex #62
Copy link
Copy link
Open
Description
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 :
- In every bundle, i.e AdminBundle.php at the bundle root, add a toString method
- Example :
<?php
namespace AdminBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class AdminBundle extends Bundle
{
public function __toString()
{
return $this->getPath();
}
}
- The key point is to give the path, so that the generated classes are created at the right place. With $this->getName(), folders and classes are located at the project root, same level as 'src'.
I said hacky because of the __toString method.
- Maybe updating the DoctrineFixtureGenerator::generate line 78 could do the trick, since $bundle is an object and not a string, but I didn't dig that much on the SYMFONY_4_BUNDLE_ALIAS constants deep meaning.
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 !
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels