Valinor/tests/Unit/Mapper/Tree/Message
Romain Canon a97b406154 feat: introduce helper class MessagesFlattener
Will recursively flatten messages of a node and all its children.

This helper can for instance be used when errors occurred during a
mapping to flatten all caught errors into a basic array of string that
can then easily be used to inform the user of what is wrong.

```
try {
    // …
} catch(MappingError $error) {
    $messages = (new MessagesFlattener($error->node()))->errors();

    foreach ($messages as $message) {
        echo $message;
    }
}
```
2022-01-06 14:11:42 +01:00
..
Formatter feat: introduce helper class MessageMapFormatter 2022-01-06 14:11:42 +01:00
MessagesFlattenerTest.php feat: introduce helper class MessagesFlattener 2022-01-06 14:11:42 +01:00
NodeMessageTest.php feat!: wrap node messages in proper class 2022-01-06 14:11:42 +01:00
ThrowableMessageTest.php feat!: wrap node messages in proper class 2022-01-06 14:11:42 +01:00