[PR #12212] [MERGED] Revert "Fix fields of transient classes being considered duplicate with reportFieldsWhereDeclared (#11769)" #13578

Open
opened 2026-01-22 16:17:38 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/12212
Author: @mpdude
Created: 10/9/2025
Status: Merged
Merged: 10/10/2025
Merged by: @greg0ire

Base: 2.20.xHead: revert-11769


📝 Commits (1)

  • 2ad720b Revert "Fix fields of transient classes being considered duplicate with reportFieldsWhereDeclared (#11769)"

📊 Changes

2 files changed (+0 additions, -49 deletions)

View changed files

📝 src/Mapping/Driver/ReflectionBasedDriver.php (+0 -5)
📝 tests/Tests/ORM/Functional/Ticket/GH10450Test.php (+0 -44)

📄 Description

Following up on https://github.com/doctrine/orm/pull/11769#issuecomment-3254415994, I would like to revert the changes made in 4feaa470af (#11769).

Basically, it is wrong to allow fields from transient classes to be parsed and used for mapping configuration. This has happened and worked in the past, although it was never really endorsed or officially allowed by the documentation.

By adding the reportFieldsWhereDeclared opt-in switch (#10455), we were starting to enforce stricter configuration checks that help us to prevent other, strange errors further down the road. So, 4feaa470af was a step in the wrong direction.


🔄 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/12212 **Author:** [@mpdude](https://github.com/mpdude) **Created:** 10/9/2025 **Status:** ✅ Merged **Merged:** 10/10/2025 **Merged by:** [@greg0ire](https://github.com/greg0ire) **Base:** `2.20.x` ← **Head:** `revert-11769` --- ### 📝 Commits (1) - [`2ad720b`](https://github.com/doctrine/orm/commit/2ad720b30421848f7a593c5a25f131ffb941469d) Revert "Fix fields of transient classes being considered duplicate with `reportFieldsWhereDeclared` (#11769)" ### 📊 Changes **2 files changed** (+0 additions, -49 deletions) <details> <summary>View changed files</summary> 📝 `src/Mapping/Driver/ReflectionBasedDriver.php` (+0 -5) 📝 `tests/Tests/ORM/Functional/Ticket/GH10450Test.php` (+0 -44) </details> ### 📄 Description Following up on https://github.com/doctrine/orm/pull/11769#issuecomment-3254415994, I would like to revert the changes made in 4feaa470af4de8799a1e9e3db87191bac74b7a46 (#11769). Basically, it is wrong to allow fields from transient classes to be parsed and used for mapping configuration. This has happened and worked in the past, although it was never really endorsed or officially allowed by the documentation. By adding the `reportFieldsWhereDeclared` opt-in switch (#10455), we were starting to enforce stricter configuration checks that help us to prevent other, strange errors further down the road. So, 4feaa470af4de8799a1e9e3db87191bac74b7a46 was a step in the wrong direction. --- <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:17:38 +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#13578