Closed joshystuart closed 10 years ago
Yep, that's fine. I was trying to use the metadata methods defined in doctrine-common
where I could rather than directly touching the metadata array. However, it doesn't seem to work all the time. The addition is good, and means that the else
can be deleted, because execution will never get there: https://github.com/crimsonronin/shard/blob/f95b5b2a67c7e3cc74181f778c2a1dc524b64510/lib/Zoop/Shard/Serializer/Unserializer.php#L237
I'm not sure why this is happening (ie. the root cause), however when I have an
EmbedMany
with adiscriminatorMap
, and those classes inherit from an abstract class which also has anembed
, I get the following error:See https://github.com/crimsonronin/shard/blob/f95b5b2a67c7e3cc74181f778c2a1dc524b64510/tests/Zoop/Shard/Test/Serializer/TestAsset/Document/Order/Order.php#L35
Adding the following to
Unserializer
fixes the issue:Not sure if this is just a bandaid, or the proper fix. Any suggestions @superdweebie?