composer doctrine -- Fatal error Doctrine\Common\Annotations
Primary tabs
Ошибка появляется после команды
composer install
Текст ошибки:
Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Return value of Doctrine\Common\Annotations\AnnotationRegistry::registerFile() must be an instance of Doctrine\Common\Annotations\void, none returned in /var/www/ball/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php:67 Stack trace: #0 /var/www/ball/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php(200): Doctrine\Common\Annotations\AnnotationRegistry::registerFile('/var/www/ball/v...') #1 /var/www/ball/var/cache/dev/ContainerYqqoamk/appDevDebugProjectContainer.php(1079): Doctrine\Common\Annotations\AnnotationReader->__construct() #2 /var/www/ball/var/cache/dev/ContainerYqqoamk/appDevDebugProjectContainer.php(1063): ContainerYqqoamk\appDevDebugProjectContainer->getAnnotations_ReaderService() #3 /var/www/ball/var/cache/dev/ContainerYqqoamk/appDevDebugProjectContainer.php(1944): ContainerYqqoamk\appDevDebugProjectContainer->getAnnotationReaderService() #4 /var/www/ball/var/c in /var/www/ball/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php on line 67
Решение
Проблема была решена добавлением в composer.json следующих зависимостей:
"doctrine/annotations": "1.4.*", "doctrine/dbal": "2.5.4",
всего в зависимостей от doctrine стало 4:
"doctrine/doctrine-bundle": "^1.6", "doctrine/orm": "2.5.6", "doctrine/annotations": "1.4.*", "doctrine/dbal": "2.5.4",
Источник
- Log in to post comments
- 3046 reads