Skip to content

Commit 0de8f95

Browse files
committed
Use REQUEST_TIME_FLOAT instead of LARAVEL_START
Easier to overwrite for php-pm etc.
1 parent ab8b948 commit 0de8f95

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/LaravelDebugbar.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,12 @@ public function boot()
135135
}
136136

137137
if ($this->shouldCollect('time', true)) {
138-
$startTime = defined('LARAVEL_START') ? LARAVEL_START : null;
139-
$this->addCollector(new TimeDataCollector($startTime));
138+
$this->addCollector(new TimeDataCollector());
140139

141140
if ( ! $this->isLumen()) {
142141
$this->app->booted(
143-
function () use ($debugbar, $startTime) {
142+
function () use ($debugbar) {
143+
$startTime = $this->app['request']->server('REQUEST_TIME_FLOAT');
144144
if ($startTime) {
145145
$debugbar['time']->addMeasure('Booting', $startTime, microtime(true));
146146
}
@@ -176,7 +176,7 @@ function () use ($debugbar, $startTime) {
176176

177177
if ($this->shouldCollect('events', false) && isset($this->app['events'])) {
178178
try {
179-
$startTime = defined('LARAVEL_START') ? LARAVEL_START : null;
179+
$startTime = $this->app['request']->server('REQUEST_TIME_FLOAT');
180180
$eventCollector = new EventCollector($startTime);
181181
$this->addCollector($eventCollector);
182182
$this->app['events']->subscribe($eventCollector);

0 commit comments

Comments
 (0)