Skip to content

Commit

Permalink
Merge pull request #87 from spatie/add-laravel-5.8
Browse files Browse the repository at this point in the history
Added: Laravel 5.8 compatibility
  • Loading branch information
rubenvanassche authored Feb 27, 2019
2 parents de8288f + 4f3a739 commit 874315c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: php

php:
- 7.0
- 7.1
- 7.2
- 7.3
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
3 changes: 2 additions & 1 deletion src/Http/FeedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
namespace Spatie\Feed\Http;

use Spatie\Feed\Feed;
use Illuminate\Support\Str;

class FeedController
{
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;

Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 874315c

Please sign in to comment.