Skip to content

Commit

Permalink
Add support Laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammad-fouladgar committed Apr 12, 2024
1 parent 478e7d1 commit b808d84
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 35 deletions.
30 changes: 14 additions & 16 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,24 @@ on: [ push, pull_request ]
jobs:
test:
runs-on: ubuntu-latest
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
strategy:
fail-fast: false
matrix:
php: [8.2, 8.1, 8.0]
laravel: [9.*, 10.*]
dependency-version: [prefer-lowest, prefer-stable]
php: [ 8.3, 8.2 ]
laravel: [ 10.*, 11.* ]
stability: [ prefer-stable ]
include:
- laravel: 10.*
testbench: 8.*
carbon: ^2.63
- laravel: 9.*
testbench: 7.*
carbon: ^2.63
exclude:
- laravel: 10.*
php: 8.0

- laravel: 11.*
testbench: 9.*
carbon: ^2.63
- laravel: 10.*
testbench: 8.*
carbon: ^2.63

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -37,7 +35,7 @@ jobs:
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Run test suite
run: composer test
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fouladgar/laravel-otp",
"description": "",
"description": "This package provides convenient methods for sending and validating OTP notifications to users for authentication.",
"keywords": [
"otp",
"otp-authentication",
Expand All @@ -23,13 +23,13 @@
],
"license": "MIT",
"require": {
"php": "^8.0 || ^8.1",
"illuminate/database": "^9.0|^10.0",
"illuminate/support": "^9.0|^10.0",
"illuminate/notifications": "^9.0.2|^10.0"
"php": "^8.2",
"illuminate/database": "^10.0|^11.0",
"illuminate/support": "^10.0|^11.0",
"illuminate/notifications": "^10.0|^11.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"phpunit/phpunit": "^10.5.17",
"orchestra/testbench": "^7.0|^8.0",
"mockery/mockery": "^1.4",
"php-coveralls/php-coveralls": "^2.1"
Expand Down
26 changes: 13 additions & 13 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<exclude>
<file>src/Events/Verified.php</file>
<file>src/Notifications/Messages/Payload.php</file>
<file>src/ServiceProvider.php</file>
<file>src/Exceptions/SMSClientNotFoundException.php</file>
</exclude>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<php>
<env name="APP_ENV" value="testing"/>
<!-- <env name="DB_CONNECTION" value="testing"/>-->
<!-- <env name="DB_CONNECTION" value="testing"/>-->
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="APP_KEY" value="base64:AyJGOtNkX6q4z+XaeZv11xdtseDc4P0ZL5gw2fS2aMw="/>
</php>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
<exclude>
<file>src/Events/Verified.php</file>
<file>src/Notifications/Messages/Payload.php</file>
<file>src/ServiceProvider.php</file>
<file>src/Exceptions/SMSClientNotFoundException.php</file>
</exclude>
</source>
</phpunit>

0 comments on commit b808d84

Please sign in to comment.