-
Notifications
You must be signed in to change notification settings - Fork 80
Doctrine-style Annotations are removed #85
Comments
Have you tried extracting the phar to see if the processed file had its annotation removed?
|
I have similar problem. My annotations are removed and is disabled app. I use magic class methods, that are turned to simple getters/setters. /**
* @method setAutowired(TRUE)
*/ When I set ignore 'method' annotation, it wipes it's content anyway. /**
* @method
*/ I need to keep it completely the same as in original code. Is this box2 issue? |
Hey @TomasVotruba, your particular issue is a little different. Box only provides support for Doctrine-styled annotations, which is not what you are using. You'll need to create your own custom compactor for those types of annotations, or disable compacting altogether. |
How to disable compacting? |
Apologies that it took so long for me to respond but life got in the way :) Anyway: I have recreated the phar file because I had created a workaround for it to work. the output that I got was:
So it would seem that the annotation is there (but has no leading asterisk, I don't know if that matters). Since the annotation is there I am going to dig deeper to see why this error occurs with the extracted contents |
Apparently if I change the DocBlock from
to
It does work. I assume that the asterisk in front of the annotation is required by Jms Serializer. Is there a way to tell the compacter to skip specific files so that I can just tell it to skip the serializable files? |
I've finally used composer solution a bit customized, ApiGen/ApiGen@31ba2cf Related to this issue, this fixed it: ApiGen/ApiGen@31ba2cf#diff-8dd307e1c3d75a13797b28772c4248c4R147 |
What an excellent suggestion! I reckon that files-bin does nothing other than leaving those files alone or does it do anything else? |
Kevin Herrera of the Box project mentioned that the most likely fix for this issue was by putting the JMS Serializer-based files in a files-bin array int he box.json (box-project/box2#85 (comment)). Based on his recommendation this is something that we are going to try out.
You are correct, the |
When I build a new phar using box 2.4.4 then I JMS serializer starts to complain that an annotation is missing:
But when I check the code it is there:
This would lead me to the conclusion that the compacting removed the type annotation (at the least).
Is this a bug or a configuration issue that was introduced in newer versions?
The text was updated successfully, but these errors were encountered: