You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// > Expected a value to start with "foo_". Got: "bar_baz"
54
+
echo $exception->node()->messages()[0];
55
+
}
56
+
```
57
+
58
+
**Tree node API rework**
59
+
60
+
The class `\CuyZ\Valinor\Mapper\Tree\Node` has been refactored to remove access
61
+
to unwanted methods that were not supposed to be part of the public API. Below
62
+
are a list of all changes:
63
+
64
+
- New methods `$node->sourceFilled()` and `$node->sourceValue()` allow accessing
65
+
the source value.
66
+
67
+
- The method `$node->value()` has been renamed to `$node->mappedValue()` and
68
+
will throw an exception if the node is not valid.
69
+
70
+
- The method `$node->type()` now returns a string.
71
+
72
+
- The methods `$message->name()`, `$message->path()`, `$message->type()` and
73
+
`$message->value()` have been deprecated in favor of the new method
74
+
`$message->node()`.
75
+
76
+
- The message parameter `{original_value}` has been deprecated in favor of
77
+
`{source_value}`.
78
+
79
+
**Access removal of several parts of the library public API**
80
+
81
+
The access to class/function definition, types and exceptions did not add value
82
+
to the actual goal of the library. Keeping these features under the public API
83
+
flag causes more maintenance burden whereas revoking their access allows more
84
+
flexibility with the overall development of the library.
85
+
86
+
### ⚠ BREAKING CHANGES
87
+
88
+
* Filter userland exceptions to hide potential sensible data ([6ce1a4](https://github.com/CuyZ/Valinor/commit/6ce1a439adb1f6ee7e771fe02d454aa91e7b320f))
89
+
* Refactor tree node API ([d3b1dc](https://github.com/CuyZ/Valinor/commit/d3b1dcb64ec561cdedffe5ca779341fc9452a858))
90
+
* Remove API access from several parts of library ([316d91](https://github.com/CuyZ/Valinor/commit/316d91910d289780a7b791f17b958eae264a6296))
0 commit comments