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

Bump PHPStan to 2.0 #115

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Bump PHPStan to 2.0 #115

wants to merge 2 commits into from

Conversation

jtojnar
Copy link
Collaborator

@jtojnar jtojnar commented Jan 11, 2025

nette/forms 3.1.15 clarified that the `Container::getForm` method can only return `null` when passed `throw: false`:
nette/forms@ee43bfc

With PHPStan 2.0 this would be noticed and result in an error:

    384    Strict comparison using !== between Nette\Forms\Form and null will always evaluate to   true.
           🪪  notIdentical.alwaysTrue
Let’s use non-throwing variant and also add the PHPDoc to be explicit.
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.

1 participant