简体   繁体   中英

How do I fix this “Call to undefined method” error in Doctrine when using Symfony 2.3

When using Doctrine to generate a new ORM model in Symfony 2.3, I get the following error:

Call to undefined method Doctrine\ORM\Configuration::getAliasNamespaces()

How do I fix this?

To fix this, you can amend the generate function inside //Sensio/Bundle/GeneratorBundle/Generator/DoctrineEntityGenerator.php .

Replace this line:

$config->getAliasNamespaces()

With this:

$config->getEntityNamespaces()

This appears to be a bug in Symfony 2.3. I found this on the Github forum here , but this doesn't appear to be on StackOverflow. Full credit to blackk18 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM