Przeglądaj źródła

Fix doctrine persistent collections not serializing

The problem was that the collection handler was only dealing with ArrayCollection
Baldur Rensch 12 lat temu
rodzic
commit
f236e2e03c
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      Serializer/Handler/ArrayCollectionHandler.php

+ 1 - 1
Serializer/Handler/ArrayCollectionHandler.php

@@ -17,7 +17,7 @@ class ArrayCollectionHandler implements SubscribingHandlerInterface
     {
         $methods = array();
         $formats = array('json', 'xml', 'yml');
-        $collectionTypes = array('ArrayCollection', 'Doctrine\Common\Collections\ArrayCollection');
+        $collectionTypes = array('ArrayCollection', 'Doctrine\Common\Collections\ArrayCollection', 'Doctrine\ORM\PersistentCollection');
 
         foreach ($collectionTypes as $type) {
             foreach ($formats as $format) {