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
Recent fix for constants in default parameter values broke proxy generation when constant is referenced as self.
Example entity code:
public function hasAccess(int $level = self::LEVEL_WORKER): bool
{
return $this->level >= $level;
}
Generated proxy class:
public function hasAccess(int $level = \self::LEVEL_WORKER): bool
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'hasAccess', [$level]);
return parent::hasAccess($level);
}
Which in effect causes Fatal Error in PHP 8.1:
[27-Sep-2022 09:11:12 UTC] PHP Fatal error: '\self' is an invalid class name in /app/var/cache/beta/doctrine/orm/Proxies/__CG__AppEntitySomeEntity.php on line 242
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: