Skip to content

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

@danielfowler

Description

@danielfowler

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions