Skip to content

Trait declaration mismatch on 8.4 #471

@adominodsq

Description

@adominodsq

Running on PHP 8.4.5 gives the following error with chronos 2.4.5:

In FactoryTrait.php line 339:

Declaration of Cake\Chronos\Traits\FactoryTrait::createFromTimestamp(int $timestamp, $tz = null): Cake\Chronos\ChronosInterface must be compatible with DateTimeImmutable::createFromTimestamp(int|float $timestamp): static

Updating FactoryTrait.php:339 to allow the timestamp to be an int or float fixes the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions