- Issue created by @longwave
- First commit to issue fork.
- Status changed to Needs review
5 months ago 6:10am 1 April 2024 - 🇮🇳India immaculatexavier
To improve efficiency and readability, the delegateMethod() function in FieldItemList could be updated to utilize argument unpacking.
protected function delegateMethod($method, ...$args) { return array_map(fn($item) => $item->{$method}(...$args), $this->list); }
This updated implementation takes advantage of argument unpacking (...$args) to pass arguments to the method $method for each item in the list using array mapping. This approach is both efficient and concise.
Create MR for the same. Kindly review and let me know your comments.
- Status changed to RTBC
5 months ago 10:08am 1 April 2024 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
Committed and pushed a73384d861 to 11.x and fc9048900d to 10.3.x. Thanks!
-
alexpott →
committed fc904890 on 10.3.x
Issue #3437286 by immaculatexavier, longwave: Use argument unpacking in...
-
alexpott →
committed fc904890 on 10.3.x
- Status changed to Fixed
5 months ago 11:32am 1 April 2024 -
alexpott →
committed a73384d8 on 11.x
Issue #3437286 by immaculatexavier, longwave: Use argument unpacking in...
-
alexpott →
committed a73384d8 on 11.x
-
alexpott →
committed 1859406c on 11.x
Revert "Issue #3437286 by immaculatexavier, longwave: Use argument...
-
alexpott →
committed 1859406c on 11.x
-
alexpott →
committed c01845e4 on 10.3.x
Revert "Issue #3437286 by immaculatexavier, longwave: Use argument...
-
alexpott →
committed c01845e4 on 10.3.x
- Status changed to Needs work
5 months ago 1:33pm 1 April 2024 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
Reverted - this caused problems in contrib see 📌 Adjust for argument unpacking in FieldItemList::delegateMethod() Active