Make Engine->$probe event non-internal
mabar opened this issue · 4 comments
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.
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…
Well, better do it now than later I guess
okay, I tried to do it in master. Is this usable for you?
Yeah, it's fine, my version of probe is practically the same https://github.com/orisai/nette-application/blob/bc394c43189e84f26f2f6efef2ff5de71414b7c5/src/Inspector/Inspector.php#L40-L48
Thank you David