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

[Form][DateTimeImmutableToDateTimeTransformer] Preserve microseconds and use \DateTime::createFromImmutable() when available #33885

Merged

Conversation

@fancyweb
Copy link
Contributor

commented Oct 7, 2019

Q A
Branch? 4.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

For PHP >= 7.3, we should use \DateTime::createFromImmutable() directly.

This patch also preserves the \DateTime microseconds when the conversion is done with \DateTime::createFromFormat().

…and use \DateTime::createFromImmutable() when available
@fancyweb fancyweb force-pushed the fancyweb:form-fix-dti-to-dt-transformer branch from 84f05f2 to dfa2303 Oct 7, 2019
@nicolas-grekas nicolas-grekas added this to the 4.3 milestone Oct 8, 2019
@nicolas-grekas

This comment has been minimized.

Copy link
Member

commented Oct 8, 2019

Thank you @fancyweb.

nicolas-grekas added a commit that referenced this pull request Oct 8, 2019
…croseconds and use \DateTime::createFromImmutable() when available (fancyweb)

This PR was merged into the 4.3 branch.

Discussion
----------

[Form][DateTimeImmutableToDateTimeTransformer] Preserve microseconds and use \DateTime::createFromImmutable() when available

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

For PHP >= 7.3, we should use [\DateTime::createFromImmutable()](https://www.php.net/manual/en/datetime.createfromimmutable.php) directly.

This patch also preserves the `\DateTime` microseconds when the conversion is done with `\DateTime::createFromFormat()`.

Commits
-------

dfa2303 [Form][DateTimeImmutableToDateTimeTransformer] Preserve microseconds and use \DateTime::createFromImmutable() when available
@nicolas-grekas nicolas-grekas merged commit dfa2303 into symfony:4.3 Oct 8, 2019
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details
@fancyweb fancyweb deleted the fancyweb:form-fix-dti-to-dt-transformer branch Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.