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

Carbon is not mandatory, we can use php DateTime objects #115

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

stephpy
Copy link
Contributor

@stephpy stephpy commented Dec 20, 2023

Hello,

Carbon should not be a mandatory requirements since PHP provides DateTimeInterface since php >5.5

I let a test with your carbon implementation to prove it.

This version of carbon has itself some requirements (Symfony <7.0) which makes me unconfortable that's why I checked if it's really needed here. It's not the case.

Regards

@rubenvanassche
Copy link
Member

Take a look at TimezoneRangeCollection it still has Carbon instances

@stephpy
Copy link
Contributor Author

stephpy commented Dec 21, 2023

I'm sorry... It was a big mistake ...

I replaced it with Backward Compatibility.

Not sure it's a good idea to let the test with Carbon implementation because here we don't use any specific carbon feature since i replaced Carbon::minValue Carbon::maxValue by private methods which reproduce Carbon implementation.

Just say me if you want me to delete the test with Carbon implementation.

src/Timezones/TimezoneRangeCollection.php Outdated Show resolved Hide resolved
src/Timezones/TimezoneRangeCollection.php Outdated Show resolved Hide resolved
@rittou
Copy link

rittou commented Jan 3, 2024

@freekmurze, I hope you had a great holiday!
I just wanted to know if we can speed up this PR.

@rittou
Copy link

rittou commented Jan 22, 2024

Sorry, but anyone is here? 🆘

@Isengo1989
Copy link

Any news here?

@stephpy - seems like you resolved the two raised issues from @freekmurze but not import the namespace / switch from private to protected?

@stephpy
Copy link
Contributor Author

stephpy commented Feb 13, 2024

@Isengo1989 I did both :)

@rubenvanassche
Copy link
Member

Thanks!

@rubenvanassche rubenvanassche merged commit 19c6732 into spatie:main Feb 14, 2024
8 of 9 checks passed
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.

None yet

5 participants