Form events errors
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start by reproducing the reported PHPStan diagnostics with the presenter snippet; no repository file or test is named. Inspect how the extension handles Nette form onSuccess callbacks, and consider the issue done when valid callback signatures no longer produce the reported errors.
Written by the indexing model from the issue text.
Description
Hi, i have problems with latest nette/forms and phpstan 1.0.. i will describe it on presenter, but same errors are in control...
<?php declare(strict_types = 1);
namespace App\Presenters;
use Nette\Application\UI\Form;
use Nette\Application\UI\Presenter;
use Nette\Utils\ArrayHash;
final class HomepagePresenter extends Presenter
{
protected function createCompomentForm(): Form
{
$form = new Form();
$form->onSuccess[] = function (Form $form, ArrayHash $values): void {
};
$form->onSuccess[] = [$this, 'formOnSuccess'];
return $form;
}
public function formOnSuccess(Form $form, ArrayHash $values): void
{
}
}
------ ---------------------------------------------------------------------------------
Line Presenters/HomepagePresenter.php
------ ---------------------------------------------------------------------------------
15 Array (array<callable(Nette\Application\UI\Form, mixed): void>) does not accept
Closure(Nette\Application\UI\Form, Nette\Utils\ArrayHash): void.
18 Array (array<callable(Nette\Application\UI\Form, mixed): void>) does not accept
array{$this(App\Presenters\HomepagePresenter), 'formOnSuccess'}.
------ ---------------------------------------------------------------------------------
- Dominant language
- PHP
- Stars
- 118
- Forks
- 44
- Avg merge
- 17d 5h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from phpstan/phpstan-nette
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
phpstan/phpstan-nette#213 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
phpstan/phpstan-nette#147 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
phpstan/phpstan-nette#141 · 6 comments ·
-
Dependency Dashboard Open
Difficulty 4/5 3-5 days Newbie friendliness 20/100
phpstan/phpstan-nette#94 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
phpstan/phpstan-nette#77 · 4 comments ·
All issues in phpstan/phpstan-nette
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·