easy-swoole / http-annotation

Apache License 2.0
7 stars 11 forks source link

PHP Fatal error In PHP8+ #34

Open JinShng opened 2 years ago

JinShng commented 2 years ago

When I use this compose in Flow config _

main server SWOOLE_WEB_SOCKET listen address 0.0.0.0 listen port 7800 worker_num 4 reload_async true max_wait_time 3 heartbeat_check_interval 5 heartbeat_idle_time 20 pid_file /tmp/easy-dev/pid.pid log_file /var/www/abCoin/Log/swoole.log user
swoole version 4.8.0 php version 8.0.14 easyswoole version 3.4.6 run mode dev temp dir /tmp/easy-dev log dir /var/www/abCoin/Log

_

Then Show Report Error:

_

PHP Fatal error: Uncaught ReflectionException: Class "\Index" does not exist in /var/www/abCoin/vendor/easyswoole/http-annotation/src/Utility/Scanner.php:43 Stack trace:

0 /var/www/abCoin/vendor/easyswoole/http-annotation/src/Utility/Scanner.php(43): ReflectionClass->__construct()

1 /var/www/abCoin/vendor/easyswoole/http-annotation/src/Utility/Scanner.php(106): EasySwoole\HttpAnnotation\Utility\Scanner->getObjectAnnotation()

2 /var/www/abCoin/vendor/easyswoole/http-annotation/src/Utility/AnnotationDoc.php(81): EasySwoole\HttpAnnotation\Utility\Scanner->scanAnnotations()

3 /var/www/abCoin/App/Utility/AutoDoc.php(28): EasySwoole\HttpAnnotation\Utility\AnnotationDoc->buildAnnotationHtml()

4 /var/www/abCoin/App/HttpController/Index.php(16): App\Utility\AutoDoc->scan2Html()

5 /var/www/abCoin/vendor/easyswoole/http/src/AbstractInterface/Controller.php(163): App\HttpController\Index->index()

6 /var/www/abCoin/vendor/easyswoole/http/src/AbstractInterface/Controller.php(153): EasySwoole\Http\AbstractInterface\Controller->__exec()

7 /var/www/abCoin/vendor/easyswoole/http/src/Dispatcher.php(229): EasySwoole\Http\AbstractInterface\Controller->__hook()

8 /var/www/abCoin/vendor/easyswoole/http/src/Dispatcher.php(183): EasySwoole\Http\Dispatcher->controllerExecutor()

9 /var/www/abCoin/vendor/easyswoole/easyswoole/src/Core.php(264): EasySwoole\Http\Dispatcher->dispatch()

10 {main}

thrown in /var/www/abCoin/vendor/easyswoole/http-annotation/src/Utility/Scanner.php on line 43

_

PHP7.3 is usable