Comments (2)
Hi, the problem is that the signature breaks LSP. When you have array<callable(Nette\Forms\Form, mixed)
, it's unsafe to expect Nette\Forms\Form
child class in the callback.
You should change it to this code:
$form->onSuccess[] = function (\Nette\Forms\Form $form, ArrayHash $values): void {
...
}
I get that Nette will probably work even with your code but that might change in the future without being able to detect that from the typesystem PoV. So there's no way to fix it in the extension. You should probably put it in ignoreErrors
.
from phpstan-nette.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from phpstan-nette.
Related Issues (20)
- Resolving BaseControl in presenter HOT 3
- report deprecation errors, when a nette file references a `@deprecated` class HOT 4
- Weird PHPStan errors for renamed interfaces HOT 10
- Strings::match() should be checked for invalid regex HOT 4
- Call to undefined method Nette\Forms\Control HOT 9
- Access to an uninitialized property which is @inject-ed HOT 1
- PHPStan: Call to an undefined method Slince\Shopify\Client::methodName() HOT 2
- Checking links HOT 6
- Container::getComponents() returns incorrect type HOT 3
- FatalError after composer update (last version of Nette\PhpGenerator) HOT 3
- Broken compatibility with Nette 2.x HOT 4
- Nette Tester Asserts HOT 6
- Presenter#sendResponse() is not taken as early terminating method call even it is stated in config file HOT 5
- RouteList does not accept Route HOT 10
- False positive on 0.12.15? HOT 8
- Missing dynamic return type for Nette\Http\Session::getSection() HOT 4
- Form events errors HOT 3
- [Security] Workflow release.yml is using vulnerable action metcalfc/changelog-generator HOT 1
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpstan-nette.