From 5a6b592924a752db75e900446903b30d0505d3ed Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sun, 10 Dec 2023 15:59:43 +0100 Subject: [PATCH] Container::getComponents() parameters are silently deprecated --- src/ComponentModel/Container.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ComponentModel/Container.php b/src/ComponentModel/Container.php index b141081..33322ab 100644 --- a/src/ComponentModel/Container.php +++ b/src/ComponentModel/Container.php @@ -180,9 +180,10 @@ protected function createComponent(string $name): ?IComponent * Returns array of components. * @return iterable */ - final public function getComponents(bool $deep = false, ?string $filterType = null): iterable + final public function getComponents(): iterable { - if ($deep) { + $filterType = func_get_args()[1] ?? null; + if (func_get_args()[0] ?? null) { $iterator = new RecursiveComponentIterator($this->components); $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST); if ($filterType) {