Skip to content

Commit 517830e

Browse files
committed
Actualizar compatibilidad con laravel 11
1 parent 801b429 commit 517830e

File tree

3 files changed

+113
-5
lines changed

3 files changed

+113
-5
lines changed

.github/workflows/analyse.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Analyse
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
phpstan:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup PHP
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: 8.0
21+
22+
- name: Cache Composer packages
23+
id: composer-cache
24+
uses: actions/cache@v4
25+
with:
26+
path: vendor
27+
key: ${{ runner.os }}-php-8.0-${{ hashFiles('**/composer.json') }}
28+
restore-keys: |
29+
${{ runner.os }}-php-8.0-
30+
31+
- name: Install dependencies
32+
run: |
33+
composer install --no-interaction --no-progress
34+
35+
- name: Run analyse phpstan
36+
run: vendor/bin/phpstan analyse --error-format github

.github/workflows/test.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
phpunit:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
php: [8.1, 8.2, 8.3]
17+
laravel: [8.*, 9.*, 10.*, 11.*]
18+
include:
19+
- laravel: 8.*
20+
testbench: 6.*
21+
- laravel: 9.*
22+
testbench: 7.*
23+
- laravel: 10.*
24+
testbench: 8.*
25+
- laravel: 11.*
26+
testbench: 9.*
27+
exclude:
28+
- laravel: 8.*
29+
php: 8.2, 8.3
30+
- laravel: 9.*
31+
php: 8.3
32+
- laravel: 11.*
33+
php: 8.1
34+
35+
steps:
36+
- name: Checkout code
37+
uses: actions/checkout@v4
38+
39+
- name: Setup PHP
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: ${{ matrix.php }}
43+
extensions: curl, pdo, sqlite, pdo_sqlite
44+
45+
- name: Install SQLite 3
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install sqlite3
49+
50+
- name: Validate composer.json
51+
run: composer validate
52+
53+
- name: Cache Composer packages
54+
id: composer-cache
55+
uses: actions/cache@v4
56+
with:
57+
path: vendor
58+
key: ${{ runner.os }}-php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.lock') }}
59+
restore-keys: |
60+
${{ runner.os }}-php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-
61+
62+
63+
- name: Install dependencies
64+
if: steps.composer-cache.outputs.cache-hit != 'true'
65+
run: |
66+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
67+
composer update --prefer-stable --prefer-dist --no-interaction
68+
69+
- name: Run test phpunit
70+
run: vendor/bin/phpunit --stop-on-error --stop-on-failure

composer.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
}
1616
],
1717
"require": {
18-
"php": "^7.2",
19-
"guzzlehttp/guzzle": "^6.5"
18+
"php": "^7.3|^8.0",
19+
"illuminate/config": "^8.0|^9.0|^10.0|^11.0",
20+
"illuminate/events": "^8.0|^9.0|^10.0|^11.0",
21+
"guzzlehttp/guzzle": "^7.0|^7.5|^8.0|^9.0"
2022
},
2123
"require-dev": {
22-
"phpunit/phpunit": "^8.0",
23-
"orchestra/testbench": "^3.8.0|^4.0",
24+
"phpstan/phpstan": "^1.2",
25+
"phpunit/phpunit": "^9.0|^9.3|^10.0|^10.5",
26+
"orchestra/testbench": "^6.0|^7.5|^8.0|^9.0",
2427
"plesk/api-php-lib": "^1.0"
2528
},
2629
"suggest": {
@@ -39,7 +42,6 @@
3942
"scripts": {
4043
"test": "vendor/bin/phpunit",
4144
"test-coverage": "vendor/bin/phpunit --coverage-txt"
42-
4345
},
4446
"config": {
4547
"sort-packages": true

0 commit comments

Comments
 (0)