Hi,
forms-wizard 4.1.0 is incompatible with nette/component-model v4.0. In v4 the getComponents() filter/recursive arguments were removed — passing them no longer just warns, it throws Nette\DeprecatedException:
Container::getComponents() parameters removed. The method now takes no arguments and returns a plain array of immediate children (previously iterable). The old recursive flag and filter-type argument are gone — passing them throws a DeprecatedException. For recursive traversal use getComponentTree() instead.
Wizard::applyCallbacksToButtons() still calls the old signature, so any wizard throws at render time:
// src/Wizard.php:368
foreach ($form->getComponents(false, SubmitButton::class) as $control) {
|
foreach ($form->getComponents(false, SubmitButton::class) as $control) { |
Composer installs v4 silently, because the only constraint is conflict: "nette/component-model": "<3.0.3" (no upper bound).
Suggested fix — call getComponents() with no arguments and filter with instanceof (works on both v3 and v4):
foreach ($form->getComponents() as $control) {
if (!$control instanceof SubmitButton) {
continue;
}
// …
}
Environment: forms-wizard 4.1.0, nette/component-model 4.0.1, PHP 8.3.
Hi,
forms-wizard 4.1.0 is incompatible with nette/component-model v4.0. In v4 the getComponents() filter/recursive arguments were removed — passing them no longer just warns, it throws Nette\DeprecatedException:
Container::getComponents() parameters removed. The method now takes no arguments and returns a plain array of immediate children (previously iterable). The old recursive flag and filter-type argument are gone — passing them throws a DeprecatedException. For recursive traversal use getComponentTree() instead.
Wizard::applyCallbacksToButtons() still calls the old signature, so any wizard throws at render time:
// src/Wizard.php:368
foreach ($form->getComponents(false, SubmitButton::class) as $control) {
forms-wizard/src/Wizard.php
Line 368 in 37fc489
Composer installs v4 silently, because the only constraint is conflict: "nette/component-model": "<3.0.3" (no upper bound).
Suggested fix — call getComponents() with no arguments and filter with instanceof (works on both v3 and v4):
Environment: forms-wizard 4.1.0, nette/component-model 4.0.1, PHP 8.3.