Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoload error when following the Getting Started Guide #7411

Closed
ThomasLandauer opened this issue Sep 25, 2018 · 5 comments
Closed

Autoload error when following the Getting Started Guide #7411

ThomasLandauer opened this issue Sep 25, 2018 · 5 comments
Assignees
Milestone

Comments

@ThomasLandauer
Copy link
Contributor

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
@Ocramius
Copy link
Member

Did you run the composer installation? What's your config file looking like?

@ThomasLandauer
Copy link
Contributor Author

I really followed the tutorial.

Did you run the composer installation?

Sure :-)

What's your config file looking like?

Copied from https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/getting-started.html#project-setup

@Ocramius
Copy link
Member

Just tried it, and could reproduce the problem. The issue is that the composer.json in that documentation should be pointing at doctrine/orm ^2.6.2: can you maybe send a patch?

@ThomasLandauer
Copy link
Contributor Author

Sure, see #7412

@Majkl578
Copy link
Contributor

#7412 has been merged.

@Majkl578 Majkl578 self-assigned this Nov 11, 2018
@Majkl578 Majkl578 added this to the 2.6.3 milestone Nov 11, 2018
ixarlie added a commit to surexdirect/doctrine2 that referenced this issue Jul 10, 2019
v2.6.3

[![Build Status](https://travis-ci.org/doctrine/doctrine2.svg?branch=v2.6.3)](https://travis-ci.org/doctrine/doctrine2)

This release provides fixes for many things, specially:

- Regression in commit order calculation
- BC-break in `EntityManager#find()` using optimistic lock outside of
  transaction
- PHP 7.3 compatibility issues

--------------------------------------------

- Total issues resolved: **8**
- Total pull requests resolved: **26**
- Total contributors: **26**

Documentation
-------------

 - [7472: fix incorrect phpdoc typehint](doctrine#7472) thanks to @seferov
 - [7465: Fixes tiny typo in the 'Working with DateTime instances' documentation](doctrine#7465) thanks to @unguul
 - [7444: Fixed URLs of doctrine-mapping.xsd in docs](doctrine#7444) thanks to @Naitsirch
 - [7441: $hydrationMode throughout can be a string as well as int (for custom modes)](doctrine#7441) thanks to @asgrim
 - [7435: Fix a typo on Documentation](doctrine#7435) thanks to @oguzdumanoglu
 - [7434: Removed FAQ paragraph stating public variables are disallowed](doctrine#7434) thanks to @Naitsirch and @flaushi
 - [7423: Update association-mapping.rst](doctrine#7423) thanks to @ThomasLandauer
 - [7421: JIRA to Github issues on Limitations and Known Issues](doctrine#7421) thanks to @seferov
 - [7412: Some formatting improvements](doctrine#7412) thanks to @ThomasLandauer
 - [7411: Autoload error when following the Getting Started Guide](doctrine#7411) thanks to @ThomasLandauer
 - [7401: &doctrine#91;docs&doctrine#93; Fix docblock in `inheritance-mapping.rst`](doctrine#7401) thanks to @bobdenotter
 - [7397: Update getting-started.rst](doctrine#7397) thanks to @eibt
 - [7394: Class 'Doctrine\Common\Persistence\Mapping\Driver\AnnotationDriver' not found](doctrine#7394) thanks to @ekosynth
 - [7378: Typo fix](doctrine#7378) thanks to @BenMorel
 - [7377: Fix query andX doctype](doctrine#7377) thanks to @sserbin
 - [7374: Deprecation message in documentation for YAML](doctrine#7374) thanks to @SenseException and @iltar
 - [7360: Document getPartialReference() properly](doctrine#7360) thanks to @lcobucci

Bug
---

 - [7471: Fix parameter value processing for objects with unloaded metadata](doctrine#7471) thanks to @alcaeus
 - [7367: Fix for BC break in 2.6.2 when calling EM::find() with LockMode::OPTIMISTIC outside of a TX](doctrine#7367) thanks to @timdev
 - [7328: Handle removed parameters by tree walker in Paginator](doctrine#7328) thanks to @plfort
 - [7325: Make code php 7.3 lint-compatible](doctrine#7325) thanks to @paxal
 - [7317: &doctrine#91;XML&doctrine#93; Fix default value of many-to-many order-by to ASC](doctrine#7317) thanks to @alexdenvir
 - [7260: Fix the handling of circular references in the commit order calculator](doctrine#7260) thanks to @stof
 - [6830: fix applying column options on foreign key columns](doctrine#6830) thanks to @Tobion

Improvement
-----------

 - [7428: CI: Test against PHP 7.3](doctrine#7428) thanks to @Majkl578
 - [7363: Fix compatibility with phan](doctrine#7363) thanks to @philippe-unitiz
 - [7345: Correct DOMDocument constructor in test](doctrine#7345) thanks to @guilliamxavier
 - [7307: Fix remaining usages of deprecated ClassLoader and Inflector from doctrine/common](doctrine#7307) thanks to @Majkl578 and @simonwelsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants