From e4d18a8545bd435628921167eb7cc88db31ef796 Mon Sep 17 00:00:00 2001 From: Thomas Seven Date: Mon, 6 Jul 2015 17:06:50 +0200 Subject: [PATCH 1/3] Made ServiceProvider laravel-5-compatible --- src/Thujohn/Rss/RssServiceProvider.php | 72 +++++++++++++------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/Thujohn/Rss/RssServiceProvider.php b/src/Thujohn/Rss/RssServiceProvider.php index 5542141..aa1d69c 100644 --- a/src/Thujohn/Rss/RssServiceProvider.php +++ b/src/Thujohn/Rss/RssServiceProvider.php @@ -4,44 +4,44 @@ class RssServiceProvider extends ServiceProvider { - /** - * Indicates if loading of the provider is deferred. - * - * @var bool - */ - protected $defer = false; + /** + * Indicates if loading of the provider is deferred. + * + * @var bool + */ + protected $defer = false; - /** - * Bootstrap the application events. - * - * @return void - */ - public function boot() - { - $this->package('thujohn/rss'); - } + /** + * Bootstrap the application events. + * + * @return void + */ + public function boot() + { + // $this->package('thujohn/rss'); + } - /** - * Register the service provider. - * - * @return void - */ - public function register() - { - $this->app['rss'] = $this->app->share(function($app) - { - return new Rss; - }); - } + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + $this->app->singleton('rss', function($app) + { + return new Rss; + }); + } - /** - * Get the services provided by the provider. - * - * @return array - */ - public function provides() - { - return array('rss'); - } + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return array('rss'); + } } \ No newline at end of file From eeee57a0e17984478e37a0be0ceaa687b9a535c5 Mon Sep 17 00:00:00 2001 From: Thomas Seven Date: Mon, 6 Jul 2015 17:08:03 +0200 Subject: [PATCH 2/3] Updated docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 101dd56..9d01f73 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # RSS -RSS builder for Laravel 4 +RSS builder for Laravel 5 [![Build Status](https://travis-ci.org/thujohn/rss-l4.png?branch=master)](https://travis-ci.org/thujohn/rss-l4) From ef66ca57dcc94b3640183c70e9e47696092f00b7 Mon Sep 17 00:00:00 2001 From: Thomas Seven Date: Mon, 6 Jul 2015 17:10:53 +0200 Subject: [PATCH 3/3] Changed singleton binding to regular bind() binding --- src/Thujohn/Rss/RssServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Thujohn/Rss/RssServiceProvider.php b/src/Thujohn/Rss/RssServiceProvider.php index aa1d69c..c4b2350 100644 --- a/src/Thujohn/Rss/RssServiceProvider.php +++ b/src/Thujohn/Rss/RssServiceProvider.php @@ -28,7 +28,7 @@ public function boot() */ public function register() { - $this->app->singleton('rss', function($app) + $this->app->bind('rss', function($app) { return new Rss; });