contributte / forms-multiplier

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

[v4] Fix compatibility with nette/forms 3.2.3 #108

Closed jtojnar closed 2 months ago

jtojnar commented 2 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.

Backports #107

radimvaculik commented 2 months ago

@jtojnar Hi, can you make PR green? Thanks.

jtojnar commented 2 months ago

It is planned but I have not gotten around to it yet.

The PHPStan issue can be easily fixed by a cast – I verified that FileUpload cannot be returned with the arguments we pass to the method.

But I still need to debug the other test failure. I suspect it is caused by some BC break in Latte:

[Latte\CompileException] Unexpected tag {form}, did you mean {for}? (in '.../templates/group.latte' on line 1 at column 1)  
jtojnar commented 2 months ago

I have bisected the Latte failure to https://github.com/nette/application/commit/1aba9da661b7b198c222d6bab6e69f4b0ef3879b and resolved it in https://github.com/WebChemistry/testing-helpers/pull/13.

radimvaculik commented 2 months ago

@jtojnar Nice job, mate! 👏