Aggiornato Composer
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
namespace Whoops\Handler;
|
||||
|
||||
use Whoops\Exception\Inspector;
|
||||
use Whoops\Inspector\InspectorInterface;
|
||||
use Whoops\RunInterface;
|
||||
|
||||
/**
|
||||
@@ -36,7 +36,7 @@ abstract class Handler implements HandlerInterface
|
||||
private $run;
|
||||
|
||||
/**
|
||||
* @var Inspector $inspector
|
||||
* @var InspectorInterface $inspector
|
||||
*/
|
||||
private $inspector;
|
||||
|
||||
@@ -62,15 +62,15 @@ abstract class Handler implements HandlerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Inspector $inspector
|
||||
* @param InspectorInterface $inspector
|
||||
*/
|
||||
public function setInspector(Inspector $inspector)
|
||||
public function setInspector(InspectorInterface $inspector)
|
||||
{
|
||||
$this->inspector = $inspector;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Inspector
|
||||
* @return InspectorInterface
|
||||
*/
|
||||
protected function getInspector()
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
namespace Whoops\Handler;
|
||||
|
||||
use Whoops\Exception\Inspector;
|
||||
use Whoops\Inspector\InspectorInterface;
|
||||
use Whoops\RunInterface;
|
||||
|
||||
interface HandlerInterface
|
||||
@@ -29,8 +29,8 @@ interface HandlerInterface
|
||||
public function setException($exception);
|
||||
|
||||
/**
|
||||
* @param Inspector $inspector
|
||||
* @param InspectorInterface $inspector
|
||||
* @return void
|
||||
*/
|
||||
public function setInspector(Inspector $inspector);
|
||||
public function setInspector(InspectorInterface $inspector);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,8 @@ class JsonResponseHandler extends Handler
|
||||
'errors' => [
|
||||
Formatter::formatExceptionAsDataArray(
|
||||
$this->getInspector(),
|
||||
$this->addTraceToOutput()
|
||||
$this->addTraceToOutput(),
|
||||
$this->getRun()->getFrameFilters()
|
||||
),
|
||||
]
|
||||
];
|
||||
@@ -68,7 +69,8 @@ class JsonResponseHandler extends Handler
|
||||
$response = [
|
||||
'error' => Formatter::formatExceptionAsDataArray(
|
||||
$this->getInspector(),
|
||||
$this->addTraceToOutput()
|
||||
$this->addTraceToOutput(),
|
||||
$this->getRun()->getFrameFilters()
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ class PlainTextHandler extends Handler
|
||||
return '';
|
||||
}
|
||||
$inspector = $this->getInspector();
|
||||
$frames = $inspector->getFrames();
|
||||
$frames = $inspector->getFrames($this->getRun()->getFrameFilters());
|
||||
|
||||
$response = "\nStack trace:";
|
||||
|
||||
|
||||
@@ -287,6 +287,7 @@ class PrettyPageHandler extends Handler
|
||||
$vars["tables"] = array_merge($extraTables, $vars["tables"]);
|
||||
|
||||
$plainTextHandler = new PlainTextHandler();
|
||||
$plainTextHandler->setRun($this->getRun());
|
||||
$plainTextHandler->setException($this->getException());
|
||||
$plainTextHandler->setInspector($this->getInspector());
|
||||
$vars["preface"] = "<!--\n\n\n" . $this->templateHelper->escape($plainTextHandler->generateResponse()) . "\n\n\n\n\n\n\n\n\n\n\n-->";
|
||||
@@ -304,7 +305,7 @@ class PrettyPageHandler extends Handler
|
||||
*/
|
||||
protected function getExceptionFrames()
|
||||
{
|
||||
$frames = $this->getInspector()->getFrames();
|
||||
$frames = $this->getInspector()->getFrames($this->getRun()->getFrameFilters());
|
||||
|
||||
if ($this->getApplicationPaths()) {
|
||||
foreach ($frames as $frame) {
|
||||
@@ -353,7 +354,6 @@ class PrettyPageHandler extends Handler
|
||||
* will be flattened with `print_r`.
|
||||
*
|
||||
* @param string $label
|
||||
* @param array $data
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
@@ -383,7 +383,7 @@ class PrettyPageHandler extends Handler
|
||||
throw new InvalidArgumentException('Expecting callback argument to be callable');
|
||||
}
|
||||
|
||||
$this->extraTables[$label] = function (\Whoops\Exception\Inspector $inspector = null) use ($callback) {
|
||||
$this->extraTables[$label] = function (\Whoops\Inspector\InspectorInterface $inspector = null) use ($callback) {
|
||||
try {
|
||||
$result = call_user_func($callback, $inspector);
|
||||
|
||||
@@ -755,11 +755,9 @@ class PrettyPageHandler extends Handler
|
||||
/**
|
||||
* Set the application paths.
|
||||
*
|
||||
* @param array $applicationPaths
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setApplicationPaths($applicationPaths)
|
||||
public function setApplicationPaths(array $applicationPaths)
|
||||
{
|
||||
$this->applicationPaths = $applicationPaths;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,8 @@ class XmlResponseHandler extends Handler
|
||||
$response = [
|
||||
'error' => Formatter::formatExceptionAsDataArray(
|
||||
$this->getInspector(),
|
||||
$this->addTraceToOutput()
|
||||
$this->addTraceToOutput(),
|
||||
$this->getRun()->getFrameFilters()
|
||||
),
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user