Autoload error when following the Getting Started Guide #6072

Open
opened 2026-01-22 15:26:18 +01:00 by admin · 0 comments
Owner

Originally created by @ThomasLandauer on GitHub (Sep 25, 2018).

Originally assigned to: @Majkl578 on GitHub.

Bug Report

When following the tutorial at https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/getting-started.html (i.e. doctrine2/docs/en/tutorials/getting-started.rst), at the step vendor/bin/doctrine orm:schema-tool:create I'm getting this error:

$ vendor/bin/doctrine orm:schema-tool:update

PHP Fatal error:  Uncaught Error: Class 'Doctrine\Common\Annotations\AnnotationRegistry' not found in vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php:152
Stack trace:
#0 vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php(71): Doctrine\ORM\Configuration->newDefaultAnnotationDriver(Array, true)
#1 bootstrap.php(10): Doctrine\ORM\Tools\Setup::createAnnotationMetadataConfiguration(Array, true)
#2 cli-config.php(3): require_once('...')
#3 vendor/doctrine/orm/bin/doctrine.php(48): require('...')
#4 doctrine/orm/bin/doctrine(4): include('...')
#5 {main}
  thrown in vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php on line 152
Originally created by @ThomasLandauer on GitHub (Sep 25, 2018). Originally assigned to: @Majkl578 on GitHub. ### Bug Report When following the tutorial at https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/getting-started.html (i.e. doctrine2/docs/en/tutorials/getting-started.rst), at the step `vendor/bin/doctrine orm:schema-tool:create` I'm getting this error: ```bash $ vendor/bin/doctrine orm:schema-tool:update PHP Fatal error: Uncaught Error: Class 'Doctrine\Common\Annotations\AnnotationRegistry' not found in vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php:152 Stack trace: #0 vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php(71): Doctrine\ORM\Configuration->newDefaultAnnotationDriver(Array, true) #1 bootstrap.php(10): Doctrine\ORM\Tools\Setup::createAnnotationMetadataConfiguration(Array, true) #2 cli-config.php(3): require_once('...') #3 vendor/doctrine/orm/bin/doctrine.php(48): require('...') #4 doctrine/orm/bin/doctrine(4): include('...') #5 {main} thrown in vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php on line 152 ```
admin added the Documentation label 2026-01-22 15:26:18 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6072