From 739e23b27f278b61cfa84bda6e7f0b63c1ec4b0c Mon Sep 17 00:00:00 2001 From: atymic Date: Tue, 22 Oct 2019 12:40:44 +1100 Subject: [PATCH] feat: support new laravel versions - drop php < 7.1 support - update dev deps - support new laravel versions --- .gitignore | 1 + .styleci.yml | 2 -- .travis.yml | 5 ++--- README.md | 4 ++-- composer.json | 14 +++++++------- phpunit.xml.dist | 2 +- tests/ChannelTest.php | 13 ++++++------- tests/MessageTest.php | 5 +++-- 8 files changed, 22 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 3f0a634..d07f69a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ build composer.phar composer.lock +.phpunit.result.cache diff --git a/.styleci.yml b/.styleci.yml index 916d27e..0285f17 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -1,3 +1 @@ preset: laravel - -linting: true diff --git a/.travis.yml b/.travis.yml index ff42c2c..16142e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,8 @@ language: php php: - - 5.6 - - 7.0 - - 7.1 + - 7.2 + - 7.3 env: matrix: diff --git a/README.md b/README.md index d43abe5..f57f7ad 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Trello notifications channel for Laravel 5.3+ +# Trello notifications channel for Laravel [![Latest Version on Packagist](https://img.shields.io/packagist/v/laravel-notification-channels/trello.svg?style=flat-square)](https://packagist.org/packages/laravel-notification-channels/trello) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md) @@ -9,7 +9,7 @@ [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/laravel-notification-channels/trello/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/laravel-notification-channels/trello/?branch=master) [![Total Downloads](https://img.shields.io/packagist/dt/laravel-notification-channels/trello.svg?style=flat-square)](https://packagist.org/packages/laravel-notification-channels/trello) -This package makes it easy to create [Trello cards](https://developers.trello.com/) with Laravel 5.3+. +This package makes it easy to create [Trello cards](https://developers.trello.com/) with Laravel 5.5+ & 6.x. ## Contents diff --git a/composer.json b/composer.json index 1d774c5..f984de0 100644 --- a/composer.json +++ b/composer.json @@ -11,16 +11,16 @@ } ], "require": { - "php": ">=5.6.4", + "php": ">=7.1", "guzzlehttp/guzzle": "~6.0", - "illuminate/notifications": "5.3.*|5.4.*", - "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*" + "illuminate/notifications": "~5.5 || ~6.0", + "illuminate/support": "~5.5 || ~6.0" }, "require-dev": { - "mockery/mockery": "^0.9.5", - "phpunit/phpunit": "4.*", - "orchestra/testbench": "3.3.x-dev", - "orchestra/database": "3.3.x-dev" + "mockery/mockery": "^1.0", + "phpunit/phpunit": "8.*", + "orchestra/testbench": "~4.2", + "orchestra/database": "~4.0" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f9e8249..7042c52 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -22,7 +22,7 @@ - + diff --git a/tests/ChannelTest.php b/tests/ChannelTest.php index 8e7b3bb..4cfa14b 100644 --- a/tests/ChannelTest.php +++ b/tests/ChannelTest.php @@ -2,15 +2,15 @@ namespace NotificationChannels\Trello\Test; +use Mockery; use GuzzleHttp\Client; use GuzzleHttp\Psr7\Response; +use Orchestra\Testbench\TestCase; use Illuminate\Notifications\Notification; -use Mockery; -use NotificationChannels\Trello\Exceptions\CouldNotSendNotification; -use NotificationChannels\Trello\Exceptions\InvalidConfiguration; use NotificationChannels\Trello\TrelloChannel; use NotificationChannels\Trello\TrelloMessage; -use Orchestra\Testbench\TestCase; +use NotificationChannels\Trello\Exceptions\InvalidConfiguration; +use NotificationChannels\Trello\Exceptions\CouldNotSendNotification; class ChannelTest extends TestCase { @@ -41,7 +41,7 @@ public function it_can_send_a_notification() /** @test */ public function it_throws_an_exception_when_it_is_not_configured() { - $this->setExpectedException(InvalidConfiguration::class); + $this->expectException(InvalidConfiguration::class); $client = new Client(); $channel = new TrelloChannel($client); @@ -51,7 +51,7 @@ public function it_throws_an_exception_when_it_is_not_configured() /** @test */ public function it_throws_an_exception_when_it_could_not_send_the_notification() { - $this->setExpectedException(CouldNotSendNotification::class); + $this->expectException(CouldNotSendNotification::class); $this->app['config']->set('services.trello.key', 'TrelloKey'); @@ -81,7 +81,6 @@ public function routeNotificationForTrello() } } - class TestNotification extends Notification { public function toTrello($notifiable) diff --git a/tests/MessageTest.php b/tests/MessageTest.php index 76841ad..3b771a8 100644 --- a/tests/MessageTest.php +++ b/tests/MessageTest.php @@ -4,14 +4,15 @@ use DateTime; use Illuminate\Support\Arr; +use PHPUnit\Framework\TestCase; use NotificationChannels\Trello\TrelloMessage; -class MessageTest extends \PHPUnit_Framework_TestCase +class MessageTest extends TestCase { /** @var \NotificationChannels\Trello\TrelloMessage */ protected $message; - public function setUp() + public function setUp(): void { parent::setUp();