nette/latte

Make Engine->$probe event non-internal

mabar opened this issue · 4 comments

mabar commented

I am currently working on a Tracy panel which inspects all nette/application components on a page. This panel also includes functionality of LattePanel. It works well, but I have to use $probe event for that and it's not ideal, because it collides with original LattePanel and also needs internal $probe event.

Could we make $probe non-internal and also accept list of callbacks as other Nette events do? Thank you

Best would be to add support to both 3.0 and 2.11 branches so I could reliably support older Latte, but I could live without it.

image

dg commented

The probe variable was a temporary solution that I wanted to replace with Latte\Extension, but I forgot about it.

The template would be passed to Extension::beforeRender(), but now I've discovered that I have a stupid bug in the interface: beforeRender() method doesn't accept the Template, it accepts the Engine 🤦‍♂️

I'm considering fixing it even at the price of a BC break, as nearly no one is using Latte 3 yet…

mabar commented

Well, better do it now than later I guess

dg commented

okay, I tried to do it in master. Is this usable for you?