Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EntityGenerator lifecycle event callbacks #11622

Closed
timum-viw opened this issue Oct 2, 2024 · 0 comments
Closed

EntityGenerator lifecycle event callbacks #11622

timum-viw opened this issue Oct 2, 2024 · 0 comments

Comments

@timum-viw
Copy link
Contributor

Bug Report

Q A
BC Break no
Version 2.20.x

Summary

The EntityGenrator creates invalid php when adding the same lifecycle event callback to two or more lifecycle events. The generator will create a stub for each event each with the same method name resulting in fatal 'Cannot redeclare' errors. That is, only if the callback name contains uppercase letters.

Current behavior

Multiple methods with the same name are generated resulting in fatal errors.

How to reproduce

I added test cases in my pr #11621 showcasing the behavior.
In any case this can easily be reproduced by adding a callback with a name containing uppercase letters to multiple lifecycle events.
When running the EntityGenerator invalid php is being generated..

Expected behavior

lifecycle event callbacks should be added only once with according annotations for multiple events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant