Skip to content

Commit de6ddda

Browse files
authored
Merge pull request #2 from wilsenhc/feature/add-laravel-10-support
Add PHP 8.2 and Laravel 10 support
2 parents 88c20a6 + 6b56b25 commit de6ddda

File tree

4 files changed

+80
-64
lines changed

4 files changed

+80
-64
lines changed

.github/workflows/run-tests.yml

Lines changed: 58 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3,60 +3,61 @@ name: run-tests
33
on: [push, pull_request]
44

55
jobs:
6-
test:
7-
runs-on: ${{ matrix.os }}
8-
strategy:
9-
fail-fast: true
10-
matrix:
11-
os: [ubuntu-latest]
12-
php: [7.3, 7.4, 8.0, 8.1]
13-
laravel: [6.*, 7.*, 8.*, 9.*]
14-
dependency-version: [prefer-lowest, prefer-stable]
15-
include:
16-
- laravel: 6.*
17-
testbench: 4.*
18-
- laravel: 7.*
19-
testbench: 5.*
20-
- laravel: 8.*
21-
testbench: 6.*
22-
- laravel: 9.*
23-
testbench: 7.*
24-
exclude:
25-
- php: 8.1
26-
laravel: 6.*
27-
- php: 8.1
28-
laravel: 7.*
29-
- php: 8.1
30-
laravel: 8.*
31-
dependency-version: prefer-lowest
32-
- php: 7.3
33-
laravel: 9.*
34-
- php: 7.4
35-
laravel: 9.*
36-
37-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
38-
39-
steps:
40-
- name: Checkout code
41-
uses: actions/checkout@v2
42-
43-
- name: Setup PHP
44-
uses: shivammathur/setup-php@v2
45-
with:
46-
php-version: ${{ matrix.php }}
47-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
48-
coverage: none
49-
tools: composer:v2
50-
51-
- name: Setup problem matchers
52-
run: |
53-
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
54-
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
55-
56-
- name: Install dependencies
57-
run: |
58-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
59-
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
60-
61-
- name: Execute tests
62-
run: vendor/bin/phpunit
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
os: [ubuntu-latest]
12+
php: [8.0, 8.1, 8.2]
13+
laravel: [8.*, 9.*, 10.*]
14+
dependency-version: [prefer-lowest, prefer-stable]
15+
include:
16+
- laravel: 8.*
17+
testbench: 6.*
18+
- laravel: 9.*
19+
testbench: 7.*
20+
- laravel: 10.*
21+
testbench: 8.*
22+
exclude:
23+
- php: 8.0
24+
laravel: 10.*
25+
- php: 8.1
26+
laravel: 6.*
27+
- php: 8.1
28+
laravel: 7.*
29+
- php: 8.1
30+
laravel: 8.*
31+
dependency-version: prefer-lowest
32+
- php: 8.2
33+
laravel: 9.*
34+
dependency-version: prefer-lowest
35+
- php: 8.2
36+
laravel: 8.*
37+
38+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
39+
40+
steps:
41+
- name: Checkout code
42+
uses: actions/checkout@v2
43+
44+
- name: Setup PHP
45+
uses: shivammathur/setup-php@v2
46+
with:
47+
php-version: ${{ matrix.php }}
48+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
49+
coverage: none
50+
tools: composer:v2
51+
52+
- name: Setup problem matchers
53+
run: |
54+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
55+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
56+
57+
- name: Install dependencies
58+
run: |
59+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
60+
composer update --${{ matrix.dependency-version }} --no-interaction
61+
62+
- name: Execute tests
63+
run: vendor/bin/phpunit

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
}
1818
],
1919
"require": {
20-
"php": "^7.3|^8.0",
21-
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
22-
"illuminate/contracts": "^6.0|^7.0|^8.0|^9.0"
20+
"php": "^8.0",
21+
"illuminate/support": "^8.0|^9.0|^10.0",
22+
"illuminate/contracts": "^8.0|^9.0|^10.0"
2323
},
2424
"require-dev": {
25-
"orchestra/testbench": "^4.5|^5.0|^6.0|^7.0",
25+
"orchestra/testbench": "^6.0|^7.0|^8.0",
2626
"phpunit/phpunit": "^9.4"
2727
},
2828
"autoload": {

phpunit.xml.dist

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" cacheResult="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
bootstrap="vendor/autoload.php"
5+
backupGlobals="false"
6+
backupStaticAttributes="false"
7+
colors="true"
8+
verbose="true"
9+
convertDeprecationsToExceptions="true"
10+
convertErrorsToExceptions="true"
11+
convertNoticesToExceptions="true"
12+
convertWarningsToExceptions="true"
13+
processIsolation="false"
14+
stopOnFailure="false"
15+
cacheResult="false"
16+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
17+
>
318
<coverage>
419
<include>
520
<directory suffix=".php">src/</directory>
621
</include>
722
</coverage>
823
<testsuites>
9-
<testsuite name="Wilsenhc Test Suite">
24+
<testsuite name="laravel-rif-validation test suite">
1025
<directory>tests</directory>
1126
</testsuite>
1227
</testsuites>

src/RifValidationServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class RifValidationServiceProvider extends ServiceProvider
1111
public function boot()
1212
{
1313
$this->publishes([
14-
__DIR__.'/../lang' => $this->app->langPath().'/vendor/validateRif',
14+
__DIR__ . '/../lang' => $this->app->langPath() . '/vendor/validateRif',
1515
]);
1616

1717
$this->loadTranslationsFrom(__DIR__.'/../lang/', 'validateRif');

0 commit comments

Comments
 (0)