[Fixed] Doctrine 2 lifecycle callback method does not exported properly

0 votes
asked Aug 3, 2015 in Solved by majzikm (180 points)
recategorized Oct 12, 2015 by ludek.vodicka

Hello!

I found that using ORM Property lifecycle callbacks has export to orm problems. (Symfony2 Doctrine 2)

I added a prepersist method and after export I found out that
@ORM\HasLifecycleCallbacks added correctly to the entity but PrePersist does not added to the specified method.

Or it is not supposed to do that?

Thanks

commented Aug 3, 2015 by ludek.vodicka Skipper developer (140,450 points)

Can you please post (or send to [email protected]) minimal test case where such behavior occurs?

2 Answers

0 votes
answered Aug 4, 2015 by majzikm (180 points)

It is easy to reproduce. Create a new symfony 2.7 project with Symfony installer. Then add a new Bundle with symfony console. Symfony generates a new bundle. Add a new entity with @ORM\HasLifecycleCallbacks feature and with a method using e.g PrePersist.
Then import it to skipper. It does not recognise @ORM\HasLifecycleCallbacks and if I manually add it inside skipper and specify the same method it does not export it back correctly.

But if it is not enough I try to create a sample project for this and attach it.

commented Aug 4, 2015 by ludek.vodicka Skipper developer (140,450 points)

Yes, would be great to have exact zipped project. Each user has a slightly different environment and sometime such errors aren't easy to reproduce.

Thanks!

0 votes
answered Oct 12, 2015 by ludek.vodicka Skipper developer (140,450 points)

This issue was completely fixed in latest beta (3.2.4.1254) available here:

http://support.skipper18.com/402/downloads-skipper-beta

Can you please test it and let us know?

...