Reputation: 1099
I changed the psr-0 autoloading to psr-4 for a few of my bundles. Now, when I try to generate entities with the app/console command, it gives me
Can't find base path for "MbDbFooBundle" (path: "/home/roland/projects/rolandtest/mbmbisbundle/Symfony/vendor/mb/mb-db-foo-bundle", destination: "/home/roland/projects/rolandtest/mbmbisbundle/Symfony/vendor/mb/mb-db-foo-bundle").
At first I thought it would be a problem with the generated autoloaders. But when I do a new clone of my project, and then run composer update to complete the vendors, it still gives me this error.
Upvotes: 5
Views: 750
Reputation: 1271
In regards to the code generation parts of Doctrine, it doesn't support PSR-4. Only PSR-0. The reason is that it directly converts class/namespace paths to filesystem paths (e.g., converting \ to /). This doesn't work for PSR-4 because it allows for namespaces that don't directly correlate with filesystem paths.
https://github.com/doctrine/DoctrineBundle/issues/282
Upvotes: 6