[Solved] lifecycleCallbacks issue: Two functions created and link to documentation is outdated

0 votes
asked Sep 7, 2020 in Solved by tommy (160 points)
recategorized Sep 7, 2020 by ludek.vodicka

When I create lifecycleCallbacks on an entity, after the last update, two functions are created when exporting:

enter image description here

/**
* @ORM\PrePersist
*/
public function updateTimestamps()
{
}

/**
* @ORM\PreUpdate
*/
public function UpdateTimestamps()
{
}

Secondly, the link to the documentation is not working.

Am I doing something wrong?

1 Answer

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

The last update fixed some issues with lifecycle-callbacks and this fix probably also fixed the export in your case. The reason why you're getting two methods is probably that you have two different names.

Compare "updateTimestamps" and "UpdateTimestamps".

Regarding the link, it's probably because Doctrine changed again their URLs without backward compatibility. We will check these links (again... ;-( ).

commented Sep 7, 2020 by tommy (160 points)

Sorry about that, you are right, I had a typo.

commented Sep 7, 2020 by ludek.vodicka Skipper developer (140,450 points)

No problem, thanks for reporting.

...