[Fixed] Gedmo Tree generates incorrect YML arrays

0 votes
asked Sep 2, 2016 in Solved by adamwood (140 points)
recategorized Oct 5, 2016 by ludek.vodicka

This is a follow up to the following comment from two months ago for visibility, as the original issue was marked as fixed.

https://support.skipper18.com/2485/fixed-gedmo-sluggable-generates-incorrect-yml-field-format?show=2490#c2490

Gedmo Tree arrays are invalid, outputting as:

gedmo:
  treeLevel:

... instead of this:

gedmo:
  - treeLevel

https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/tree.md#yaml-mapping-example

This is present on at least the treeLeft, treeRight, treeLevel and treeParent mappings. The issue causes major problems using Skipper on large schemas, as we have to manually revert lots of files that are affected by this in version control every time we export to ORM.

1 Answer

0 votes
answered Sep 2, 2016 by ludek.vodicka Skipper developer (140,450 points)

Hi, thanks for info. This issue should be fixed in latest beta - https://support.skipper18.com/402/downloads-skipper-beta

Did you try beta version 3.2.7.1330 ?

commented Sep 5, 2016 by adamwood (140 points)

Hi Ludek,

Yes, I did try this on the latest version (3.2.7.1330) before creating this issue. I've just exported an example entity from it and this is what was created:

Foo:
  type: entity
  table: foo
  fields:
    left:
      type: integer
      nullable: true
      column: lft
      gedmo:
        treeLeft:
    right:
      type: integer
      nullable: true
      column: rgt
      gedmo:
        treeRight:
    level:
      type: integer
      nullable: true
      gedmo:
        treeLevel:
  oneToMany:
    children:
      targetEntity: Foo
      mappedBy: parent
      orderBy:
        left: ASC
  manyToOne:
    parent:
      targetEntity: Foo
      inversedBy: children
      joinColumns:
        parent:
          referencedColumnName: id
          onDelete: CASCADE
      gedmo:
        treeParent:
  gedmo:
    tree:
      type: nested
commented Sep 5, 2016 by ludek.vodicka Skipper developer (140,450 points)

Ok, thanks for testing. We will check it

commented Oct 5, 2016 by ludek.vodicka Skipper developer (140,450 points)

Gedmo YML issue should be completely fixed in latest beta 3.2.7.1334 https://support.skipper18.com/402/downloads-skipper-beta

...