Skip to content

Commit

Permalink
Add laravel 11 support (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
faytekin authored Mar 12, 2024
1 parent c462b64 commit 555998e
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 26 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Tests

on:
push:
pull_request:
schedule:
- cron: '0 0 * * 1'

jobs:
test:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: [ 7.4, 8.0, 8.1, 8.2, 8.3 ]
laravel: [ 8, 9, 10, 11 ]
stability: [ prefer-lowest, prefer-stable ]
exclude:
- php: 8.1
laravel: 11
- php: 8.0
laravel: 11
- php: 7.4
laravel: 11
- php: 8.0
laravel: 10
- php: 7.4
laravel: 10
- php: 7.4
laravel: 9


name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} (${{ matrix.stability }})

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, json, libxml, mbstring, zip
tools: composer:v2
coverage: none

# https://github.com/briannesbitt/Carbon/releases/tag/2.62.1
- name: Patch Carbon version
if: matrix.php == 8.2 || matrix.php == 8.3
run: |
composer require "nesbot/carbon=^2.63" --dev --no-interaction --no-update
- name: Install dependencies
run: |
composer require "illuminate/support=^${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
- name: Execute tests
run: composer test
1 change: 0 additions & 1 deletion .styleci.yml

This file was deleted.

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# OneSignal Notifications Channel for Laravel

[![Latest Version on Packagist](https://img.shields.io/packagist/v/macellan/onesignal.svg?style=flat-square)](https://packagist.org/packages/macellan/onesignal)
[![Total Downloads](https://img.shields.io/packagist/dt/macellan/onesignal.svg?style=flat-square)](https://packagist.org/packages/macellan/onesignal)
![Tests](https://github.com/macellan/onesignal/workflows/Tests/badge.svg?branch=main)
[![Latest Stable Version](https://poser.pugx.org/macellan/onesignal/v/stable)](https://packagist.org/packages/macellan/onesignal)
[![Total Downloads](https://poser.pugx.org/macellan/onesignal/downloads)](https://packagist.org/packages/macellan/onesignal)


This package makes it easy to send push notifications using [OneSignal](https://onesignal.com/) with Laravel 8.0+ and 9.0+
This package makes it easy to send push notifications using [OneSignal](https://onesignal.com/) with Laravel 8.0 and 9.0, 10.0, 11.0

This plugin sends notifications only with OneSignal Player ID.

Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
],
"require": {
"php": ">=7.4",
"ext-json": "*",
"guzzlehttp/guzzle": "^7.2|^7.0.1",
"illuminate/notifications": "^8.0|^9.0|~10.0",
"illuminate/support": "^8.0|^9.0|~10.0",
"illuminate/http": "^8.0|^9.0|~10.0",
"ext-json": "*"
"illuminate/notifications": "^8.0|^9.0|^10.0|^11.0",
"illuminate/support": "^8.0|^9.0|^10.0|^11.0",
"illuminate/http": "^8.0|^9.0|^10.0|^11.0"
},
"require-dev": {
"orchestra/testbench": "v6.24|^7.1|^8.0",
"orchestra/testbench": "v6.24|^7.1|^8.0|^9.0",
"mockery/mockery": "^1.4.4",
"phpunit/phpunit": "^9.5.10",
"phpunit/phpunit": "^9.5.10|^10.0",
"squizlabs/php_codesniffer": "^3.6"
},
"autoload": {
Expand Down
27 changes: 11 additions & 16 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="vendor/autoload.php"
backupGlobals="false"
colors="true"
processIsolation="false"
stopOnError="true"
stopOnFailure="true"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
>
<testsuites>
<testsuite name="Laravel OneSignal Notification Test Suite">
<directory suffix="Test.php">./tests/</directory>
<testsuite name="Laravel Onesignal Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<php>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
</php>
</phpunit>
</phpunit>

0 comments on commit 555998e

Please # to comment.