[Solved] Importing existing project crashes

0 votes
asked Sep 22, 2015 in Solved by ptermaten (390 points)
recategorized Oct 13, 2015 by ludek.vodicka

Importing entities (Doctrine2/Symfony2) causes Skipper to crash. See crash reports 407 and 408.
Any workaround or solution?

Update:
I was able to narrow down the problem.
It seems that Skipper crashes on an Entity with the following annotations:

 /**
  *@ORM\ManyToOne(targetEntity="AppBundle\Entity\Vertical",inversedBy="merchantData")
  * @ORM\JoinColumn(name="vertical_id", referencedColumnName="id")
  * @ORM\OrderBy({"name" = "ASC"})
  */
    private $vertical;

After removing the OrderBy annotation, the import runs as expected.

commented Sep 22, 2015 by ludek.vodicka Skipper developer (140,450 points)

Can you please send me ([email protected]) a whole file where is this annotation defined together with referred entity file, so we can test it here? It's strange that OrderBy annotation is causing the crash.

Based on crash reports it seems like invalid attribute content but I don't see anything wrong on the snippet you sent here.

Thanks

1 Answer

0 votes
answered Oct 13, 2015 by ludek.vodicka Skipper developer (140,450 points)
selected Oct 13, 2015 by ptermaten
 
Best answer

The problem was located in file MerchantData.phh in $vertical variable definition.

Based on the documentation @ORM\OrderBy definition can be placed only on the inverse side not on owning side like you currently have. In normal situation Skipper should ignore such errors but in combination with other factors this invalid definition is causing an exception in the import process.

To fix this issue simply remove (or move) @OrderBy definition and import should work ok.

...