Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4] FIX compile error #102

Merged
merged 6 commits into from
Mar 20, 2024
Merged

[v4] FIX compile error #102

merged 6 commits into from
Mar 20, 2024

Conversation

jtojnar
Copy link
Collaborator

@jtojnar jtojnar commented Mar 20, 2024

PHP 8.2
Declaration of Contributte\FormMultiplier\Multiplier::setValues($values, bool $erase = false): Contributte\FormMultiplier\Multiplier must be compatible with Nette\Forms\Container::setValues(object|array $data, bool $erase = false): static

(cherry picked from commit 9b4e600)

MikKuba and others added 3 commits March 20, 2024 09:16
PHP 8.2
Declaration of Contributte\FormMultiplier\Multiplier::setValues($values, bool $erase = false): Contributte\FormMultiplier\Multiplier must be compatible with Nette\Forms\Container::setValues(object|array $data, bool $erase = false): static

(cherry picked from commit 9b4e600)
`Container::getComponents()` returns array when `$deep` is false (by default):
nette/component-model@7f613ee

The method also no longer takes any arguments:
nette/component-model@4e0946a

(cherry picked from commit ccf29ba)
@jtojnar jtojnar force-pushed the backport-php83-fix branch from 5337806 to f3a0afb Compare March 20, 2024 09:17
@jtojnar
Copy link
Collaborator Author

jtojnar commented Mar 20, 2024

Not sure why the code coverage segfaults but tests pass now.

@jtojnar jtojnar mentioned this pull request Mar 20, 2024
src/Multiplier.php Outdated Show resolved Hide resolved
jtojnar added 3 commits March 20, 2024 23:12
Partly reverts the parent commit.
This fixes the following PHPStan errors:

  280    Method Contributte\FormMultiplier\Multiplier::getValues() has parameter $returnType with no type specified.
  290    No error to ignore is reported on line 290.

(cherry picked from commit 42e1ced)

We are not cherry-picking the nette/forms bump.

Fix coding style

(cherry picked from commit f7ebe4d)
nette/component-model 3.1.0 made the type annotations more precise,
correctly declaring that `null` will not be returned when `$throw` argument is `true` (default):
nette/component-model@fbab7bc

As a result PHPStan started to complain:

    Expression on left side of ?? is not nullable.

(cherry picked from commit 7445d0d, 2afcd08)
@jtojnar jtojnar force-pushed the backport-php83-fix branch from e88d1f4 to 15527e5 Compare March 20, 2024 22:12
@jtojnar jtojnar merged commit 15527e5 into v4 Mar 20, 2024
5 of 7 checks passed
@jtojnar jtojnar deleted the backport-php83-fix branch March 20, 2024 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants