Commit 7a702b1
committed
Multiplier::validate(): Filter out non-validatable components
45ed76a started filtering components
to `Control`s, to appease PHPStan, since `Container::validate()` only
accepted `Control[]`. But `Multiplier` does not actually have `Control`s
as direct children (other than the ‘Add’ `Submitter`s), so it would stop
validating and filtering multiplied controls.
a5a7348 reverted that part but kept
the incorrect phpdoc type cast.
Now, it works without the filter because `Container::validate()` already
ignores non-validatable components but we should still respect its contract.
Let’s filter the components before passing them down. This will also
allow us to drop the lying phpdoc type cast.
nette/forms 3.2.2 updated its phpdoc param type to allow that:
nette/forms@64376711 parent 71cc347 commit 7a702b1
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | | - | |
| 173 | + | |
175 | 174 | | |
176 | 175 | | |
177 | 176 | | |
| |||
0 commit comments