From c8a5ece4576f4669028bd921414d13ecc5debeb8 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 11 Mar 2021 14:31:35 +0100 Subject: [PATCH] Revert "Move cache read inside VarDumper handler to avoid cache call during package discovery/composer install calls (#1025)" (#1030) This reverts commit 897d2e03278718551badede7ed612893d61b8e49. --- src/Watchers/DumpWatcher.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Watchers/DumpWatcher.php b/src/Watchers/DumpWatcher.php index a6a88bd22..22f9c62d4 100644 --- a/src/Watchers/DumpWatcher.php +++ b/src/Watchers/DumpWatcher.php @@ -40,14 +40,14 @@ public function __construct(CacheFactory $cache, array $options = []) */ public function register($app) { + if (! $this->cache->get('telescope:dump-watcher')) { + return; + } + $htmlDumper = new HtmlDumper(); $htmlDumper->setDumpHeader(''); VarDumper::setHandler(function ($var) use ($htmlDumper) { - if (! $this->cache->get('telescope:dump-watcher')) { - return; - } - $this->recordDump($htmlDumper->dump( (new VarCloner)->cloneVar($var), true ));