Skip to content

Commit

Permalink
Merge branch 'master' into v4
Browse files Browse the repository at this point in the history
  • Loading branch information
itsgoingd committed May 29, 2020
2 parents 5da0367 + 765b5ab commit cd9fcb6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
4.1.5

- fixed crash on initialization in Lumen apps using queue (reported by gramparallelo, thanks!)

4.1.4

- added support for a time property to the Request:add* apis, defaults to "current time - duration"
Expand Down
2 changes: 1 addition & 1 deletion Clockwork/Clockwork.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Clockwork implements LoggerInterface
/**
* Clockwork version
*/
const VERSION = '4.1.4';
const VERSION = '4.1.5';

/**
* Array of data sources, these objects provide data to be stored in a request object
Expand Down
7 changes: 7 additions & 0 deletions Clockwork/Support/Lumen/ClockworkServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use Clockwork\DataSource\LumenDataSource;
use Clockwork\DataSource\PhpDataSource;
use Clockwork\Request\Log;
use Clockwork\Request\Request;
use Clockwork\Support\Laravel\ClockworkServiceProvider as LaravelServiceProvider;

use Illuminate\Support\Facades\Facade;
Expand All @@ -26,6 +27,7 @@ public function register()
$clockwork = (new Clockwork)
->setAuthenticator($app['clockwork.authenticator'])
->setLog($app['clockwork.log'])
->setRequest($app['clockwork.request'])
->setStorage($app['clockwork.storage'])
->addDataSource(new PhpDataSource())
->addDataSource($app['clockwork.lumen']);
Expand All @@ -49,6 +51,10 @@ public function register()
return new Log;
});

$this->app->singleton('clockwork.request', function ($app) {
return new Request;
});

$this->app->singleton('clockwork.storage', function ($app) {
return $app['clockwork.support']->getStorage();
});
Expand All @@ -61,6 +67,7 @@ public function register()
$this->registerDataSources();
$this->registerAliases();

$this->app->make('clockwork.request'); // instantiate the request to have id and time available as early as possible
$this->app['clockwork.support']->configureSerializer();

if ($this->isRunningWithFacades() && ! class_exists('Clockwork')) {
Expand Down

0 comments on commit cd9fcb6

Please sign in to comment.