File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,17 @@ the Finder instance.
53
53
:phpfunction: `iterator_to_array ` method, or get the number of items with
54
54
:phpfunction: `iterator_count `.
55
55
56
+ .. caution ::
57
+
58
+ When searching through multiple locations passed to the
59
+ :method: `Symfony\\ Component\\ Finder\\ Finder::in ` method, a separate iterator
60
+ is created internally for every location. This means we have multiple result
61
+ sets aggregated into one.
62
+ Since :phpfunction: `iterator_to_array ` uses keys of result sets by default,
63
+ when converting to an array, some keys might be duplicated and their values
64
+ overwritten. This can be avoided by passing ``false `` as a second parameter
65
+ to :phpfunction: `iterator_to_array `.
66
+
56
67
Criteria
57
68
--------
58
69
You can’t perform that action at this time.
0 commit comments