Bladeren bron

added note about traversable objects

Johannes 12 jaren geleden
bovenliggende
commit
b8d0072bac
1 gewijzigde bestanden met toevoegingen van 12 en 0 verwijderingen
  1. 12 0
      UPGRADING.md

+ 12 - 0
UPGRADING.md

@@ -14,6 +14,18 @@ Upgrading From 0.9 to 1.0
 
     Please see the documentation for how to set-up one of these.
 
+- Objects implementing Traversable
+
+    Objects that implement the Traversable interface are not automatically treated specially
+    anymore, but are serialized just like any regular object. If you would like to restore the
+    previous behavior, you can either add a custom handler, or force the serialization type 
+    to ``array`` using the ``@Type`` annotation (or its equivalent in XML/YML):
+
+    ```
+    /** @Type("array") */
+    private $myTraversableObject;
+    ```
+
 - Configuration
 
     Most of the configuration under ``jms_serializer.handlers`` is gone. The order is not