Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel Deprecated error(s) on fresh install w/ PHP 8.4 #11305

Closed
danielfowler opened this issue Dec 27, 2024 · 1 comment
Closed

Laravel Deprecated error(s) on fresh install w/ PHP 8.4 #11305

danielfowler opened this issue Dec 27, 2024 · 1 comment

Comments

@danielfowler
Copy link

danielfowler commented Dec 27, 2024

Bug description

I'm running PHP 8.4 w/ Laravel Herd on a Windows 11 PC. On one fresh/blank Statamic install and two other v5 sites I'm getting this Laravel error across the top of every page:

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 D:\Websites\cast98\vendor\nesbot\carbon\src\Carbon\Traits\Timestamp.php on line 29

If I switch to PHP 8.3, the error goes away. Before doing that, I did run composer update which didn't affect the error.

There's also a slew of PHP Deprecation errors/warnings in my CLI which also running PHP 8.4.2 but I think that's out of scope for you gents.

How to reproduce

  1. Install PHP 8.4
  2. Run statamic new
  3. Open local site in browser

Logs

No response

Environment

Environment
Application Name: Cast98
Laravel Version: 11.36.1
PHP Version: 8.4.2
Composer Version: 2.8.3
Environment: local
Debug Mode: ENABLED
URL: cast98.test
Maintenance Mode: OFF
Timezone: America/New_York
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 0
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 5.45.0 PRO

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

@duncanmcclean
Copy link
Member

Unfortunatley, we can't upgrade to Carbon 3 without making breaking changes so that'll need to wait for Statamic 6. You can either downgrade to PHP 8.3 or hide any deprecation warnings.

There's some more context on the PHP 8.4 PR.

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

No branches or pull requests

2 participants