];
}
protected function getCurrentBranch(string $directory): string
{
$branch = "'".trim(shell_exec("cd ${directory}; git branch | grep \\* | cut -d ' ' -f2"))."'";
if ($branch === "''") {
$branch = 'current branch';
}
*
* Prevents access to $this/self from included files.
*/
function includeFile($file)
{
include $file;
}
*
* Prevents access to $this/self from included files.
*/
function includeFile($file)
{
include $file;
}
* @return bool|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
return true;
}
}
$solutions[] = $throwable->getSolution();
}
$providedSolutions = $this->solutionProviders
->filter(function (string $solutionClass) {
if (! in_array(HasSolutionsForThrowable::class, class_implements($solutionClass))) {
return false;
}
if (in_array($solutionClass, config('ignition.ignored_solution_providers', []))) {
return false;
* @param callable $callback
* @return array
*/
public static function where($array, callable $callback)
{
return array_filter($array, $callback, ARRAY_FILTER_USE_BOTH);
}
/**
* If the given value is not an array and not null, wrap it in one.
*
* @return static
*/
public function filter(callable $callback = null)
{
if ($callback) {
return new static(Arr::where($this->items, $callback));
}
return new static(array_filter($this->items));
}
if ($throwable instanceof ProvidesSolution) {
$solutions[] = $throwable->getSolution();
}
$providedSolutions = $this->solutionProviders
->filter(function (string $solutionClass) {
if (! in_array(HasSolutionsForThrowable::class, class_implements($solutionClass))) {
return false;
}
if (in_array($solutionClass, config('ignition.ignored_solution_providers', []))) {
}
public function handle(Report $report, $next)
{
if ($throwable = $report->getThrowable()) {
$solutions = $this->solutionProviderRepository->getSolutionsForThrowable($throwable);
foreach ($solutions as $solution) {
$report->addSolution($solution);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
public function handle(Report $report, $next)
{
$report->group('queries', $this->queryRecorder->getQueries());
return $next($report);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
public function handle(Report $report, $next)
{
$report->group('dumps', $this->dumpRecorder->getDumps());
return $next($report);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
public function handle(Report $report, $next)
{
$report->group('logs', $this->logRecorder->getLogMessages());
return $next($report);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
'laravel_locale' => app()->getLocale(),
'laravel_config_cached' => app()->configurationIsCached(),
'php_version' => phpversion(),
]);
return $next($report);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
public function handle(Report $report, $next)
{
$report->notifierName(static::NOTIFIER_NAME);
return $next($report);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
}
$report->userProvidedContext($context);
return $next($report);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
$context['request']['ip'] = null;
$report->userProvidedContext($context);
return $next($report);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
{
foreach ($this->recorder->glows() as $glow) {
$report->addGlow($glow);
}
return $next($report);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
{
$pipeline = array_reduce(
array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
);
return $pipeline($this->passable);
}
/**
* Run the pipeline and return the result.
*
$this->applyAdditionalParameters($report);
$report = (new Pipeline($this->container))
->send($report)
->through($this->middleware)
->then(function ($report) {
return $report;
});
return $report;
}
$this->contextDetector->detectCurrentContext(),
$this->applicationPath,
$this->version()
);
return $this->applyMiddlewareToReport($report);
}
public function createReportFromMessage(string $message, string $logLevel): Report
{
$report = Report::createForMessage(
$this->solutionProviderRepository = $solutionProviderRepository;
}
public function handle(Throwable $throwable, $defaultTab = null, $defaultTabProps = [])
{
$report = $this->flareClient->createReport($throwable);
$solutions = $this->solutionProviderRepository->getSolutionsForThrowable($throwable);
$viewModel = new ErrorPageViewModel(
$throwable,
}
public function handle(): ?int
{
try {
$this->errorPageHandler->handle($this->exception);
} catch (Error $error) {
// Errors aren't caught by Whoops.
// Convert the error to an exception and throw again.
throw new ErrorException(
// The HandlerInterface does not require an Exception passed to handle()
// and neither of our bundled handlers use it.
// However, 3rd party handlers may have already relied on this parameter,
// and removing it would be possibly breaking for users.
$handlerResponse = $handler->handle($exception);
// Collect the content type for possible sending in the headers.
$handlerContentType = method_exists($handler, 'contentType') ? $handler->contentType() : null;
if (in_array($handlerResponse, [Handler::LAST_HANDLER, Handler::QUIT])) {
$whoops->appendHandler($this->whoopsHandler());
$whoops->writeToOutput(false);
$whoops->allowQuit(false);
})->handleException($e);
}
/**
* Get the Whoops handler for the application.
*
*/
protected function renderExceptionContent(Throwable $e)
{
try {
return config('app.debug') && class_exists(Whoops::class)
? $this->renderExceptionWithWhoops($e)
: $this->renderExceptionWithSymfony($e, config('app.debug'));
} catch (Exception $e) {
return $this->renderExceptionWithSymfony($e, config('app.debug'));
}
}
* @return \Symfony\Component\HttpFoundation\Response
*/
protected function convertExceptionToResponse(Throwable $e)
{
return new SymfonyResponse(
$this->renderExceptionContent($e),
$this->isHttpException($e) ? $e->getStatusCode() : 500,
$this->isHttpException($e) ? $e->getHeaders() : []
);
}
* @return \Symfony\Component\HttpFoundation\Response
*/
protected function prepareResponse($request, Throwable $e)
{
if (! $this->isHttpException($e) && config('app.debug')) {
return $this->toIlluminateResponse($this->convertExceptionToResponse($e), $e);
}
if (! $this->isHttpException($e)) {
$e = new HttpException(500, $e->getMessage());
}
return $this->convertValidationExceptionToResponse($e, $request);
}
return $request->expectsJson()
? $this->prepareJsonResponse($request, $e)
: $this->prepareResponse($request, $e);
}
/**
* Map the exception using a registered mapper if possible.
*
* @param \Throwable $e
* @return void
*/
protected function renderHttpResponse(Throwable $e)
{
$this->getExceptionHandler()->render($this->app['request'], $e)->send();
}
/**
* Handle the PHP shutdown event.
*
}
if ($this->app->runningInConsole()) {
$this->renderForConsole($e);
} else {
$this->renderHttpResponse($e);
}
}
/**
* Render an exception to the console.
* @return void
*/
public function handleShutdown()
{
if (! is_null($error = error_get_last()) && $this->isFatal($error['type'])) {
$this->handleException($this->fatalErrorFromPhpError($error, 0));
}
}
/**
* Create a new fatal error instance from an error array.
ErrorException
|
---|
ErrorException: Using ${var} in strings is deprecated, use {$var} instead at /home3/sajilote/public_html/htms/vendor/facade/ignition/src/SolutionProviders/MergeConflictSolutionProvider.php:52 at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() (/home3/sajilote/public_html/htms/vendor/composer/ClassLoader.php:444) at include() (/home3/sajilote/public_html/htms/vendor/composer/ClassLoader.php:444) at Composer\Autoload\includeFile() (/home3/sajilote/public_html/htms/vendor/composer/ClassLoader.php:322) at Composer\Autoload\ClassLoader->loadClass() at class_implements() (/home3/sajilote/public_html/htms/vendor/facade/ignition/src/SolutionProviders/SolutionProviderRepository.php:50) at Facade\Ignition\SolutionProviders\SolutionProviderRepository->Facade\Ignition\SolutionProviders\{closure}() at array_filter() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Collections/Arr.php:687) at Illuminate\Support\Arr::where() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Collections/Collection.php:344) at Illuminate\Support\Collection->filter() (/home3/sajilote/public_html/htms/vendor/facade/ignition/src/SolutionProviders/SolutionProviderRepository.php:49) at Facade\Ignition\SolutionProviders\SolutionProviderRepository->getSolutionsForThrowable() (/home3/sajilote/public_html/htms/vendor/facade/ignition/src/Middleware/AddSolutions.php:21) at Facade\Ignition\Middleware\AddSolutions->handle() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home3/sajilote/public_html/htms/vendor/facade/ignition/src/Middleware/AddQueries.php:22) at Facade\Ignition\Middleware\AddQueries->handle() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home3/sajilote/public_html/htms/vendor/facade/ignition/src/Middleware/AddDumps.php:22) at Facade\Ignition\Middleware\AddDumps->handle() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home3/sajilote/public_html/htms/vendor/facade/ignition/src/Middleware/AddLogs.php:22) at Facade\Ignition\Middleware\AddLogs->handle() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home3/sajilote/public_html/htms/vendor/facade/ignition/src/Middleware/AddEnvironmentInformation.php:20) at Facade\Ignition\Middleware\AddEnvironmentInformation->handle() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home3/sajilote/public_html/htms/vendor/facade/ignition/src/Middleware/SetNotifierName.php:15) at Facade\Ignition\Middleware\SetNotifierName->handle() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home3/sajilote/public_html/htms/vendor/facade/flare-client-php/src/Middleware/CensorRequestBodyFields.php:28) at Facade\FlareClient\Middleware\CensorRequestBodyFields->handle() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home3/sajilote/public_html/htms/vendor/facade/flare-client-php/src/Middleware/AnonymizeIp.php:17) at Facade\FlareClient\Middleware\AnonymizeIp->handle() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home3/sajilote/public_html/htms/vendor/facade/flare-client-php/src/Middleware/AddGlows.php:24) at Facade\FlareClient\Middleware\AddGlows->handle() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103) at Illuminate\Pipeline\Pipeline->then() (/home3/sajilote/public_html/htms/vendor/facade/flare-client-php/src/Flare.php:313) at Facade\FlareClient\Flare->applyMiddlewareToReport() (/home3/sajilote/public_html/htms/vendor/facade/flare-client-php/src/Flare.php:291) at Facade\FlareClient\Flare->createReport() (/home3/sajilote/public_html/htms/vendor/facade/ignition/src/ErrorPage/ErrorPageHandler.php:40) at Facade\Ignition\ErrorPage\ErrorPageHandler->handle() (/home3/sajilote/public_html/htms/vendor/facade/ignition/src/ErrorPage/IgnitionWhoopsHandler.php:25) at Facade\Ignition\ErrorPage\IgnitionWhoopsHandler->handle() (/home3/sajilote/public_html/htms/vendor/filp/whoops/src/Whoops/Run.php:370) at Whoops\Run->handleException() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:528) at Illuminate\Foundation\Exceptions\Handler->renderExceptionWithWhoops() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:507) at Illuminate\Foundation\Exceptions\Handler->renderExceptionContent() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:491) at Illuminate\Foundation\Exceptions\Handler->convertExceptionToResponse() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:470) at Illuminate\Foundation\Exceptions\Handler->prepareResponse() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:356) at Illuminate\Foundation\Exceptions\Handler->render() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:119) at Illuminate\Foundation\Bootstrap\HandleExceptions->renderHttpResponse() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:96) at Illuminate\Foundation\Bootstrap\HandleExceptions->handleException() (/home3/sajilote/public_html/htms/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:130) at Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown() |