This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony
Nicolas Grekas 53dc781814 minor #34340 Allow returning null from NormalizerInterface::normalize (teohhanhui)
This PR was merged into the 3.4 branch.

Discussion
----------

Allow returning null from NormalizerInterface::normalize

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

Looking at the code, it seems that a normalizer might be called with a `null` value for `$data`, and thus it's only sensible that it be allowed to return `null` too:

7064ff35f2/src/Symfony/Component/Serializer/Serializer.php (L141-L148)

Updating the phpdoc to match.

Commits
-------

1c8edc55ad Allow returning null from NormalizerInterface::normalize
2019-11-13 08:26:33 +01:00
..
Bridge Remove unused local variables in tests 2019-10-24 17:33:53 +02:00
Bundle Avoid using of kernel after shutdown 2019-11-03 20:32:26 +01:00
Component minor #34340 Allow returning null from NormalizerInterface::normalize (teohhanhui) 2019-11-13 08:26:33 +01:00