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

[12.x] chore: remove support for Carbon v2 #53825

Merged
merged 2 commits into from
Dec 11, 2024
Merged

Conversation

calebdw
Copy link
Contributor

@calebdw calebdw commented Dec 10, 2024

Hello!

This removes support for Carbon v2 and cleans up the addReal* methods to use the add* equivalents.

Thanks!

@crynobone
Copy link
Member

crynobone commented Dec 10, 2024

addReal* was deprecated in Carbon 3.2 but should still work: briannesbitt/Carbon@a6e64c7

It might be best to target master branch for v12 and remove support for Carbon 2

@kylekatarnls does it make more sense to change to addUtcMinutes() instead of addMinutes()?

@crynobone crynobone marked this pull request as draft December 10, 2024 08:09
@calebdw calebdw changed the base branch from 11.x to master December 10, 2024 13:41
@calebdw calebdw changed the title [11.x] fix: remove carbon addReal* methods [12.x] fix: remove deprecated carbon addReal* methods Dec 10, 2024
@calebdw calebdw changed the title [12.x] fix: remove deprecated carbon addReal* methods [12.x] chore: remove support for Carbon v2 Dec 10, 2024
@calebdw
Copy link
Contributor Author

calebdw commented Dec 10, 2024

Ah, PHPStan was complaining about the methods not existing and I missed the dynamic addRealUnit method

@kylekatarnls
Copy link
Contributor

kylekatarnls commented Dec 11, 2024

Hello, use addMinutes(), the UTC prefix would make a difference only for day units and above and only if there is a daylight saving time in the range.

In older versions of PHP there were some bug also during DST when adding hours/minutes, but nowadays, it's behaving in a consistent manner.

@crynobone crynobone marked this pull request as ready for review December 11, 2024 09:32
@crynobone
Copy link
Member

Thanks @kylekatarnls

@taylorotwell taylorotwell merged commit c267676 into laravel:master Dec 11, 2024
38 checks passed
@calebdw calebdw deleted the carbon branch December 11, 2024 16:59
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.

4 participants