minor #25846 [Serializer] Fix undefined class (chalasr)

This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] Fix undefined class

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

bad merge

Commits
-------

bc7b5d2 [Serializer] fix undefined class
This commit is contained in:
Robin Chalas 2018-01-19 12:28:17 +01:00
commit d2a316f0db

View File

@ -84,7 +84,7 @@ class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface
$timezone = $this->getTimezone($context);
if ('' === $data || null === $data) {
throw new UnexpectedValueException('The data is either an empty string or null, you should pass a string that can be parsed with the passed format or a valid DateTime string.');
throw new NotNormalizableValueException('The data is either an empty string or null, you should pass a string that can be parsed with the passed format or a valid DateTime string.');
}
if (null !== $dateTimeFormat) {