Skip to content

Commit

Permalink
feat: support new laravel versions (#13)
Browse files Browse the repository at this point in the history
feat: support new laravel versions
  • Loading branch information
atymic authored Oct 22, 2019
2 parents 1c15066 + 739e23b commit d541d0a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
build
composer.phar
composer.lock
.phpunit.result.cache
2 changes: 0 additions & 2 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
preset: laravel

linting: true
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
language: php

php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3

env:
matrix:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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

Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-html" target="build/coverage"/>
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
Expand Down
13 changes: 6 additions & 7 deletions tests/ChannelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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);
Expand All @@ -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');

Expand Down Expand Up @@ -81,7 +81,6 @@ public function routeNotificationForTrello()
}
}


class TestNotification extends Notification
{
public function toTrello($notifiable)
Expand Down
5 changes: 3 additions & 2 deletions tests/MessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit d541d0a

Please sign in to comment.