I'm using Symfony2 and want to generate getters and setters for the entities by running:
$ php app/console doctrine:generate:entities TestBundle
The Console returns me the following message:
[RuntimeException] Can't find base path for "TestBundle" (path: "C:\xampp\htdocs\ProjectX\src\Namespace\TestBundle", destination: "C:/xampp/htdocs/ProjectX/src/Namespace/TestBundle").
The Bundle exists at this location: C:\xampp\htdocs\ProjectX\src\Namespace\TestBundle
Whats wrong?
Just to add something else in case others reach this. I had an issue causing the same error but it was due to my entities living in a codebase that used PSR-4. Doctrine does not support PSR-4 when doing anything with code generation. It has to do with how they map class namespaces to filesystem paths and how PSR-4 allows class/namespace paths that don't directly map to the filesystem.
https://github.com/doctrine/DoctrineBundle/issues/282
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With