Skip to content

Commit

Permalink
Add laravel 11.x support
Browse files Browse the repository at this point in the history
  • Loading branch information
faytekin committed Mar 12, 2024
1 parent 122d3e1 commit fba9fbc
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 11 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
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
},
"require": {
"php": "^8.0",
"illuminate/notifications": "^8.0|^9.0|^10.0",
"illuminate/support": "^8.0|^9.0|^10.0",
"illuminate/notifications": "^8.0|^9.0|^10.0|^11.0",
"illuminate/support": "^8.0|^9.0|^10.0|^11.0",
"twilio/sdk": "^7.0"
},
"require-dev": {
"orchestra/testbench": "^8.0",
"orchestra/testbench": "^8.0|^9.0",
"phpunit/phpunit": "^10.0"
},
"config": {
Expand All @@ -47,6 +47,6 @@
]
}
},
"minimum-stability": "stable",
"minimum-stability": "dev",
"prefer-stable": true
}
7 changes: 0 additions & 7 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,8 @@
processIsolation="false"
stopOnError="true"
stopOnFailure="true"
cacheDirectory=".phpunit.cache"
cacheResult="true"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
<testsuites>
<testsuite name="Twilio Test Suite">
<directory>tests</directory>
Expand Down

0 comments on commit fba9fbc

Please sign in to comment.