Deprecation notice after upgrading doctrine/orm from 2.11.1 to 2.16.2
Asked Answered
C

1

5

I'm experiencing the following issue:

User Deprecated:

 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 App_KernelProdContainer.php:175, https://github.com/doctrine/orm/pull/10455, package doctrine/orm)
 In ORM 3.0, the AttributeDriver will report fields for the classes where they are declared. (AttributeDriver.php:82 called by App_KernelProdContainer.php:175, https://github.com/doctrine/orm/pull/10455, package doctrine/orm)
 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 App_KernelProdContainer.php:175, https://github.com/doctrine/orm/pull/10455, package doctrine/orm)

But I have not found any option

Concavoconcave answered 5/10, 2023 at 9:33 Comment(0)
J
12

here is something that can help you. https://github.com/doctrine/orm/pull/10455

in the doctrine.yaml file report_fields_where_declared: true

As explained in the documentation https://www.doctrine-project.org/projects/doctrine-bundle/en/latest/configuration.html

Jackknife answered 9/10, 2023 at 13:29 Comment(1)
Funny enough, I added the above config-option and still get the deprecation warning ... !? Even stranger: Most of the time the warning is not there on the first load, reloading the page will suddenly display it.Krakow

© 2022 - 2024 — McMap. All rights reserved.