contributte / forms-multiplier

:repeat: Form multiplier & replicator for Nette Framework
https://contributte.org/packages/contributte/forms-multiplier.html
MIT License
26 stars 21 forks source link

Fix compatibility with nette/forms 3.2.3 #107

Closed jtojnar closed 5 months ago

jtojnar commented 5 months ago

https://github.com/nette/forms/commit/e227d87d2ef42f5f9368256dd8719807a16bb49e added an extra argument.

While at it, let’s also narrow the $values argument type to match Container::setValues.

This change remains compatible with nette/forms 3.2.2.

Fixes: https://github.com/contributte/forms-multiplier/issues/105

jtojnar commented 5 months ago

Looks like tests now fail with nette/application 3.2.3:

  [Nette\InvalidStateException] Unable to create link to other presenter, service PresenterFactory or Router has not been set.  

#1  /home/runner/work/forms-multiplier/forms-multiplier/vendor/nette/application/src/Application/UI/Presenter.php:1172
#2  /home/runner/work/forms-multiplier/forms-multiplier/vendor/nette/application/src/Application/UI/Component.php:293
#3  /home/runner/work/forms-multiplier/forms-multiplier/vendor/nette/application/src/Application/UI/Link.php:87
#4  /home/runner/work/forms-multiplier/forms-multiplier/vendor/nette/utils/src/Utils/Html.php:809
#5  /home/runner/work/forms-multiplier/forms-multiplier/vendor/nette/utils/src/Utils/Html.php:749
#6  /home/runner/work/forms-multiplier/forms-multiplier/vendor/nette/forms/src/Forms/Rendering/DefaultFormRenderer.php:184
#7  /home/runner/work/forms-multiplier/forms-multiplier/vendor/nette/forms/src/Forms/Rendering/DefaultFormRenderer.php:133
#8  /home/runner/work/forms-multiplier/forms-multiplier/vendor/nette/forms/src/Forms/Form.php:725
#9  /home/runner/work/forms-multiplier/forms-multiplier/vendor/latte/latte/src/Latte/Engine.php(218) : eval()'d code:22
#10 /home/runner/work/forms-multiplier/forms-multiplier/vendor/latte/latte/src/Latte/Runtime/Template.php:158

Downgrading to 3.2.2 with composer require nette/application 3.2.2 fixes the error.

I bisected the issue to https://github.com/nette/application/commit/850ab85554db7ab988ffe149f06117f418a4b68a, it affects testing-helpers. Edit: Released https://github.com/WebChemistry/testing-helpers/releases/tag/4.1.0