Zend Framework 2: AnnotationRegistry not found


October 19, 2013 at 16:02
Zend Framework

Accoording to this tutorial I wanted to create a simple login, when ZF2 threw this 'helpful' errormessage:
Fatal error: Class 'Doctrine\Common\Annotations\AnnotationRegistry' not found in \zendframework\zendframework\library\Zend\Code\Annotation\Parser\DoctrineAnnotationParser.php on line 42
Turns out when using that stupid composer the way it is recommended in the official tutorial, it doesn't install doctrine (WTF?!). So the following must be done:
  1. in vendor/compuser/installed.json add a row in require :
            "require": {
                "doctrine/common": ">=2.1", //neu
                "php": ">=5.3.3"
            },
  2. start the console and call the following:
    php composer.phar update
And suddenly it works.

Hinterlasse einen Kommentar:
Volodymyr
01.06.2015
Thanx a lot, it works !

Jijo
24.05.2015
Thanks a lot. Now its work for me.

girlingreyhsirt
23.08.2015
Thanks I was getting frustrated in here

Search