mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-3152: Generating methods does not check for existing methods with different case #3909
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Jun 4, 2014).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user jacobwalker0814:
When I use
orm:generate-entities --generate-methods=trueto add methods to an existing entity (such as when I add new properties) the generator will redeclare methods if my existing entity is using different case. This is a fatal error because PHP method names are treated as case insensitive.I have not tested this in 2.4.
Here is a minimal example entity before running the generator. Not the case of
getIDAnd after running the generator
@doctrinebot commented on GitHub (Jun 5, 2014):
Comment created by @deeky666:
Hmm yeah it seems the EntityGenerator does not use reflection to determine whether a method/property already exists but instead tokenizes the source file and compares the methods/properties case-sensitive.
I will have a look at it.
@doctrinebot commented on GitHub (Jun 5, 2014):
Comment created by @deeky666:
Patch supplied in PR: https://github.com/doctrine/doctrine2/pull/1049
@doctrinebot commented on GitHub (Jun 5, 2014):
Comment created by jacobwalker0814:
Thanks for looking in to this so quickly, Steve.
@doctrinebot commented on GitHub (Jun 6, 2014):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1049] was closed:
https://github.com/doctrine/doctrine2/pull/1049
@doctrinebot commented on GitHub (Jun 6, 2014):
Comment created by @ocramius:
Merged @
d71159c6c5@doctrinebot commented on GitHub (Jun 6, 2014):
Issue was closed with resolution "Fixed"