[PR #10865] Add possibility to set reportFieldsWhereDeclared in ORMSetup #12668

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

Original Pull Request: https://github.com/doctrine/orm/pull/10865

State: closed
Merged: Yes


The parameter $reportFieldsWhereDeclared was introduced to the AttributeDriver in https://github.com/doctrine/orm/pull/10455 and setting it to false is deprecated.

However, ORMSetup::createAttributeMetadataConfiguration() doesn't provide a way to fix this warning:

DEPRECATION: In ORM 3.0, the AttributeDriver will report fields for the classes where they are declared. This may uncover invalid mapping configurations. To opt into the new mode today, set the "reportFieldsWhereDeclared" constructor parameter to true. (AttributeDriver.php:82 called by ORMSetup.php:107, https://github.com/doctrine/orm/pull/10455, package doctrine/orm) /var/www/html/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php:209
**Original Pull Request:** https://github.com/doctrine/orm/pull/10865 **State:** closed **Merged:** Yes --- The parameter `$reportFieldsWhereDeclared` was introduced to the `AttributeDriver` in https://github.com/doctrine/orm/pull/10455 and setting it to `false` is deprecated. However, `ORMSetup::createAttributeMetadataConfiguration()` doesn't provide a way to fix this warning: ``` DEPRECATION: In ORM 3.0, the AttributeDriver will report fields for the classes where they are declared. This may uncover invalid mapping configurations. To opt into the new mode today, set the "reportFieldsWhereDeclared" constructor parameter to true. (AttributeDriver.php:82 called by ORMSetup.php:107, https://github.com/doctrine/orm/pull/10455, package doctrine/orm) /var/www/html/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php:209 ```
admin added the pull-request label 2026-01-22 16:14:48 +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#12668