Skip to content

Commit

Permalink
Revert "Move cache read inside VarDumper handler to avoid cache call …
Browse files Browse the repository at this point in the history
…during package discovery/composer install calls (#1025)" (#1030)

This reverts commit 897d2e0.
  • Loading branch information
driesvints authored Mar 11, 2021
1 parent 0af30c6 commit c8a5ece
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Watchers/DumpWatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
));
Expand Down

0 comments on commit c8a5ece

Please sign in to comment.