1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-07-24 02:01:30 +02:00

Deprecate details

This commit is contained in:
Barry vd. Heuvel
2024-03-12 10:35:31 +01:00
parent ecd288c6d1
commit 58bd38ac55
2 changed files with 9 additions and 6 deletions

View File

@@ -34,9 +34,9 @@ class SwiftMailCollector extends DataCollector implements Renderable, AssetProvi
$mailer->registerPlugin($this->messagesLogger);
}
public function showMessageBody()
public function showMessageBody($show = true)
{
$this->showBody = true;
$this->showBody = $show;
}
public function collect()

View File

@@ -29,14 +29,17 @@ class SymfonyMailCollector extends DataCollector implements Renderable, AssetPro
$this->messages[] = $message->getOriginalMessage();
}
/**
* @deprecated use showMessageBody()
*/
public function showMessageDetail()
{
$this->showDetailed = true;
$this->showMessageBody(true);
}
public function showMessageBody()
public function showMessageBody($show = true)
{
$this->showBody = true;
$this->showBody = $show;
}
public function collect()
@@ -51,7 +54,7 @@ class SymfonyMailCollector extends DataCollector implements Renderable, AssetPro
return $address->toString();
}, $message->getTo()),
'subject' => $message->getSubject(),
'headers' => ($this->showDetailed ? $message : $message->getHeaders())->toString(),
'headers' => $message->getHeaders()->toString(),
'body' => null,
'html' => null,
];