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

[Serializer] Add datetimezone normalizer #30915

Merged
merged 1 commit into from Apr 6, 2019

Conversation

@jewome62
Copy link
Contributor

jewome62 commented Apr 6, 2019

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #30145
License MIT
Doc PR not yet

@nicolas-grekas nicolas-grekas added this to the next milestone Apr 6, 2019

@jewome62 jewome62 force-pushed the jewome62:datetimezone-normalizer branch 2 times, most recently from 7cd0682 to 0acbb15 Apr 6, 2019

@jewome62 jewome62 requested a review from dunglas as a code owner Apr 6, 2019

Show resolved Hide resolved src/Symfony/Component/Serializer/CHANGELOG.md Outdated
Show resolved Hide resolved src/Symfony/Component/Serializer/Normalizer/DateTimeZoneNormalizer.php Outdated
public function normalize($object, $format = null, array $context = [])
{
if (!$object instanceof \DateTimeZone) {
throw new InvalidArgumentException('The object must implement the "\DateTimeZone".');

This comment has been minimized.

Copy link
@xabbuh

xabbuh Apr 6, 2019

Member

The object must be an instance of "\DateTimeZone".

This comment has been minimized.

Copy link
@maidmaid

maidmaid Apr 6, 2019

Contributor

(Why this exception if supportsNormalization() guarantees that $object is an instance of DateTimeZone ?)

This comment has been minimized.

Copy link
@jewome62

jewome62 Apr 6, 2019

Author Contributor

I have reproduce the same test from DateTimeNormalizer and DateIntervalNormalizer
I think that's implemented if normalize is call without call support before

Show resolved Hide resolved src/Symfony/Component/Serializer/Normalizer/DateTimeZoneNormalizer.php Outdated
@xabbuh

xabbuh approved these changes Apr 6, 2019

@fabpot

fabpot approved these changes Apr 6, 2019

@fabpot fabpot force-pushed the jewome62:datetimezone-normalizer branch from fcb2c3c to 1546c0d Apr 6, 2019

@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Apr 6, 2019

Thank you @jewome62.

@fabpot fabpot merged commit 1546c0d into symfony:master Apr 6, 2019

1 of 3 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Apr 6, 2019

feature #30915 [Serializer] Add datetimezone normalizer (jewome62)
This PR was squashed before being merged into the 4.3-dev branch (closes #30915).

Discussion
----------

[Serializer] Add datetimezone normalizer

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30145
| License       | MIT
| Doc PR        | not yet

Commits
-------

1546c0d [Serializer] Add datetimezone normalizer

@jewome62 jewome62 deleted the jewome62:datetimezone-normalizer branch Apr 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.