File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,11 @@ public function getCacheFrontendPool()
9393
9494 public function getQdbConfig ($ key , $ scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT , $ scopeCode = null )
9595 {
96+ // Backward compatibility
97+ if ($ key =='handle_vardumper ' && !class_exists (\Symfony \Component \VarDumper \VarDumper::class)) {
98+ return false ;
99+ }
100+
96101 return $ this ->getConfig ('dev/quickdevbar/ ' .$ key , $ scopeType , $ scopeCode );
97102 }
98103
Original file line number Diff line number Diff line change 66use ADM \QuickDevBar \Helper \Register ;
77use ADM \QuickDevBar \Service \Dumper ;
88use Magento \Framework \App \RequestInterface ;
9- use Symfony \Component \VarDumper \Dumper \HtmlDumper ;
10- use Symfony \Component \VarDumper \VarDumper ;
11- use Symfony \Component \VarDumper \Cloner \VarCloner ;
12-
139
1410class FrontController
1511{
@@ -63,7 +59,7 @@ public function beforeDispatch(\Magento\Framework\App\FrontControllerInterface $
6359 if ($ this ->request ->isAjax () && $ enabledHandler <2 ) {
6460 return ;
6561 }
66- // $prevHandler = VarDumper::setHandler($this->dumperHandler(...));
62+ $ prevHandler = \ Symfony \ Component \ VarDumper \ VarDumper::setHandler ($ this ->dumperHandler (...));
6763 }
6864 }
6965
@@ -73,8 +69,8 @@ public function beforeDispatch(\Magento\Framework\App\FrontControllerInterface $
7369 */
7470 protected function dumperHandler ($ var )
7571 {
76- $ cloner = new VarCloner ();
77- $ dumper = new HtmlDumper ();
72+ $ cloner = new \ Symfony \ Component \ VarDumper \ Cloner \ VarCloner ();
73+ $ dumper = new \ Symfony \ Component \ VarDumper \ Dumper \ HtmlDumper ();
7874
7975 $ dumper ->setTheme ('dark ' );
8076 $ dumpBt = debug_backtrace (DEBUG_BACKTRACE_IGNORE_ARGS )[2 ];
Original file line number Diff line number Diff line change 11<?php
22/** @var $block \ADM\QuickDevBar\Block\Tab\Panel */
33?>
4+ <?php if (!$ block ->getQdbConfig ('handle_vardumper ' )):?>
5+ <p>You need to activate admin configuration and having VarDumper Component installed, see <a href="https://github.com/symfony/var-dumper">github.com/symfony/var-dumper</a></p>
6+ <?php endif ; ?>
7+
8+
49
510<?php if (!$ block ->getDumps ()): ?>
611 <div class="qdb-dump"></div>
You can’t perform that action at this time.
0 commit comments