Reputation: 23
I've been following the Doctrine getting-started docs and am immediately running into a problem with Doctrine's CLI.
If I try to run
vendor/bin/doctrine orm:schema-tool:create
or
vendor/bin/doctrine orm:schema-tool:drop
or even
php /vendor/bin/doctrine
I get this error in my terminal...
PHP Fatal error: Uncaught Error: Class 'Doctrine\Common\Annotations\AnnotationRegistry' not found in /Users/admin/.bitnami/stackman/machines/xampp/volumes/root/htdocs/doctrine2-tutorial/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php:152
Any help would be much appreciated.
Upvotes: 1
Views: 186
Reputation: 325
If you want to create your database with doctrine, you may update your composer version with dependency, after you delete de composer.lock before taping this following commande : composer install
Actually, the latest stable version of doctrine is 2.11.* . To resolve this problem, i juste upadate my doctrine :
{
{
"require": {
"doctrine/orm": "^2.11.0",
},
}
->vendor/bin/doctrine orm:schema-tool:create
Upvotes: 0
Reputation: 546
If you are trying to create a database use the following:
bin/console doctrine:database:create
Upvotes: 1