You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my entity, I have a method that returns an active season to me according to a start datetime, an end datetime and a non-required user datetime. If this parameter is not defined when method is called, then current datetime is setted.
Bug Report
Summary
In my entity, I have a method that returns an active season to me according to a start datetime, an end datetime and a non-required user datetime. If this parameter is not defined when method is called, then current datetime is setted.
Since PHP8.1, a new object is allowed as a default parameter value.
But Doctrine's Proxy Generator generate a class with syntax error.
Current behavior
Fatal error: Constant expression contains invalid operations in /var/www/html/var/cache/dev/doctrine/orm/Proxies/__CG__AppEntitySeason.php on line 374
How to reproduce
Define a method with a default parameter value in a entity.
Expected behavior
/var/www/html/var/cache/dev/doctrine/orm/Proxies/__CG__AppEntitySeason.php
Temporary solution to avoid error
The text was updated successfully, but these errors were encountered: