[ObjectMapper] Add MappingException, MapCollection and MapTree attributes

by @devoton

Some issues have been detected in this pull request

0
Coding Standard

0
Common Typos

0
License Headers

Issues that cannot be fixed automatically

in Pull Request Description
  • You must add the standard Symfony pull request contribution header in the description (see https://symfony.com/doc/current/contributing/code/patches.html#make-a-pull-request).

0
File Permissions

0
Merge Commits

0
Exception Messages Formatting

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/60432/d9e872da04f93a7ae4615c16da719550c6daa4f6/void_in_tests.diff | patch -p0
diff -ru src/Symfony/Component/ObjectMapper/Tests/MapCollectionTest.php src/Symfony/Component/ObjectMapper/Tests/MapCollectionTest.php
--- src/Symfony/Component/ObjectMapper/Tests/MapCollectionTest.php	2025-05-16 08:18:15.814351408 +0000
+++ src/Symfony/Component/ObjectMapper/Tests/MapCollectionTest.php	2025-05-16 08:18:17.212354280 +0000
@@ -19,7 +19,7 @@
 
 class ObjectMapperCollectionTreeTest extends TestCase
 {
-    public function testMapCollectionOfObjects(): void
+    public function testMapCollectionOfObjects()
     {
         $mapper = new ObjectMapper();
         $source = new SourceWithCollection([
@@ -37,7 +37,7 @@
         $this->assertEquals('B', $result->items[1]->label);
     }
 
-    public function testMapTreeStructure(): void
+    public function testMapTreeStructure()
     {
         $source = new SourceNode('Root', [
             new SourceNode('Child 1'),

0
Use ::class whenever possible

0
Deprecation Messages