错误信息“date_diff() expects parameter 1 to be datetimeinterface, string given”表明,date_diff()函数期望其第一个参数是一个实现了DateTimeInterface接口的对象,但实际上却收到了一个字符串。在PHP中,DateTimeInterface是DateTime和DateTimeImmutable等类的接口,它们提供了处理日期和时间的方法。 如何将字符串转换为...
Expand Down Expand Up @@ -6909,19 +6928,38 @@ Set DateTime to DateTimeInterface for DateTime property with DateTimeInterface d ### NumericReturnTypeFromStrictReturnsRector Add int/float return type based on strict typed returns - class: [`Rector\TypeDeclaration\Rector\ClassMethod\NumericReturnType...
Assertion::nullOrIsInstanceOf($this->logTimeLowerBounds, DateTimeInterface::class); Assertion::nullOrIsInstanceOf($this->logTimeUpperBounds, DateTimeInterface::class); Assertion::nullOrIsArray($this->logLevelList);if(!is_null($this->logLevelList)) { Assertion::notEmpty($this->logLevelList); ...
To get the diff for a specific change, go tohttps://github.com/symfony/symfony/commit/XXXwhere XXX is the change hash To get the diff between two versions, go tohttps://github.com/symfony/symfony/compare/v6.4.0...v6.4.1 6.4.12 (2024-09-21) bug #58339 [Notifier] allow the Novu ...
As already mentioned in #3974 (comment), this seems to be an actual regression instead of a PHP error. In our case the workaround to default the value to null is not acceptable either: final class AddressInput { public DateTimeInterface $startDate; ... } Making the property null by defau...