Skip to content

[Clock] Document createFromTimestamp() method #19768

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

Merged
merged 1 commit into from
Apr 10, 2024
Merged

[Clock] Document createFromTimestamp() method #19768

merged 1 commit into from
Apr 10, 2024

Conversation

javiereguiluz
Copy link
Member

Fixes #19766

@javiereguiluz
Copy link
Member Author

@xabbuh thanks for your review and I'm sorry for these gross mistakes. I was in a rush and I committed without a proper review first. Everything is fixed now. Thanks!

@derrabus
Copy link
Member

Thank you for your work on this, @javiereguiluz!

I think, it is worth mentioning that this method is part of a set of (more undocumented) polyfills. The createFromTimestamp() method will be added to DateTimeImmutable (and thus to our DatePoint class as well) in PHP 8.4. My polyfill makes this functionality available on PHP 8.2 already. The other polyfilled methods that have existed before my PR already are setMicrosecond() and getMicrosecond(), both added by @nicolas-grekas in symfony/symfony#53942.

@javiereguiluz javiereguiluz merged commit 7eb958f into 7.1 Apr 10, 2024
@javiereguiluz javiereguiluz deleted the fix_19766 branch April 10, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Clock] Add a polyfill for DateTimeImmutable::createFromTimestamp()
4 participants