Skip to content

Commit 133f08f

Browse files
committed
feat(laravel version): add support for laravel 12
1 parent 1e5ad66 commit 133f08f

File tree

3 files changed

+704
-1805
lines changed

3 files changed

+704
-1805
lines changed

.github/workflows/main_action.yml

Lines changed: 50 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,79 @@
11
name: A1 Pdf Sign Tests
22

33
on:
4-
push:
5-
branches: [ main, dev, v1.x-dev ]
64
pull_request:
75
branches: [ main, dev, v1.x-dev ]
86

97
permissions:
108
contents: read
119

1210
jobs:
13-
run:
14-
runs-on: ${{ matrix.operating-system }}
11+
test:
12+
runs-on: ubuntu-latest
13+
1514
strategy:
1615
fail-fast: false
1716
matrix:
18-
operating-system: [ ubuntu-latest ]
19-
php-versions: [ '8.1', '8.2', '8.3' ]
20-
laravel-version: [ '11.*','10.*','9.*' ]
21-
env:
22-
extensions: mbstring, dom, fileinfo, openssl, json, imagick, swoole, sqlite3
23-
key: cache-v5
24-
name: PHP ${{ matrix.php-versions }} - Laravel ${{ matrix.laravel-version }} - ${{ matrix.operating-system}}
17+
include:
18+
# Laravel 9 supports PHP 8.1–8.2
19+
- php: 8.1
20+
laravel: 9.*
21+
- php: 8.2
22+
laravel: 9.*
23+
24+
# Laravel 10 supports PHP 8.1–8.3
25+
- php: 8.1
26+
laravel: 10.*
27+
- php: 8.2
28+
laravel: 10.*
29+
- php: 8.3
30+
laravel: 10.*
31+
32+
# Laravel 11 supports PHP 8.2–8.4
33+
- php: 8.2
34+
laravel: 11.*
35+
- php: 8.3
36+
laravel: 11.*
37+
- php: 8.4
38+
laravel: 11.*
39+
40+
# Laravel 12 supports PHP 8.2–8.4
41+
- php: 8.2
42+
laravel: 12.*
43+
- php: 8.3
44+
laravel: 12.*
45+
- php: 8.4
46+
laravel: 12.*
47+
48+
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
49+
2550
steps:
2651
- name: Checkout
2752
uses: actions/checkout@v4
2853

29-
- name: Setup cache environment
30-
id: cache-env
31-
uses: shivammathur/cache-extensions@develop
32-
with:
33-
php-version: ${{ matrix.php-versions }}
34-
extensions: ${{ env.extensions }}
35-
key: ${{ env.key }}
36-
37-
- name: Cache extensions
38-
uses: actions/cache@v4
39-
with:
40-
path: ${{ steps.cache-env.outputs.dir }}
41-
key: ${{ steps.cache-env.outputs.key }}
42-
restore-keys: ${{ steps.cache-env.outputs.key }}
43-
44-
- name: Setup PHP with latest versions
54+
- name: Setup PHP
4555
uses: shivammathur/setup-php@v2
4656
with:
47-
php-version: ${{ matrix.php-versions }}
48-
env:
49-
update: true
57+
php-version: ${{ matrix.php }}
58+
extensions: mbstring, dom, fileinfo, openssl, json, imagick, swoole, sqlite3
59+
coverage: none
5060

51-
- name: Testing PHP version
61+
- name: Validate PHP and Composer
5262
run: |
5363
php -v
54-
php -r "if(strpos(phpversion(), '${{ matrix.php-versions }}') === false) {throw new Exception('Wrong PHP version Installed');}"
55-
56-
- name: Testing Composer version
57-
run: |
5864
composer -V
59-
php -r "if(strpos(@exec('composer -V'), 'Composer version') === false) {throw new Exception('Composer not found');}"
65+
composer validate
6066
61-
- name: Validate composer.json and composer.lock
67+
- name: Configure Laravel Version
6268
run: |
63-
composer validate
69+
composer require "illuminate/support:${{ matrix.laravel }}" \
70+
"illuminate/encryption:${{ matrix.laravel }}" \
71+
"illuminate/http:${{ matrix.laravel }}" \
72+
--no-interaction --no-update
6473
6574
- name: Install dependencies
6675
run: |
67-
composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
76+
composer update --prefer-dist --no-interaction --no-progress
6877
69-
- name: Execute tests
70-
run: |
71-
vendor/bin/testbench package:test
78+
- name: Run tests
79+
run: composer test

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@
2525
}
2626
],
2727
"require": {
28-
"php": "^8.1 || ^8.2 || ^8.3",
28+
"php": ">=8.1 <8.5",
2929
"ext-gd": "*",
3030
"ext-json": "*",
3131
"ext-fileinfo": "*",
3232
"ext-mbstring": "*",
3333
"ext-openssl": "*",
34-
"illuminate/support": "^9 || ^10 || ^11",
35-
"illuminate/encryption": "^9 || ^10 || ^11",
36-
"illuminate/http": "^9 || ^10 || ^11",
34+
"illuminate/support": "^9 || ^10 || ^11 || ^12",
35+
"illuminate/encryption": "^9 || ^10 || ^11 || ^12",
36+
"illuminate/http": "^9 || ^10 || ^11 || ^12",
3737
"tecnickcom/tc-lib-pdf": "^8",
3838
"tecnickcom/tcpdf": "^6",
39-
"setasign/fpdi": "^2.3",
39+
"setasign/fpdi": "^2.6",
4040
"symfony/process": "^6 || ^7",
41-
"intervention/image": "^3.8"
41+
"intervention/image": "^3.11"
4242
},
4343
"autoload": {
4444
"psr-4": {
@@ -69,7 +69,7 @@
6969
"lsnepomuceno/laravel-brazilian-ceps": "A package for querying zip codes for Brazilian addresses."
7070
},
7171
"require-dev": {
72-
"orchestra/testbench": "^7 || ^8 || ^9",
72+
"orchestra/testbench": "^7 || ^8 || ^9 || ^10",
7373
"nunomaduro/collision": "^6 || ^7 || ^8"
7474
},
7575
"config": {

0 commit comments

Comments
 (0)