Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php JMSTranslationBundle注释“@“可选”;事实上,该地产从未进口。你有没有忘记加上一个“;使用「;用于此批注的语句?_Php_Symfony_Annotations - Fatal编程技术网

Php JMSTranslationBundle注释“@“可选”;事实上,该地产从未进口。你有没有忘记加上一个“;使用「;用于此批注的语句?

Php JMSTranslationBundle注释“@“可选”;事实上,该地产从未进口。你有没有忘记加上一个“;使用「;用于此批注的语句?,php,symfony,annotations,Php,Symfony,Annotations,我尝试提取翻译,但有很多错误 php bin/console translation:extract pt --dir=./src/ --output-dir=./app/Resources/translations [Semantical Error] The annotation "@created" in class InvoiceBundle\Service\CodeGeneratorService was never imported. Did you maybe forget to

我尝试提取翻译,但有很多错误

php bin/console translation:extract pt --dir=./src/ --output-dir=./app/Resources/translations

[Semantical Error] The annotation "@created" in class InvoiceBundle\Service\CodeGeneratorService was never imported. Did you maybe forget to add a "use" statement for this annotation?

 [Semantical Error] The annotation "@optional" in property Ups\Entity\Tradeability\TariffInfo::$detailId was never imported. Did you maybe forget to add a "use" statement for this annotation?
是否可以忽略未知注释

 "jms/translation-bundle": "^1.3",
    "nikic/php-parser": "v1.4.1",
您可以尝试使用,看看是否符合您的目的

use Doctrine\Common\Annotations\Annotation\IgnoreAnnotation;

/**
  * @IgnoreAnnotation("created")
  * @IgnoreAnnotation("optional")
  */