0
votes

I recently used this tweak to manage multi-app on my project :

http://jolicode.com/blog/multiple-applications-with-symfony2

Now when generating a bundle, default src folder suggested looks like this :

Target directory [D:\clients......\www\apps/src]:

That is not correct, src folder location is without "../apps"

How can I change that default value please ?

1
you can add --dir option to the commandjohn Smith
Yes but I would like this to be done without specify that option and overriding that default value.NoX

1 Answers

1
votes

You could override the GenerateBundleCommand

in namespace Sensio\Bundle\GeneratorBundle\Command

search for the line

    if (null === $dir) {
        $dir = dirname($this->getContainer()->getParameter('kernel.root_dir')).'/src';

and replace with your favourite dir.

Remember if you edit in Vendor folder it will be overwritten by composer update and it wont be there in another installation. So this way it will work, but if you want to do it right, you need to override that command. Maybe this link helps you https://github.com/calliopeinitiative/marca/wiki/Overriding-the-Crud-Generator