-
-
Notifications
You must be signed in to change notification settings - Fork 554
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
[5.x] Carbon 3 #11348
[5.x] Carbon 3 #11348
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep this targeting master.
If someone does a composer update
and unintentionally upgrades to Carbon 3, there might be some breaking changes they'd need to deal with.
Changed the target branch back to I've kept the Carbon v2 logic for now as Laravel 11 supports it alongside v3. We can probably remove it in Statamic 7? |
Yup keeping v2 is good 👌 |
Until we merge #11348, then we don't need to pretend anymore.
What's a bit annoying in v5 are these deprecation warnings on composer update/install with PHP 8.4:
With Carbon v3 they're gone. |
I think we'll probably get rid of Carbon 2 in v6 after all. |
This reverts commit afd141c.
Until we merge #11348, then we don't need to pretend anymore.
They are now also removed in Carbon 2.73.0. Just doing a composer update should resolve them. |
Yes, I noticed this yesterday on a composer update. Thanks! A related issue is with Maybe you've a look and it's solvable with just bumping the version to v3.0. UPDATE As I wanted to provide a pull request for the issue, I noticed that the package ANOTHER UPDATE Created a PR (rebing/graphql-laravel#1165) on |
Yes, we're aware about the |
All the "ago" modifiers should have also had absolutes applied to them. e.g. If you did But those modifiers are pretty awkward for the same reasons I'm sure they made those changes in Carbon itself. For Statamic 6 we should probably just have those output the values Carbon now gives us, as a breaking change. e.g. In the tests I've added comments for the real values. The assertions can be tweaked to use those. |
@duncanmcclean thanks for the PR on this. Now all deprecation warnings in PHP 8.4 are finally gone 👍 |
This pull request adds support for Carbon 3, allowing us to support Laravel 12 when it's released.
While Statamic 5 is backwards compatible with Carbon 2, you might find that Carbon 3 is installed as a result of this update. If you'd rather stay with Carbon 2, you may require it using Composer: