Skip to content

Commit af7c5e6

Browse files
authored
Merge pull request laravel-notification-channels#35 from atymic/support-newer-laravel
chore: support newer laravel
2 parents af6a44b + 23c1e44 commit af7c5e6

File tree

7 files changed

+21
-24
lines changed

7 files changed

+21
-24
lines changed

.styleci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
preset: laravel
2-
3-
linting: true

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
language: php
22

33
php:
4-
- 5.6
5-
- 7.0
6-
- 7.1
4+
- 7.2
5+
- 7.3
76

87
env:
98
matrix:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Pusher push notifications channel for Laravel 5.3
1+
# Pusher push notifications channel for Laravel 5.5+ & 6.0
22

33
[![Latest Version on Packagist](https://img.shields.io/packagist/v/laravel-notification-channels/pusher-push-notifications.svg?style=flat-square)](https://packagist.org/packages/laravel-notification-channels/pusher-push-notifications)
44
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
@@ -9,7 +9,7 @@
99
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/laravel-notification-channels/pusher-push-notifications/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/laravel-notification-channels/pusher-push-notifications/?branch=master)
1010
[![Total Downloads](https://img.shields.io/packagist/dt/laravel-notification-channels/pusher-push-notifications.svg?style=flat-square)](https://packagist.org/packages/laravel-notification-channels/pusher-push-notifications)
1111

12-
This package makes it easy to send [Pusher push notifications](https://pusher.com/docs/push_notifications) with Laravel 5.3.
12+
This package makes it easy to send [Pusher push notifications](https://pusher.com/docs/push_notifications) with Laravel.
1313

1414
## Contents
1515

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@
3232
}
3333
],
3434
"require": {
35-
"php": ">=5.6.4",
36-
"illuminate/events": "5.3.* || 5.4.* || 5.5.* || 5.6.*",
37-
"illuminate/notifications": "5.3.* || 5.4.* || 5.5.* || 5.6.*",
38-
"illuminate/queue": "5.3.* || 5.4.* || 5.5.* || 5.6.*",
39-
"illuminate/support": "5.3.* || 5.4.* || 5.5.* || 5.6.*",
40-
"pusher/pusher-php-server": "2.6.*"
35+
"php": ">=7.0",
36+
"illuminate/events": "~5.5 || ~6.0",
37+
"illuminate/notifications": "~5.5 || ~6.0",
38+
"illuminate/queue": "~5.5 || ~6.0",
39+
"illuminate/support": "~5.5 || ~6.0",
40+
"pusher/pusher-php-server": "~3.0 || ~4.0"
4141
},
4242
"require-dev": {
4343
"mockery/mockery": "^0.9.5",
44-
"phpunit/phpunit": "4.*"
44+
"phpunit/phpunit": "5.*"
4545
},
4646
"autoload": {
4747
"psr-4": {

src/PusherChannel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
namespace NotificationChannels\PusherPushNotifications;
44

5-
use Pusher;
5+
use Pusher\Pusher;
66
use Illuminate\Events\Dispatcher;
77
use Illuminate\Notifications\Notification;
88
use Illuminate\Notifications\Events\NotificationFailed;
99

1010
class PusherChannel
1111
{
1212
/**
13-
* @var \Pusher
13+
* @var Pusher
1414
*/
1515
protected $pusher;
1616

@@ -20,7 +20,7 @@ class PusherChannel
2020
private $events;
2121

2222
/**
23-
* @param \Pusher $pusher
23+
* @param Pusher $pusher
2424
*/
2525
public function __construct(Pusher $pusher, Dispatcher $events)
2626
{
@@ -42,7 +42,7 @@ public function send($notifiable, Notification $notification)
4242
?: $this->interestName($notifiable);
4343

4444
$response = $this->pusher->notify(
45-
$interest,
45+
is_array($interest) ? $interest : [$interest],
4646
$notification->toPushNotification($notifiable)->toArray(),
4747
true
4848
);

src/PusherPushNotificationsServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace NotificationChannels\PusherPushNotifications;
44

5+
use Pusher\Pusher;
56
use Illuminate\Support\ServiceProvider;
6-
use Pusher;
77

88
class PusherPushNotificationsServiceProvider extends ServiceProvider
99
{

tests/ChannelTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
namespace NotificationChannels\PusherPushNotifications\Test;
44

5+
use Mockery;
6+
use Pusher\Pusher;
7+
use PHPUnit_Framework_TestCase;
58
use Illuminate\Events\Dispatcher;
6-
use Illuminate\Notifications\Events\NotificationFailed;
79
use Illuminate\Notifications\Notifiable;
8-
use NotificationChannels\PusherPushNotifications\PusherChannel;
910
use Illuminate\Notifications\Notification;
11+
use Illuminate\Notifications\Events\NotificationFailed;
12+
use NotificationChannels\PusherPushNotifications\PusherChannel;
1013
use NotificationChannels\PusherPushNotifications\PusherMessage;
11-
use PHPUnit_Framework_TestCase;
12-
use Mockery;
13-
use Pusher;
1414

1515
class ChannelTest extends PHPUnit_Framework_TestCase
1616
{

0 commit comments

Comments
 (0)