I have a Class that implements \Iterator
, so I can use it in a foreach loop.
But during serialization, I want Symfony to serialize it as it is (without some Properties, that I ignore with AbstractNormalizer::IGNORED_ATTRIBUTES
).
Before adding \Iterator
, everything worked as expected.
But now, it fails to do that because of a supportsNormalization()
in AbstractObjectNormalizer
check.
How can I get back the previous behaviour without having to remove the Interface?
Thank you!