Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[DDC-2556] Fix generating non-loading proxy methods when the identifier field is defined in a trait #861
I stumbled upon this issue today while dealing with a nasty performance issue. After some digging around in the various bug trackers I found doctrine/doctrine2#3282 which illustrates the issue, however it doesn't make it clear what the root cause is.
The problem is that the code that gets checked against the regular expression when determining if a getter is "a short identifier getter" is not the right code. With this patch the actual method in the trait gets checked, not the various use statements in the class that uses said trait.
In my particular case, the lines that got considered where these:
Here, the line numbers are correct, but the file is wrong, which ultimately causes the check to fail.