swoft-cloud / swoft

🚀 PHP Microservice Full Coroutine Framework
https://swoft.org
Apache License 2.0
5.58k stars 786 forks source link

docker-compose启动服务,发现有报错 #131

Closed kcloze closed 6 years ago

kcloze commented 6 years ago

已经composer update到最新版,启动既看到报错:AnnotationException

swoft    |                          Information Panel                     
swoft    | ******************************************************************
swoft    | * http | Host: 0.0.0.0, port: 80, Model: 3, type: 1, Worker: 1
swoft    | * tcp  | Enable: 1, host: 0.0.0.0, port: 8099, type: 1, Worker: 1
swoft    | ******************************************************************
swoft    | Server starting ...
swoft    | 
swoft    | Fatal error: Uncaught Doctrine\Common\Annotations\AnnotationException: [Semantical Error] The annotation "@Controller" in class App\Controllers\ExceptionController was never imported. Did you maybe forget to add a "use" statement for this annotation? in /var/www/swoft/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php:54
swoft    | Stack trace:
swoft    | #0 /var/www/swoft/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php(727): Doctrine\Common\Annotations\AnnotationException::semanticalError('The annotation ...')
swoft    | #1 /var/www/swoft/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php(663): Doctrine\Common\Annotations\DocParser->Annotation()
swoft    | #2 /var/www/swoft/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php(354): Doctrine\Common\Annotations\DocParser->Annotations()
swoft    | #3 /var/www/swoft/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php(218): Doctrine\Common\Annotations\DocParser->parse('/**\n * @Control...', 'class Ap in /var/www/swoft/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php on line 54
inhere commented 6 years ago

怎么还有 Model: 3 的显示呢 该是 mode 呀

huangzhhui commented 6 years ago

Panel 的当时pr没改到,那里只是个名称而已

huangzhhui commented 6 years ago

如果composer执行没有异常,文件扫描没有异常的话,理应是不会出现这个问题的,再观察一下

huangzhhui commented 6 years ago

不同问题请单独提一个issue

aprchen commented 6 years ago

@huangzhhui 也是docker中的问题,本地环境和服务器直接部署没有出现上面的问题

bostin commented 6 years ago

php版本一致吗?

aprchen commented 6 years ago

image 看了下这个是因为php7.2的版本问题,打算换回7.1试试

https://wiki.php.net/rfc/counting_non_countables

huangzhhui commented 6 years ago

不同问题请单独提一个issue,方便自己也方便他人 @aprchen

huangzhhui commented 6 years ago

原 issue 问题原因由 Docker for Mac 共享磁盘 IO 低问题导致,框架正在尝试兼容处理

huangzhhui commented 6 years ago

https://github.com/swoft-cloud/swoft-docker 项目解决