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

[Semantical Error] Annotation was never imported #23

Open
Ahmard opened this issue Dec 6, 2020 · 4 comments
Open

[Semantical Error] Annotation was never imported #23

Ahmard opened this issue Dec 6, 2020 · 4 comments

Comments

@Ahmard
Copy link

Ahmard commented Dec 6, 2020

Doctrine\Common\Annotations\AnnotationException(code:0) [Semantical Error] The annotation "@AnnotationParser" in class Swoft\Validator\Annotation\Parser\AfterDateParser was never imported. Did you maybe forget to add a "use" statement for this annotation?

Screenshot from 2020-12-06 02-31-58

@Ahmard
Copy link
Author

Ahmard commented Dec 6, 2020

I am using PHP 8.0

@digloong
Copy link

Did this issue solved? I got the same issue.

@msankhala
Copy link

This issue is with php 8. Switching to PHP7.4 resolves this issue.

@nullllll1
Copy link

same issue:
Doctrine\Common\Annotations\AnnotationException(code:0) [Semantical Error] The annotation "@AnnotationParser" in class Swoft\Validator\Annotation\Parser\AfterDateParser was never imported
env:
php8.1.7
SERVER INFORMATION(v2.0.11)

solution:
git clone https://github.com/swoft-cloud/swoft-cli
cd swoft-cli
composer install

构建

php -d phar.readonly=0 ./bin/swoftcli phar:pack -o=swoftcli.phar

#build swoftcli.phar version: 0.1.6 (maybe others better)

#git branch: master, commited: bfd4cfb
#compatibility:It works,But some errors
截屏2023-02-24 17 05 35的副本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants