swoft-cli icon indicating copy to clipboard operation
swoft-cli copied to clipboard

[Semantical Error] Annotation was never imported

Open Ahmard opened this issue 4 years ago • 4 comments

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 avatar Dec 06 '20 01:12 Ahmard

I am using PHP 8.0

Ahmard avatar Dec 06 '20 01:12 Ahmard

Did this issue solved? I got the same issue.

digloong avatar Jan 18 '22 02:01 digloong

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

msankhala avatar May 21 '22 11:05 msankhala

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: bfd4cfb6dd40bb4a2c65ee7e7e5223dec253e9a4 #compatibility:It works,But some errors 截屏2023-02-24 17 05 35的副本

nullllll1 avatar Feb 24 '23 09:02 nullllll1