[Serializer] Add an option to the `XmlEncoder` allowing to decode tags as collection

by @AlexandreGerault

Some issues have been detected in this pull request

0
Coding Standard

0
Common Typos

0
License Headers

0
Pull Request Contributor Headers

0
File Permissions

0
Merge Commits

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/symfony/58604/61ee9c87f3cf25785777bd8221bb39be95657b27/exception_messages.diff | patch -p0
diff -ru src/Symfony/Component/Serializer/Encoder/XmlEncoder.php src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
--- src/Symfony/Component/Serializer/Encoder/XmlEncoder.php	2024-10-30 22:18:58.109133477 +0000
+++ src/Symfony/Component/Serializer/Encoder/XmlEncoder.php	2024-10-30 22:19:04.442357769 +0000
@@ -423,7 +423,7 @@
             return $this->appendNode($parentNode, $data, $format, $context, 'data');
         }
 
-        throw new NotEncodableValueException('An unexpected value could not be serialized: '.(!\is_resource($data) ? var_export($data, true) : \sprintf('%s resource', get_resource_type($data))));
+        throw new NotEncodableValueException('An unexpected value could not be serialized: '.(!\is_resource($data) ? var_export($data, true) : \sprintf('"%s" resource', get_resource_type($data))));
     }
 
     /**

0
Usage of void in test files

0
Use ::class whenever possible

0
Deprecation Messages