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

websocket 启动时报错 The annotation "@AnnotationParser" in class Swoft\WebSocket\Server\Annotation\Parser\MessageMappingParser was never imported. #1467

Open
suzhiF opened this issue Feb 17, 2022 · 0 comments

Comments

@suzhiF
Copy link

suzhiF commented Feb 17, 2022

> php ./bin/swoft http:start
2022/02/17-16:02:01 [INFO] Swoft\SwoftApplication:setSystemAlias(441) Project path: @base=/mnt/c/Users/Administrator/Code/commun_chat_Ub
2022/02/17-16:02:01 [INFO] Swoft\SwoftApplication:setSystemAlias(442) Set alias @app=@base/app
2022/02/17-16:02:01 [INFO] Swoft\SwoftApplication:setSystemAlias(443) Set alias @config=@base/config
2022/02/17-16:02:01 [INFO] Swoft\SwoftApplication:setSystemAlias(444) Set alias @runtime=@base/runtime
2022/02/17-16:02:02 [INFO] Swoft\Processor\EnvProcessor:handle(60) Env file(/mnt/c/Users/Administrator/Code/commun_chat_Ub/.env) is loaded
Doctrine\Common\Annotations\AnnotationException(code:0) [Semantical Error] The annotation "@AnnotationParser" in class Swoft\WebSocket\Server\Annotation\Parser\MessageMappingParser was never imported. Did you maybe forget to add a "use" statement for this annotation?
Code Trace:
#0 /mnt/c/Users/Administrator/Code/commun_chat_Ub/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php(732): Doctrine\Common\Annotations\AnnotationException::semanticalError()
#1 /mnt/c/Users/Administrator/Code/commun_chat_Ub/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php(661): Doctrine\Common\Annotations\DocParser->Annotation()
#2 /mnt/c/Users/Administrator/Code/commun_chat_Ub/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php(354): Doctrine\Common\Annotations\DocParser->Annotations()
#3 /mnt/c/Users/Administrator/Code/commun_chat_Ub/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php(218): Doctrine\Common\Annotations\DocParser->parse()
#4 /mnt/c/Users/Administrator/Code/commun_chat_Ub/vendor/swoft/annotation/src/Resource/AnnotationResource.php(362): Doctrine\Common\Annotations\AnnotationReader->getClassAnnotations()
#5 /mnt/c/Users/Administrator/Code/commun_chat_Ub/vendor/swoft/annotation/src/Resource/AnnotationResource.php(339): Swoft\Annotation\Resource\AnnotationResource->parseOneClassAnnotation()
#6 /mnt/c/Users/Administrator/Code/commun_chat_Ub/vendor/swoft/annotation/src/Resource/AnnotationResource.php(284): Swoft\Annotation\Resource\AnnotationResource->parseAnnotation()
#7 /mnt/c/Users/Administrator/Code/commun_chat_Ub/vendor/swoft/annotation/src/Resource/AnnotationResource.php(193): Swoft\Annotation\Resource\AnnotationResource->loadAnnotation()
#8 /mnt/c/Users/Administrator/Code/commun_chat_Ub/vendor/swoft/annotation/src/AnnotationRegister.php(152): Swoft\Annotation\Resource\AnnotationResource->load()
#9 /mnt/c/Users/Administrator/Code/commun_chat_Ub/vendor/swoft/framework/src/Processor/AnnotationProcessor.php(39): Swoft\Annotation\AnnotationRegister::load()
#10 /mnt/c/Users/Administrator/Code/commun_chat_Ub/vendor/swoft/framework/src/Processor/ApplicationProcessor.php(35): Swoft\Processor\AnnotationProcessor->handle()
#11 /mnt/c/Users/Administrator/Code/commun_chat_Ub/vendor/swoft/framework/src/SwoftApplication.php(190): Swoft\Processor\ApplicationProcessor->handle()
#12 /mnt/c/Users/Administrator/Code/commun_chat_Ub/bin/swoft(12): Swoft\SwoftApplication->run()
#13 {main}

PHP 版本 8.0.14

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