update inbox list
This commit is contained in:
24
vendor/facade/ignition/src/Middleware/AddDumps.php
vendored
Normal file
24
vendor/facade/ignition/src/Middleware/AddDumps.php
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Facade\Ignition\Middleware;
|
||||
|
||||
use Facade\FlareClient\Report;
|
||||
use Facade\Ignition\DumpRecorder\DumpRecorder;
|
||||
|
||||
class AddDumps
|
||||
{
|
||||
/** @var \Facade\Ignition\DumpRecorder\DumpRecorder */
|
||||
protected $dumpRecorder;
|
||||
|
||||
public function __construct(DumpRecorder $dumpRecorder)
|
||||
{
|
||||
$this->dumpRecorder = $dumpRecorder;
|
||||
}
|
||||
|
||||
public function handle(Report $report, $next)
|
||||
{
|
||||
$report->group('dumps', $this->dumpRecorder->getDumps());
|
||||
|
||||
return $next($report);
|
||||
}
|
||||
}
|
||||
22
vendor/facade/ignition/src/Middleware/AddEnvironmentInformation.php
vendored
Normal file
22
vendor/facade/ignition/src/Middleware/AddEnvironmentInformation.php
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Facade\Ignition\Middleware;
|
||||
|
||||
use Facade\FlareClient\Report;
|
||||
|
||||
class AddEnvironmentInformation
|
||||
{
|
||||
public function handle(Report $report, $next)
|
||||
{
|
||||
$report->frameworkVersion(app()->version());
|
||||
|
||||
$report->group('env', [
|
||||
'laravel_version' => app()->version(),
|
||||
'laravel_locale' => app()->getLocale(),
|
||||
'laravel_config_cached' => app()->configurationIsCached(),
|
||||
'php_version' => phpversion(),
|
||||
]);
|
||||
|
||||
return $next($report);
|
||||
}
|
||||
}
|
||||
58
vendor/facade/ignition/src/Middleware/AddGitInformation.php
vendored
Normal file
58
vendor/facade/ignition/src/Middleware/AddGitInformation.php
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace Facade\Ignition\Middleware;
|
||||
|
||||
use Facade\FlareClient\Report;
|
||||
use Symfony\Component\Process\Process;
|
||||
|
||||
class AddGitInformation
|
||||
{
|
||||
public function handle(Report $report, $next)
|
||||
{
|
||||
$report->group('git', [
|
||||
'hash' => $this->hash(),
|
||||
'message' => $this->message(),
|
||||
'tag' => $this->tag(),
|
||||
'remote' => $this->remote(),
|
||||
'isDirty' => ! $this->isClean(),
|
||||
]);
|
||||
|
||||
return $next($report);
|
||||
}
|
||||
|
||||
public function hash(): ?string
|
||||
{
|
||||
return $this->command("git log --pretty=format:'%H' -n 1");
|
||||
}
|
||||
|
||||
public function message(): ?string
|
||||
{
|
||||
return $this->command("git log --pretty=format:'%s' -n 1");
|
||||
}
|
||||
|
||||
public function tag(): ?string
|
||||
{
|
||||
return $this->command('git describe --tags --abbrev=0');
|
||||
}
|
||||
|
||||
public function remote(): ?string
|
||||
{
|
||||
return $this->command('git config --get remote.origin.url');
|
||||
}
|
||||
|
||||
public function isClean(): bool
|
||||
{
|
||||
return empty($this->command('git status -s'));
|
||||
}
|
||||
|
||||
protected function command($command)
|
||||
{
|
||||
$process = (new \ReflectionClass(Process::class))->hasMethod('fromShellCommandline')
|
||||
? Process::fromShellCommandline($command, base_path())
|
||||
: new Process($command, base_path());
|
||||
|
||||
$process->run();
|
||||
|
||||
return trim($process->getOutput());
|
||||
}
|
||||
}
|
||||
24
vendor/facade/ignition/src/Middleware/AddLogs.php
vendored
Normal file
24
vendor/facade/ignition/src/Middleware/AddLogs.php
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Facade\Ignition\Middleware;
|
||||
|
||||
use Facade\FlareClient\Report;
|
||||
use Facade\Ignition\LogRecorder\LogRecorder;
|
||||
|
||||
class AddLogs
|
||||
{
|
||||
/** @var \Facade\Ignition\LogRecorder\LogRecorder */
|
||||
protected $logRecorder;
|
||||
|
||||
public function __construct(LogRecorder $logRecorder)
|
||||
{
|
||||
$this->logRecorder = $logRecorder;
|
||||
}
|
||||
|
||||
public function handle(Report $report, $next)
|
||||
{
|
||||
$report->group('logs', $this->logRecorder->getLogMessages());
|
||||
|
||||
return $next($report);
|
||||
}
|
||||
}
|
||||
24
vendor/facade/ignition/src/Middleware/AddQueries.php
vendored
Normal file
24
vendor/facade/ignition/src/Middleware/AddQueries.php
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Facade\Ignition\Middleware;
|
||||
|
||||
use Facade\FlareClient\Report;
|
||||
use Facade\Ignition\QueryRecorder\QueryRecorder;
|
||||
|
||||
class AddQueries
|
||||
{
|
||||
/** @var \Facade\Ignition\QueryRecorder\QueryRecorder */
|
||||
protected $queryRecorder;
|
||||
|
||||
public function __construct(QueryRecorder $queryRecorder)
|
||||
{
|
||||
$this->queryRecorder = $queryRecorder;
|
||||
}
|
||||
|
||||
public function handle(Report $report, $next)
|
||||
{
|
||||
$report->group('queries', $this->queryRecorder->getQueries());
|
||||
|
||||
return $next($report);
|
||||
}
|
||||
}
|
||||
30
vendor/facade/ignition/src/Middleware/AddSolutions.php
vendored
Normal file
30
vendor/facade/ignition/src/Middleware/AddSolutions.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Facade\Ignition\Middleware;
|
||||
|
||||
use Facade\FlareClient\Report;
|
||||
use Facade\IgnitionContracts\SolutionProviderRepository;
|
||||
|
||||
class AddSolutions
|
||||
{
|
||||
/** @var \Facade\IgnitionContracts\SolutionProviderRepository */
|
||||
protected $solutionProviderRepository;
|
||||
|
||||
public function __construct(SolutionProviderRepository $solutionProviderRepository)
|
||||
{
|
||||
$this->solutionProviderRepository = $solutionProviderRepository;
|
||||
}
|
||||
|
||||
public function handle(Report $report, $next)
|
||||
{
|
||||
if ($throwable = $report->getThrowable()) {
|
||||
$solutions = $this->solutionProviderRepository->getSolutionsForThrowable($throwable);
|
||||
|
||||
foreach ($solutions as $solution) {
|
||||
$report->addSolution($solution);
|
||||
}
|
||||
}
|
||||
|
||||
return $next($report);
|
||||
}
|
||||
}
|
||||
27
vendor/facade/ignition/src/Middleware/CustomizeGrouping.php
vendored
Normal file
27
vendor/facade/ignition/src/Middleware/CustomizeGrouping.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Facade\Ignition\Middleware;
|
||||
|
||||
use Facade\FlareClient\Enums\GroupingTypes;
|
||||
use Facade\FlareClient\Report;
|
||||
|
||||
class CustomizeGrouping
|
||||
{
|
||||
protected $groupingType;
|
||||
|
||||
public function __construct($groupingType)
|
||||
{
|
||||
$this->groupingType = $groupingType;
|
||||
}
|
||||
|
||||
public function handle(Report $report, $next)
|
||||
{
|
||||
$report->groupByTopFrame();
|
||||
|
||||
if ($this->groupingType === GroupingTypes::EXCEPTION) {
|
||||
$report->groupByException();
|
||||
}
|
||||
|
||||
return $next($report);
|
||||
}
|
||||
}
|
||||
17
vendor/facade/ignition/src/Middleware/SetNotifierName.php
vendored
Normal file
17
vendor/facade/ignition/src/Middleware/SetNotifierName.php
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Facade\Ignition\Middleware;
|
||||
|
||||
use Facade\FlareClient\Report;
|
||||
|
||||
class SetNotifierName
|
||||
{
|
||||
const NOTIFIER_NAME = 'Laravel Client';
|
||||
|
||||
public function handle(Report $report, $next)
|
||||
{
|
||||
$report->notifierName(static::NOTIFIER_NAME);
|
||||
|
||||
return $next($report);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user