diff --git a/CHANGELOG.md b/CHANGELOG.md index da7d7871..63223385 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +1.2 +- added support for Laravel 4.1 +- added facade for Laravel +- added ability to disable collecting data about requests to specified URIs in Laravel +- added clockwork:clean artisan command for cleaning request metadata for Laravel +- added an easy way to add timeline events and log records via main Clockwork class +- added support for Slim apps running in subdirs (requires Clockwork Chrome 1.1+) +- file stroage now creates default gitignore file for the request data when creating the storage dir +- fixed a few bugs which might cause request data to not appear in Chrome extension +- fixed a few bugs that could lead to PHP errors/exceptions + 1.1 - added support for Laravel 4 apps running in subdirs (requires Clockwork Chrome 1.1+) - added data-protocol version to the request data diff --git a/Clockwork/Clockwork.php b/Clockwork/Clockwork.php index cc33787d..6d2127da 100644 --- a/Clockwork/Clockwork.php +++ b/Clockwork/Clockwork.php @@ -15,7 +15,7 @@ class Clockwork /** * Clockwork version */ - const VERSION = '1.1'; + const VERSION = '1.2'; /** * Array of data sources, these objects provide data to be stored in a request object diff --git a/README.md b/README.md index 241569e1..5bd12f43 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Once Clockwork is installed, you need to register Laravel service provider, in y ```php 'providers' => array( - ... + ... 'Clockwork\Support\Laravel\ClockworkServiceProvider' ) ``` @@ -46,6 +46,26 @@ $this->afterFilter(function() }); ``` +Clockwork also comes with a facade, which provides an easy way to add records to the Clockwork log and events to the timeline. You can register the facade in your `app/config/app.php`: + +```php +'aliases' => array( + ... + 'Clockwork' => 'Clockwork\Support\Laravel\Facade', +) +``` + +Now you can use the following commands: + +```php +Clockwork::startEvent('event_name', 'Event description.'); // event called 'Event description.' appears in Clockwork timeline tab + +Clockwork::log('Message text.'); // 'Message text.' appears in Clockwork log tab +Log::info('Message text.'); // 'Message text.' appears in Clockwork log tab as well as application log file + +Clockwork::endEvent('event_name'); +``` + ### Slim 2 Once Clockwork is installed, you need to add Slim middleware to your app: diff --git a/TODO.md b/TODO.md index 1b7b4133..c9b778f9 100644 --- a/TODO.md +++ b/TODO.md @@ -1,4 +1,4 @@ -1.2 +1.3 - documentation - support for application log, timeline and routes in Slim - support for application and/or PHP settings