How do we add the Description to the phpdocs blocks?

+1 vote
asked Nov 15, 2014 in General Questions by otherjohn (170 points)

Is it possible to export the description of a Entity Field to the phpdoc block?

For example, lets say I have an entity called "Items" with a field called "UOM" and the description I put for the UOM field is "Unit of measurement". I would like to export as follows:

    class AbstractItem
   {

         /**
        *
        * Unit of measurement
        *
        * @ORM\Column(type="smallint", nullable=false)
        */
        private $uom;
   }

Even if this exect way of doing it can't be done, how would we go about putting the description in some sort of way in the attribute?

1 Answer

0 votes
answered Nov 15, 2014 by ludek.vodicka Skipper developer (140,450 points)

Hi, unfortunately this isn't currently possible. It's because there are a lot of ways how this can be done and none of these methods fits to everyone.

We already discussed this feature some time ago here: http://support.skipper18.com/58/feature-request-entity-field-descriptions-export-comments?show=84#a84 but also because of low interest we decided to work on more requested features.

commented Nov 15, 2014 by otherjohn (170 points)

can it be done with a script and if so, is there some tutorial that shows something similar that I can refer to.

commented Nov 15, 2014 by ludek.vodicka Skipper developer (140,450 points)

Comments are stored inside Skipper project which is pure XML file, complete documentation you can find here: enter link description here It's a simple XML with @description attributes.

Unfortunately I'm not aware of any scripts which will be able to export data based on XML/XSLT to php files.

commented Mar 28, 2017 by mbartok (220 points)

I don't think this is a low interest feature. This was the first thing that i've noticed when I started using Skipper. I like commented code and it is a real pain to do commenting twice, not to mention merging changes. I know, that Skipper should handle ORM related exports and leave the rest (comments + other annotations), but there should be an option, script, plugin or whatever to export those descriptions to entity.

...