Valinor/tests/Unit/Mapper/Tree
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
..
Builder misc: raise PHPStan version 2021-12-31 13:30:14 +01:00
Message feat: introduce helper class MessagesFlattener 2022-01-06 14:11:42 +01:00
Visitor feat: initial release 2021-11-28 18:21:56 +01:00
NodeTest.php feat!: wrap node messages in proper class 2022-01-06 14:11:42 +01:00
NodeTraverserTest.php feat: introduce helper NodeTraverser for recursive operations on nodes 2022-01-06 14:11:42 +01:00
ShellTest.php test: improve FakeType and introduce FakeNode 2022-01-06 14:11:42 +01:00