Skip to content

v3.2.1

Latest

Choose a tag to compare

@mlutonsky mlutonsky released this 13 Oct 12:51
· 1 commit to master since this release

Fixed

  • getValues('array') and getUntrustedValues('array') of a Nette form are array<mixed>

nette/forms 3.3 describes the return type of these methods by a condition that tests a class name before the string 'array'. PHPStan cannot rule out that 'array' names a class, so it typed the values array|array<mixed> with an object in it, and every read of a key failed with offsetAccess.nonOffsetAccessible. FormValuesArrayReturnTypeExtension answers array<mixed> for 'array' and leaves every other call to the PHPDoc.

Projects on nette/forms 3.1 or 3.2 see no change.

Full Changelog: v3.2.0...v3.2.1