Hi, I would like to ask why `unset` is used when collection items are removed (e.g. https://github.com/doctrine/collections/blob/master/lib/Doctrine/Common/Collections/ArrayCollection.php#L150). Is it required for other functions in Doctrine to work?
The issue with `unset` is, that it leaves a "hole" in the array. This is no problem when you work with PHP. But when you are working with serialization (JSON) and Javascript in the frontend. This is a pain, because an PHP array that is missing one element, will be encoded as a JSON object instead of an array. And in the frontend where you work with Javascript, things like collection.map will fail because an object does not have `map`. -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/doctrine-user/49879c7c-17f7-43ff-8f71-c5ed67af2c48%40googlegroups.com.
