File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 3
3
All notable changes to this project will be documented in this file. This project adheres to
4
4
[ Semantic Versioning] ( http://semver.org/ ) and [ this changelog format] ( http://keepachangelog.com/ ) .
5
5
6
+ ## Unreleased
7
+
8
+ ### Fixed
9
+
10
+ - [ laravel #287 ] ( https://github.com/laravel-json-api/laravel/issues/287 ) Use ` array_shift ` to avoid potential problem
11
+ introduced in Laravel.
12
+
6
13
## [ 3.0.0] - 2023-02-14
7
14
8
15
### Changed
Original file line number Diff line number Diff line change @@ -114,13 +114,15 @@ public function getIterator(): Traversable
114
114
$ failed = $ this ->failed ();
115
115
116
116
foreach ($ this ->validator ->errors ()->messages () as $ key => $ messages ) {
117
- $ failures = $ this ->translator ->validationFailures ($ failed [$ key ] ?? []);
117
+ $ failures = $ this ->translator
118
+ ->validationFailures ($ failed [$ key ] ?? [])
119
+ ->all ();
118
120
119
121
foreach ($ messages as $ message ) {
120
122
yield $ this ->createError (
121
123
$ key ,
122
124
$ message ,
123
- $ failures-> shift ( ) ?: []
125
+ array_shift ( $ failures ) ?: [],
124
126
);
125
127
}
126
128
}
You can’t perform that action at this time.
0 commit comments