Skip to content

Commit

Permalink
Render Data context in console sender
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed May 6, 2024
1 parent 543d651 commit 28739d7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Sender/Console/Renderer/VarDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ public function describe(OutputInterface $output, Data $data, array $context, in
Common::renderMetadata($output, $meta);
$output->writeln('');

// Render Data context
if ($data->getContext() !== []) {
Common::renderHeader3($output, 'Data context');
// todo the context may contain mixed data
// todo need to consider it and render the context in a good way
Common::renderMetadata($output, $data->getContext());
// $output->writeln(\print_r($data->getContext(), true));
$output->writeln('');
}

$output->write((string) $this->dumper->dump($data, true), true, OutputInterface::OUTPUT_RAW);
}
};
Expand Down

0 comments on commit 28739d7

Please sign in to comment.