From 05e38eadbeb3de19e5b26003c2b401e00bb71df4 Mon Sep 17 00:00:00 2001 From: polo Date: Sun, 18 Oct 2026 00:08:23 +0200 Subject: =?UTF-8?q?sortie=20de=20vendor=20du=20d=C3=A9p=C3=B4t,=20oubli=20?= =?UTF-8?q?dans=20config-template.ini?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../doctrine/collections/docs/en/serialization.rst | 29 ---------------------- 1 file changed, 29 deletions(-) delete mode 100644 vendor/doctrine/collections/docs/en/serialization.rst (limited to 'vendor/doctrine/collections/docs/en/serialization.rst') diff --git a/vendor/doctrine/collections/docs/en/serialization.rst b/vendor/doctrine/collections/docs/en/serialization.rst deleted file mode 100644 index be53d6e..0000000 --- a/vendor/doctrine/collections/docs/en/serialization.rst +++ /dev/null @@ -1,29 +0,0 @@ -Serialization -============= - -Using (un-)serialize() on a collection is not a supported use-case -and may break when changes on the collection's internals happen in the future. -If a collection needs to be serialized, use ``toArray()`` and reconstruct -the collection manually. - -.. code-block:: php - - $collection = new ArrayCollection([1, 2, 3]); - $serialized = serialize($collection->toArray()); - -A reconstruction is also necessary when the collection contains objects with -infinite recursion of dependencies like in this ``json_serialize()`` example: - -.. code-block:: php - - $foo = new Foo(); - $bar = new Bar(); - - $foo->setBar($bar); - $bar->setFoo($foo); - - $collection = new ArrayCollection([$foo]); - $json = json_serialize($collection->toArray()); // recursion detected - -Serializer libraries can be used to create the serialization-output to prevent -errors. -- cgit v1.2.3