From 93c7d57f0345d6a389395c76240c8b0b550000b0 Mon Sep 17 00:00:00 2001 From: Ruben Van Assche Date: Wed, 27 Feb 2019 15:02:51 +0100 Subject: [PATCH 1/2] Added: Laravel 5.8 compatibility --- .travis.yml | 1 - CHANGELOG.md | 3 +++ composer.json | 6 +++--- src/Http/FeedController.php | 3 ++- tests/TestCase.php | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5a80a0d..ac208d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - 7.0 - 7.1 - 7.2 - 7.3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2aeb17d..182bdaa 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to `laravel-feed` will be documented in this file +## 2.1.2 - 2019-02-27 +- Added: Laravel 5.8 compatibility + ## 2.1.1 - 2018-08-27 - Add support for Laravel 5.7 diff --git a/composer.json b/composer.json index 396d575..28d302e 100644 --- a/composer.json +++ b/composer.json @@ -30,12 +30,12 @@ } ], "require": { - "php" : "^7.0", - "laravel/framework": "~5.5.0|~5.6.0|~5.7.0", + "php" : "^7.1", + "laravel/framework": "~5.5.0|~5.6.0|~5.7.0|~5.8.0", "nesbot/carbon": "^1.0" }, "require-dev": { - "orchestra/testbench": "~3.5.0|~3.6.0|~3.7.0", + "orchestra/testbench": "~3.5.0|~3.6.0|~3.7.0|~3.8.0", "phpunit/phpunit": "^6.0|^7.0", "spatie/phpunit-snapshot-assertions": "^1.0" }, diff --git a/src/Http/FeedController.php b/src/Http/FeedController.php index 2d887ee..b06cd57 100644 --- a/src/Http/FeedController.php +++ b/src/Http/FeedController.php @@ -2,6 +2,7 @@ namespace Spatie\Feed\Http; +use Illuminate\Support\Str; use Spatie\Feed\Feed; class FeedController @@ -10,7 +11,7 @@ public function __invoke() { $feeds = config('feed.feeds'); - $name = str_after(app('router')->currentRouteName(), 'feeds.'); + $name = Str::after(app('router')->currentRouteName(), 'feeds.'); $feed = $feeds[$name] ?? null; diff --git a/tests/TestCase.php b/tests/TestCase.php index 41359ec..134177e 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -13,7 +13,7 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase { use MatchesSnapshots; - public function setUp() + public function setUp() : void { Carbon::setTestNow(Carbon::create(2016, 1, 1, 0, 0, 0) ->setTimezone('Europe/Brussels') From 154101f907e074a34b3e27da34eed477c867f70f Mon Sep 17 00:00:00 2001 From: Freek Van der Herten Date: Wed, 27 Feb 2019 14:03:05 +0000 Subject: [PATCH 2/2] Apply fixes from StyleCI --- src/Http/FeedController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/FeedController.php b/src/Http/FeedController.php index b06cd57..3b5643d 100644 --- a/src/Http/FeedController.php +++ b/src/Http/FeedController.php @@ -2,8 +2,8 @@ namespace Spatie\Feed\Http; -use Illuminate\Support\Str; use Spatie\Feed\Feed; +use Illuminate\Support\Str; class FeedController {