-
-
Notifications
You must be signed in to change notification settings - Fork 290
Open
Description
Bug Report
Compile Error: Constant expression contains invalid operations
Q | A |
---|---|
BC Break | no |
Version | 2.11.2 |
Summary
Entity with following method
class A {
public function getActivePriceOverrideForCompany(
Company $company,
DateTimeImmutable $activeAt = new DateTimeImmutable('today')
): ?PriceOverride { ... }
}
as result getting proxy like this:
public function getActivePriceOverrideForCompany(\App\Entity\Company $company, \DateTimeImmutable $activeAt = DateTimeImmutable::__set_state(array(
'date' => '2022-05-03 00',
'timezone_type' => 3,
'timezone' => 'UTC',
))): ?\App\Entity\PriceOverride { ... }
- Proxy is invalid
- Even if the code will be correct, proxy will be invalid on the next day.
This will work:
class A {
public function getActivePriceOverrideForCompany(
Company $company,
?DateTimeImmutable $activeAt = null
): ?PriceOverride { ... }
}
Metadata
Metadata
Assignees
Labels
No labels