Closed koutsoumposval closed 6 years ago
What is generating the error you are seeing?
As far as I can debug it, it seems to be caused from the doctrine/annotations
package:
lib/Doctrine/Common/Annotations/DocParser.php
at lines 661 and line 725
so it is not exactly an error but an incompatibility with Doctrine DocParser.
The initial command that triggers this error is bin console translation:extract
(JMSTranslationBundle). I don't think that is relevant to this, I think docParser is responsible.
I felt like putting it here in order to see if anyone else faced it, because those 2 packages are widely used together.
I haven't found anything about @aliasOf
annotation for php, my IDE (php storm) is also complaining.
I'm using PhpStorm 2018.1.1. No complaint with @aliasof
.
A couple of suggestions.
* @aliasOf \Assert\Assertion::choice()
@aliasof
completely but make sure there's an @see
.I think no 2 is the actual fix. I can confirm that it solves the problem.
A @see
already exists.
Can you try option 1 as the method name is sort of incorrect as this is not a function called choice()
, but a method called \Assert\Assertion::choice()
.
We use @aliasof
in our documentation generation, so if it can stay, then that would be good. If not, the PR would need to amend bin/generate_method_docs.php
accordingly.
@aliasOf \Assert\Assertion::choice()
doesn't seem to solve the problem. I already tried it. I will look into and amend bin/generate_method_docs.php
accordingly.
If anyone has a workaround I would be very happy to hear.
Thank you.
@aliaOf annotation in inArray method causing the failing error
Doctrine\Common\Annotations\AnnotationException: [Semantical Error] The annotation "@aliasOf" in method Assert\Assertion::inArray() was never imported. Did you maybe forget to add a "use" statement for this annotation?
Removing the annotation seems to work. Should we remove it? Is there another workaround?