Skip to content

Conversation

cdburgess
Copy link
Contributor

When using PHP 8.4, I get the following error:

Deprecated: Return type of Carbon\Traits\Date::createFromTimestamp($timestamp, $tz = null) should either be compatible with DateTime::createFromTimestamp(int|float $timestamp): static, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in nesbot/carbon/src/Carbon/Traits/Timestamp.php on line 29

I am adding the annotation to resolve this issue.

When using PHP 8.4, I get the following error: 

```
Deprecated: Return type of Carbon\Traits\Date::createFromTimestamp($timestamp, $tz = null) should either be compatible with DateTime::createFromTimestamp(int|float $timestamp): static, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in nesbot/carbon/src/Carbon/Traits/Timestamp.php on line 29
```

I am adding the annotation to resolve this issue.
@cdburgess
Copy link
Contributor Author

Not sure what is going on with these tests, but it certainly couldn't be from a single annotation.

@kylekatarnls kylekatarnls changed the title Update Timestamp.php Add ReturnTypeWillChange to createFromTimestamp Feb 21, 2025
@kylekatarnls kylekatarnls added this to the 3.8.7 milestone Feb 21, 2025
@kylekatarnls kylekatarnls merged commit 47c0dd7 into CarbonPHP:master Feb 21, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants