composer-update-patch

This commit is contained in:
Manish Verma
2016-11-03 05:44:29 +05:30
parent 2dca47f5a4
commit 5d49d384a0
5118 changed files with 51603 additions and 122575 deletions

View File

@@ -13,7 +13,7 @@
"php": ">=5.5.9",
"illuminate/support": "5.1.*|5.2.*|5.3.*",
"symfony/finder": "~2.7|~3.0",
"maximebf/debugbar": "~1.11.0|~1.12.0"
"maximebf/debugbar": "~1.13.0"
},
"autoload": {
"psr-4": {
@@ -25,7 +25,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
"dev-master": "2.3-dev"
}
}
}

View File

@@ -100,7 +100,12 @@ class QueryCollector extends PDOCollector
$bindings = $this->checkBindings($bindings);
if (!empty($bindings) && $this->renderSqlWithParams) {
foreach ($bindings as $key => $binding) {
$regex = is_numeric($key) ? '/\?/' : "/:{$key}/";
// This regex matches placeholders only, not the question marks,
// nested in quotes, while we iterate through the bindings
// and substitute placeholders by suitable values.
$regex = is_numeric($key)
? "/\?(?=(?:[^'\\\']*'[^'\\\']*')*[^'\\\']*$)/"
: "/:{$key}(?=(?:[^'\\\']*'[^'\\\']*')*[^'\\\']*$)/";
$query = preg_replace($regex, $pdo->quote($binding), $query, 1);
}
}

View File

@@ -182,7 +182,7 @@ class LaravelDebugbar extends DebugBar
$this->app['events']->subscribe($eventCollector);
} catch (\Exception $e) {
$this->addException(
$this->addThrowable(
new Exception(
'Cannot add EventCollector to Laravel Debugbar: ' . $e->getMessage(),
$e->getCode(),
@@ -203,7 +203,7 @@ class LaravelDebugbar extends DebugBar
}
);
} catch (\Exception $e) {
$this->addException(
$this->addThrowable(
new Exception(
'Cannot add ViewCollector to Laravel Debugbar: ' . $e->getMessage(), $e->getCode(), $e
)
@@ -215,7 +215,7 @@ class LaravelDebugbar extends DebugBar
try {
$this->addCollector($this->app->make('Barryvdh\Debugbar\DataCollector\IlluminateRouteCollector'));
} catch (\Exception $e) {
$this->addException(
$this->addThrowable(
new Exception(
'Cannot add RouteCollector to Laravel Debugbar: ' . $e->getMessage(),
$e->getCode(),
@@ -253,7 +253,7 @@ class LaravelDebugbar extends DebugBar
$this->addCollector(new MonologCollector($this->app['log']->getMonolog()));
}
} catch (\Exception $e) {
$this->addException(
$this->addThrowable(
new Exception(
'Cannot add LogsCollector to Laravel Debugbar: ' . $e->getMessage(), $e->getCode(), $e
)
@@ -313,7 +313,7 @@ class LaravelDebugbar extends DebugBar
}
);
} catch (\Exception $e) {
$this->addException(
$this->addThrowable(
new Exception(
'Cannot add listen to Queries for Laravel Debugbar: ' . $e->getMessage(),
$e->getCode(),
@@ -334,7 +334,7 @@ class LaravelDebugbar extends DebugBar
$this['messages']->aggregate(new SwiftLogCollector($mailer));
}
} catch (\Exception $e) {
$this->addException(
$this->addThrowable(
new Exception(
'Cannot add MailCollector to Laravel Debugbar: ' . $e->getMessage(), $e->getCode(), $e
)
@@ -347,7 +347,7 @@ class LaravelDebugbar extends DebugBar
$file = $this->app['config']->get('debugbar.options.logs.file');
$this->addCollector(new LogsCollector($file));
} catch (\Exception $e) {
$this->addException(
$this->addThrowable(
new Exception(
'Cannot add LogsCollector to Laravel Debugbar: ' . $e->getMessage(), $e->getCode(), $e
)
@@ -373,7 +373,7 @@ class LaravelDebugbar extends DebugBar
);
$this->addCollector($authCollector);
} catch (\Exception $e) {
$this->addException(
$this->addThrowable(
new Exception(
'Cannot add AuthCollector to Laravel Debugbar: ' . $e->getMessage(), $e->getCode(), $e
)
@@ -430,7 +430,7 @@ class LaravelDebugbar extends DebugBar
try {
$collector->stopMeasure($name);
} catch (\Exception $e) {
// $this->addException($e);
// $this->addThrowable($e);
}
}
}
@@ -439,13 +439,24 @@ class LaravelDebugbar extends DebugBar
* Adds an exception to be profiled in the debug bar
*
* @param Exception $e
* @deprecated in favor of addThrowable
*/
public function addException(Exception $e)
{
return $this->addThrowable($e);
}
/**
* Adds an exception to be profiled in the debug bar
*
* @param Exception $e
*/
public function addThrowable($e)
{
if ($this->hasCollector('exceptions')) {
/** @var \DebugBar\DataCollector\ExceptionsCollector $collector */
$collector = $this->getCollector('exceptions');
$collector->addException($e);
$collector->addThrowable($e);
}
}
@@ -480,7 +491,7 @@ class LaravelDebugbar extends DebugBar
// Show the Http Response Exception in the Debugbar, when available
if (isset($response->exception)) {
$this->addException($response->exception);
$this->addThrowable($response->exception);
}
if ($this->shouldCollect('config', false)) {
@@ -489,7 +500,7 @@ class LaravelDebugbar extends DebugBar
$configCollector->setData($app['config']->all());
$this->addCollector($configCollector);
} catch (\Exception $e) {
$this->addException(
$this->addThrowable(
new Exception(
'Cannot add ConfigCollector to Laravel Debugbar: ' . $e->getMessage(),
$e->getCode(),
@@ -510,7 +521,7 @@ class LaravelDebugbar extends DebugBar
try {
$this->addCollector(new SessionCollector($sessionManager));
} catch (\Exception $e) {
$this->addException(
$this->addThrowable(
new Exception(
'Cannot add SessionCollector to Laravel Debugbar: ' . $e->getMessage(),
$e->getCode(),
@@ -527,7 +538,7 @@ class LaravelDebugbar extends DebugBar
try {
$this->addCollector(new SymfonyRequestCollector($request, $response, $sessionManager));
} catch (\Exception $e) {
$this->addException(
$this->addThrowable(
new Exception(
'Cannot add SymfonyRequestCollector to Laravel Debugbar: ' . $e->getMessage(),
$e->getCode(),
@@ -542,7 +553,7 @@ class LaravelDebugbar extends DebugBar
try {
$this->addCollector(new ClockworkCollector($request, $response, $sessionManager));
} catch (\Exception $e) {
$this->addException(
$this->addThrowable(
new Exception(
'Cannot add ClockworkCollector to Laravel Debugbar: ' . $e->getMessage(),
$e->getCode(),
@@ -697,7 +708,9 @@ class LaravelDebugbar extends DebugBar
$content = $content . $renderedContent;
}
// Update the new content and reset the content length
$response->setContent($content);
$response->headers->remove('Content-Length');
}
/**

View File

@@ -1,11 +1,13 @@
<?php namespace Barryvdh\Debugbar\Middleware;
use Error;
use Closure;
use Exception;
use Illuminate\Http\Request;
use Barryvdh\Debugbar\LaravelDebugbar;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Symfony\Component\Debug\Exception\FatalThrowableError;
class Debugbar
{
@@ -49,6 +51,9 @@ class Debugbar
$response = $next($request);
} catch (Exception $e) {
$response = $this->handleException($request, $e);
} catch (Error $error) {
$e = new FatalThrowableError($error);
$response = $this->handleException($request, $e);
}
// Modify the response to add the Debugbar