Closed josefsabl closed 6 years ago
The version from this pull request works for me. To install add this to composer.json
"repositories": [
{
"type": "git",
"url": "https://github.com/josefsabl/event-dispatcher-extra.git"
}
],
"require": {
"contributte/event-dispatcher-extra": "dev-fix-too-few-args#625c807df28e3e2951c04aa543679b06152ec668 as 0.4.0"
}
According to tests added at #17, it's working. What PHP version do you use?
I am on 7.2.4. But I think that the fix should work for older versions as well.
Ok, I got it. The problem actually appears when combined with Arachne Security Verifier.
See this piece of code in Arachne.
It was discussed here and closed as problem with Contributte.
Well, I see now. onStartup is called here https://github.com/nette/application/blob/master/src/Application/UI/Presenter.php#L182 Startup method in Arachne is redundant and called without required presenter instance. Could you remove it please? https://github.com/Arachne/Verifier/blob/1aad7cd228439cf84ee1f7cf35fd7ad578b9bc50/src/Application/VerifierPresenterTrait.php#L81-L86
Yeah, I can confirm that onStartup is called twice. Which is probably not good thing anyway. @enumag
@josefsabl Wait, twice? How? Are you using nette/application 3.0?
@enumag It is already in 2.4 https://github.com/nette/application/releases/tag/v2.4.11
@mabar Oh ok. In that case deleting the call in arachne and increasing required nette version should fix it.
I am not sure if this is the better place to report this problem I am having with
arachne/entity-loader
.I am getting such error:
Too few arguments to function Contributte\Events\Extra\Event\Application\PresenterStartupEvent::__construct(), 0 passed in ...temp\cache\Nette.Configurator\Container_689ab32e47.php on line 733 and exactly 1 expected.