2
votes

I've noticed this recently, from a clean install of Symfony2 and removed AcmeDemoBundle (from the AppKernel, routing_dev.yml etc.). I generate the bundle and noticed that the Target directory for the bundle has changed and every time I create a new bundle I have to manually put in the proper path to it. Seems to be a problem with the latest release of Symfony2.

Changed Target directory line during bundle creation:

Target directory [/var/www/html/Project/app/cache/dev/../src]:

The path that it use to point was:

Target directory [/var/www/html/Project/src]:

I am at a loss for what changed as I installed a clean build and did not alter any settings. When I installed Symfony2 I used the following: (which is the same way I've used previously)

composer create-project symfony/framework-standard-edition Project @stable

php app/console generate:bundle (see last line)

Welcome to the Symfony2 bundle generator  

Your application code must be written in bundles. This command helps you generate them easily.

Each bundle is hosted under a namespace (like Acme/Bundle/BlogBundle). The namespace should begin with a "vendor" name like your company name, your project name, or your client name, followed by one or more optional category sub-namespaces, and it should end with the bundle name itself (which must have Bundle as a suffix).

See http://symfony.com/doc/current/cookbook/bundles/best_practices.html#index-1 for more details on bundle naming conventions.

Use / instead of \ for the namespace delimiter to avoid any problem.

Bundle namespace: Foo/FooBundle

In your code, a bundle is often referenced by its name. It can be the concatenation of all namespace parts but it's really up to you to come up with a unique name (a good practice is to start with the vendor name). Based on the namespace, we suggest FooFooBundle.

Bundle name [FooFooBundle]:

The bundle can be generated anywhere. The suggested default directory uses the standard conventions.

Target directory [/var/www/html/Project/app/cache/dev/../src]:

1

1 Answers

1
votes

Fixed by updating composer:

composer self-update

Then creating a new project.