-
Notifications
You must be signed in to change notification settings - Fork 27
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
Allow Carbon 2.0 #4
Comments
Tests on Carbon 2 are not passing, that's maybe why Laravel is still locked on 1.26+, right?
|
On Laravel 5.7 we still have a failing test:
|
I think Carbon fixed the serialization, so that it always serializes to ISO8106? |
The test in this library should be changed :) |
Just sent a PR to add that very same fix to 1.33+ |
Yeah, but only if Laravel moves to 2.1+, because in 1.33 serialization is still returning an array, which is odd... |
Thanks What if the test allows either array or string? Then it can support both 1.x and 2.x? |
Hi, Carbon 2 now gives a string as JSON, but it can be configured, see: https://carbon.nesbot.com/docs/#api-carbon-2 It's a major version, it has major changes. But for Carbon 2, they a should not be a big deal to adapt to, just follow this part of the documentation. Laravel is not "locked", only 5.6 has 1.26 for stability reason, Laravel 5.7 allows 1.x and Laravel 5.8 should allows Carbon 2. We have an open pull-request for that and have to take the right decision about how to integrate it properly, and also allow CarbonImmutable easily in Laravel. So I agree @ruudk, allow 1 and 2 using json settings to get the same output or simply allow both would be wise. |
My hands are kind of tied here, because this package is Laravel Collections extracted, it is supposed to be the exact same you get on Laravel. Extraction is even automated by https://github.com/antonioribeiro/ia-collection/blob/master/upgrade.sh, so unless they fix/upgrade Carbon stuff, there's nothing I can do. |
This will pass if this is merged: laravel/framework#25320 |
@ruudk PR was merged by @kylekatarnls (thank you!), but you'll still have to wait for Carbon 1.34 to be tagged. |
Thanks both! I'll wait for the tag :) |
1.34 is released. |
This library is locked to Carbon 1.22. It contains an annoying
JsonSerializable
interface that conflicts with my editor. This has been fixed in 2.1 (briannesbitt/Carbon@20d3f33#diff-c958cc2b645be4b72d33e0d6dd23c070)The text was updated successfully, but these errors were encountered: