Skip to content

Commit

Permalink
Drop package() in serviceProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
jenssegers committed Dec 16, 2014
1 parent 62bc920 commit 7ddc766
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/RavenLogHandler.php
Expand Up @@ -46,7 +46,7 @@ public function __construct(Raven_Client $raven, Application $app, $level = 'deb
* @param string $message
* @param array $context
*/
public function log($level, $message, array $context = array())
public function log($level, $message, array $context = [])
{
// Check if we want to log this message.
if ($this->parseLevel($level) < $this->level)
Expand All @@ -73,7 +73,7 @@ public function log($level, $message, array $context = array())
*
* @param array $context
*/
protected function addContext(array $context = array())
protected function addContext(array $context = [])
{
// Add session data.
if ($session = $this->app->session->all())
Expand Down
11 changes: 2 additions & 9 deletions src/RavenServiceProvider.php
Expand Up @@ -20,9 +20,6 @@ class RavenServiceProvider extends ServiceProvider {
*/
public function boot()
{
// Fix for PSR-4
$this->package('jenssegers/raven', 'raven', realpath(__DIR__));

$app = $this->app;

// Listen to log messages.
Expand Down Expand Up @@ -50,18 +47,14 @@ public function register()
throw new InvalidArgumentException('Raven DSN not configured');
}

$options = array_except($config, array('dsn'));

return new Raven_Client($config['dsn'], $options);
return new Raven_Client($config['dsn'], array_except($config, ['dsn']));
});

$this->app['raven.handler'] = $this->app->share(function($app)
{
$client = $app['raven.client'];

$level = $app['config']->get('services.raven.level', 'debug');

return new RavenLogHandler($client, $app, $level);
return new RavenLogHandler($app['raven.client'], $app, $level);
});
}

Expand Down

0 comments on commit 7ddc766

Please sign in to comment.