File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
src/Bridges/ApplicationDI Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 4242 "nette/di" : " <3.0.7" ,
4343 "nette/forms" : " <3.0" ,
4444 "nette/schema" : " <1.2" ,
45- "latte/latte" : " <2.7.1 || >=3.1 || =3.0.0 " ,
45+ "latte/latte" : " <2.7.1 || >=3.0.0 <3.0.5 || > =3.1 " ,
4646 "tracy/tracy" : " <2.5"
4747 },
4848 "autoload" : {
Original file line number Diff line number Diff line change @@ -116,10 +116,12 @@ public static function initLattePanel(
116116 $ factory ->onCreate [] = function (ApplicationLatte \Template $ template ) use ($ bar , $ all ) {
117117 $ control = $ template ->getLatte ()->getProviders ()['uiControl ' ] ?? null ;
118118 if ($ all || $ control instanceof Nette \Application \UI \Presenter) {
119- $ bar ->addPanel (new Latte \Bridges \Tracy \LattePanel (
120- $ template ->getLatte (),
121- $ all && $ control ? (new \ReflectionObject ($ control ))->getShortName () : ''
122- ));
119+ $ name = $ all && $ control ? (new \ReflectionObject ($ control ))->getShortName () : '' ;
120+ if (version_compare (Latte \Engine::VERSION , '3 ' , '< ' )) {
121+ $ bar ->addPanel (new Latte \Bridges \Tracy \LattePanel ($ template ->getLatte (), $ name ));
122+ } else {
123+ $ template ->getLatte ()->addExtension (new Latte \Bridges \Tracy \TracyExtension ($ name ));
124+ }
123125 }
124126 };
125127 }
You can’t perform that action at this time.
0 commit comments