Open Lustmored opened 2 years ago
I'll start regretting introducing support for new in initializers... Sorry for the bug, we'll try to fix it hopefully this week
Here is the code we use in Symfony to dump default values: https://github.com/symfony/symfony/blob/6.2/src/Symfony/Component/VarExporter/ProxyHelper.php#L318
Feel free to borrow it (it's written for PHP >= 8.1)
Recent fix for constants in default parameter values broke proxy generation when constant is referenced as
self
.Example entity code:
Generated proxy class:
Which in effect causes Fatal Error in PHP 8.1: