[PR #1049] [MERGED] [DDC-3152] Fix redeclaration of methods on entity generation update #9088

Closed
opened 2026-01-22 16:03:08 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/1049
Author: @deeky666
Created: 6/5/2014
Status: Merged
Merged: 6/6/2014
Merged by: @Ocramius

Base: masterHead: DDC-3152


📝 Commits (1)

  • dcf8d6a ignore case when checking for existing methods to avoid redeclaration on update

📊 Changes

2 files changed (+35 additions, -11 deletions)

View changed files

📝 lib/Doctrine/ORM/Tools/EntityGenerator.php (+11 -11)
📝 tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php (+24 -0)

📄 Description

The EntityGenerator does case-sensitive checks for existing methods on update. This can lead to a PHP fatal error because of illegal method redeclaration if the same methods with another case already exist in the entity class.
Method names are now lowercased for comparison to come around this issue.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/1049 **Author:** [@deeky666](https://github.com/deeky666) **Created:** 6/5/2014 **Status:** ✅ Merged **Merged:** 6/6/2014 **Merged by:** [@Ocramius](https://github.com/Ocramius) **Base:** `master` ← **Head:** `DDC-3152` --- ### 📝 Commits (1) - [`dcf8d6a`](https://github.com/doctrine/orm/commit/dcf8d6a86e36882335d392e6462ac3c0382219d6) ignore case when checking for existing methods to avoid redeclaration on update ### 📊 Changes **2 files changed** (+35 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Tools/EntityGenerator.php` (+11 -11) 📝 `tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php` (+24 -0) </details> ### 📄 Description The `EntityGenerator` does case-sensitive checks for existing methods on update. This can lead to a PHP fatal error because of illegal method redeclaration if the same methods with another case already exist in the entity class. Method names are now lowercased for comparison to come around this issue. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 16:03:08 +01:00
admin closed this issue 2026-01-22 16:03:09 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9088