contributte / event-dispatcher-extra

:recycle: Nette-based Symfony events for application, presenter, form, latte, templates, security and many others.
https://contributte.org/packages/contributte/event-dispatcher-extra.html
MIT License
7 stars 5 forks source link

Presenter events are not working when Nette\Application\Application is not used #19

Closed mabar closed 6 years ago

mabar commented 6 years ago

We should probably hook events to every presenter instead of hooking through application.

Another option is to drop Apitte/Presenter. It is only use-case when are presenters used throught Contributte/Middleware (where is hook for presenter missing) and it is pretty bad use-case.

We can as well add support to Contributte/Middleware application but it would not solve that (mostly teoretical) problem for another applications.

mabar commented 6 years ago

After more studies I think that this problem don't must be solved. Psr-15 middlewares will be supported by nette/application. This will make NetteMiddlewareApplication and related middlewares (PresenterMiddleware and maybe also TracyMiddleware) useless. Also, api should have its own Application class (MiddlewareApplication in case of contributte/middlewares). So, for now is not supported only a combination of middlewares and events for Nette\Application Application and UI\Presenter