Skip to content

Commit

Permalink
Merge pull request #35 from atymic/support-newer-laravel
Browse files Browse the repository at this point in the history
chore: support newer laravel
  • Loading branch information
atymic committed Sep 13, 2019
2 parents af6a44b + 23c1e44 commit af7c5e6
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 24 deletions.
2 changes: 0 additions & 2 deletions .styleci.yml
@@ -1,3 +1 @@
preset: laravel

linting: true
5 changes: 2 additions & 3 deletions .travis.yml
@@ -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
@@ -1,4 +1,4 @@
# Pusher push notifications channel for Laravel 5.3
# Pusher push notifications channel for Laravel 5.5+ & 6.0

[![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)
[![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/pusher-push-notifications/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/laravel-notification-channels/pusher-push-notifications/?branch=master)
[![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)

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

## Contents

Expand Down
14 changes: 7 additions & 7 deletions composer.json
Expand Up @@ -32,16 +32,16 @@
}
],
"require": {
"php": ">=5.6.4",
"illuminate/events": "5.3.* || 5.4.* || 5.5.* || 5.6.*",
"illuminate/notifications": "5.3.* || 5.4.* || 5.5.* || 5.6.*",
"illuminate/queue": "5.3.* || 5.4.* || 5.5.* || 5.6.*",
"illuminate/support": "5.3.* || 5.4.* || 5.5.* || 5.6.*",
"pusher/pusher-php-server": "2.6.*"
"php": ">=7.0",
"illuminate/events": "~5.5 || ~6.0",
"illuminate/notifications": "~5.5 || ~6.0",
"illuminate/queue": "~5.5 || ~6.0",
"illuminate/support": "~5.5 || ~6.0",
"pusher/pusher-php-server": "~3.0 || ~4.0"
},
"require-dev": {
"mockery/mockery": "^0.9.5",
"phpunit/phpunit": "4.*"
"phpunit/phpunit": "5.*"
},
"autoload": {
"psr-4": {
Expand Down
8 changes: 4 additions & 4 deletions src/PusherChannel.php
Expand Up @@ -2,15 +2,15 @@

namespace NotificationChannels\PusherPushNotifications;

use Pusher;
use Pusher\Pusher;
use Illuminate\Events\Dispatcher;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Events\NotificationFailed;

class PusherChannel
{
/**
* @var \Pusher
* @var Pusher
*/
protected $pusher;

Expand All @@ -20,7 +20,7 @@ class PusherChannel
private $events;

/**
* @param \Pusher $pusher
* @param Pusher $pusher
*/
public function __construct(Pusher $pusher, Dispatcher $events)
{
Expand All @@ -42,7 +42,7 @@ public function send($notifiable, Notification $notification)
?: $this->interestName($notifiable);

$response = $this->pusher->notify(
$interest,
is_array($interest) ? $interest : [$interest],
$notification->toPushNotification($notifiable)->toArray(),
true
);
Expand Down
2 changes: 1 addition & 1 deletion src/PusherPushNotificationsServiceProvider.php
Expand Up @@ -2,8 +2,8 @@

namespace NotificationChannels\PusherPushNotifications;

use Pusher\Pusher;
use Illuminate\Support\ServiceProvider;
use Pusher;

class PusherPushNotificationsServiceProvider extends ServiceProvider
{
Expand Down
10 changes: 5 additions & 5 deletions tests/ChannelTest.php
Expand Up @@ -2,15 +2,15 @@

namespace NotificationChannels\PusherPushNotifications\Test;

use Mockery;
use Pusher\Pusher;
use PHPUnit_Framework_TestCase;
use Illuminate\Events\Dispatcher;
use Illuminate\Notifications\Events\NotificationFailed;
use Illuminate\Notifications\Notifiable;
use NotificationChannels\PusherPushNotifications\PusherChannel;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Events\NotificationFailed;
use NotificationChannels\PusherPushNotifications\PusherChannel;
use NotificationChannels\PusherPushNotifications\PusherMessage;
use PHPUnit_Framework_TestCase;
use Mockery;
use Pusher;

class ChannelTest extends PHPUnit_Framework_TestCase
{
Expand Down

0 comments on commit af7c5e6

Please sign in to comment.