+1 vote

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?

in General Questions by (170 points)

1 Answer

0 votes

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.

by Skipper developer (141k points)

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

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.

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.