Skip to content

Commit

Permalink
minor #18584 [Serializer] Remove dead code (theofidry)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] Remove dead code

| Q             | A
| ------------- | ---
| Branch?       | 2.7+
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | none

The deleted lines are the exact equivalent of L249-251. It looks like this is due from a bad merged when the (de)normalization cache has been removed.

Commits
-------

31c530a Remove dead code
  • Loading branch information
fabpot committed Apr 19, 2016
2 parents 44efeaa + 31c530a commit c848f88
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/Symfony/Component/Serializer/Serializer.php
Expand Up @@ -250,15 +250,6 @@ private function denormalizeObject($data, $class, $format, array $context = arra
return $normalizer->denormalize($data, $class, $format, $context);
}

foreach ($this->normalizers as $normalizer) {
if (
$normalizer instanceof DenormalizerInterface &&
$normalizer->supportsDenormalization($data, $class, $format)
) {
return $normalizer->denormalize($data, $class, $format, $context);
}
}

throw new UnexpectedValueException(sprintf('Could not denormalize object of type %s, no supporting normalizer found.', $class));
}

Expand Down

0 comments on commit c848f88

Please sign in to comment.