Skip to content

Commit 3722611

Browse files
authored
Laravel 12 (#60)
* update: added laravel 12 support * docs: updated version note in docs
1 parent 0dc9a56 commit 3722611

File tree

4 files changed

+36
-26
lines changed

4 files changed

+36
-26
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,20 @@ jobs:
99
fail-fast: true
1010
matrix:
1111
php: [ 8.2, 8.3, 8.4 ]
12-
laravel: [ 11.0 ]
12+
laravel: [ 11.0, 12.0 ]
1313
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
1414
steps:
1515
- name: Checkout code
1616
uses: actions/checkout@v4
1717

18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php }}
22+
tools: composer:v2
23+
extensions: dom, curl, libxml, mbstring, zip, pcntl, gd, soap
24+
coverage: none
25+
1826
- name: Get composer cache directory
1927
id: composer-cache
2028
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
@@ -26,14 +34,6 @@ jobs:
2634
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}
2735
restore-keys: ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.laravel }}-
2836

29-
- name: Setup PHP
30-
uses: shivammathur/setup-php@v2
31-
with:
32-
php-version: ${{ matrix.php }}
33-
tools: composer:v2
34-
extensions: dom, curl, libxml, mbstring, zip, pcntl, gd, soap
35-
coverage: none
36-
3737
- name: Install dependencies
3838
run: composer require "illuminate/auth:^${{ matrix.laravel }}" "illuminate/config:^${{ matrix.laravel }}" "illuminate/database:^${{ matrix.laravel }}" "illuminate/support:^${{ matrix.laravel }}" "illuminate/translation:^${{ matrix.laravel }}" --prefer-stable --prefer-dist --no-interaction
3939

@@ -47,6 +47,14 @@ jobs:
4747
- name: Checkout
4848
uses: actions/checkout@v4
4949

50+
- name: Setup PHP
51+
uses: shivammathur/setup-php@v2
52+
with:
53+
php-version: '8.2'
54+
tools: composer:v2
55+
extensions: dom, curl, libxml, mbstring, zip, pcntl, gd, soap
56+
coverage: none
57+
5058
- name: Get Composer Cache Directory
5159
id: composer-cache
5260
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
@@ -57,14 +65,6 @@ jobs:
5765
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
5866
restore-keys: ${{ runner.os }}-composer-
5967

60-
- name: Setup PHP
61-
uses: shivammathur/setup-php@v2
62-
with:
63-
php-version: '8.2'
64-
tools: composer:v2
65-
extensions: dom, curl, libxml, mbstring, zip, pcntl, gd, soap
66-
coverage: none
67-
6868
- name: Install dependencies
6969
run: composer install --no-suggest --prefer-dist --no-interaction --optimize-autoloader
7070

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ vendor/
55

66
# phpunit
77
.phpunit.result.cache
8+
.phpunit.cache
89

910
# composer
1011
composer.lock

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This means that the method for storage must be efficient, unlike other packages
2323

2424
### Laravel
2525

26-
You are reading the documentation for 11.x.
26+
You are reading the documentation for Laravel 11.x and 12.x.
2727

2828
* If you're using Laravel 9 or 10 please see the docs for [4.x](https://github.com/sourcetoad/Logger/releases/tag/v4.2.0).
2929
* If you're using Laravel 6, 7 or 8 please see the docs for [3.x](https://github.com/sourcetoad/Logger/releases/tag/v3.0.1).

composer.json

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@
1717
"require": {
1818
"ext-json": "*",
1919
"php": "^8.2||^8.3||^8.4",
20-
"illuminate/auth": "^11.0",
21-
"illuminate/config": "^11.0",
22-
"illuminate/database": "^11.0",
23-
"illuminate/support": "^11.0",
24-
"illuminate/translation": "^11.0"
20+
"illuminate/auth": "^11.0|^12.0",
21+
"illuminate/config": "^11.0|^12.0",
22+
"illuminate/database": "^11.0|^12.0",
23+
"illuminate/support": "^11.0|^12.0",
24+
"illuminate/translation": "^11.0|^12.0"
2525
},
2626
"require-dev": {
27-
"laravel/pint": "^1.19",
28-
"orchestra/testbench": "^9.5",
29-
"phpunit/phpunit": "^11.2"
27+
"laravel/pint": "1.21",
28+
"orchestra/testbench": "^9.5|^10.0",
29+
"phpunit/phpunit": "^11.5"
3030
},
3131
"autoload": {
3232
"psr-4": {
@@ -47,5 +47,14 @@
4747
"Logger": "Sourcetoad\\Logger\\LoggerFacade"
4848
}
4949
}
50+
},
51+
"scripts": {
52+
"check-code": [
53+
"@lint",
54+
"@test"
55+
],
56+
"lint": "@php vendor/bin/pint --test",
57+
"lint:fix": "@php vendor/bin/pint",
58+
"test": "@php vendor/bin/phpunit"
5059
}
5160
}

0 commit comments

Comments
 (0)