Skip to content

Commit

Permalink
Add laravel 11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
faytekin committed Mar 12, 2024
1 parent 3cf7fe2 commit cbc08f8
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 46 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Tests

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

jobs:
test:
runs-on: ubuntu-latest

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

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.

21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
## Contents
## IYS


![Tests](https://github.com/macellan/onesignal/actions/workflows/tests.yml/badge.svg)
[![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)

[![Latest Version on Packagist](https://img.shields.io/packagist/v/macellan/iys.svg?style=flat-square)](https://packagist.org/packages/macellan/onesignal)
[![StyleCI](https://github.styleci.io/repos/463069750/shield?branch=main)](https://github.styleci.io/repos/463069750?branch=main)
[![Total Downloads](https://img.shields.io/packagist/dt/macellan/iys.svg?style=flat-square)](https://packagist.org/packages/macellan/iys)

- [Installation](#installation)
- [Setting up the Iys service](#setting-up-the-IYS-service)
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"php": ">=8.1",
"ext-json": "*",
"guzzlehttp/guzzle": "^7.2|^7.0.1",
"illuminate/http": "^8.0|^9.0|^10.0",
"illuminate/support": "^8.0|^9.0|^10.0"
"illuminate/http": "^8.0|^9.0|^10.0|^11.0",
"illuminate/support": "^8.0|^9.0|^10.0|^11.0"
},
"require-dev": {
"mockery/mockery": "^1.4.4",
"orchestra/testbench": "^7.1|^8.0",
"phpunit/phpunit": "^9.5.10",
"orchestra/testbench": "^7.1|^8.0|^9.0",
"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 Iys Library 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 cbc08f8

Please sign in to comment.