Skip to content

Commit 6e580fa

Browse files
authored
Merge pull request #62 from laravel-shift/l12-compatibility
Laravel 12.x Compatibility
2 parents 27792ad + 57dff93 commit 6e580fa

File tree

6 files changed

+31
-36
lines changed

6 files changed

+31
-36
lines changed

.github/workflows/cs.yml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,25 @@
1-
name: Check & Fix Styling
1+
name: Fix PHP code style issues
22

3-
on: [push]
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
8+
permissions:
9+
contents: write
410

511
jobs:
6-
php-cs-fixer:
12+
php-code-styling:
713
runs-on: ubuntu-latest
8-
strategy:
9-
matrix:
10-
php: [ '8.2' ]
11-
dependency-version: [ prefer-stable ]
12-
13-
name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.parallel }}
1414

1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v3
1818
with:
1919
ref: ${{ github.head_ref }}
2020

21-
- name: Setup PHP
22-
uses: shivammathur/setup-php@v2
23-
with:
24-
php-version: ${{ matrix.php }}
25-
tools: composer:v2
26-
coverage: none
27-
28-
- name: Install PHP dependencies
29-
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress
30-
31-
- name: Run Pint
32-
run: php vendor/bin/pint -v
21+
- name: Fix PHP code style issues
22+
uses: aglipanci/[email protected]
3323

3424
- name: Commit changes
3525
uses: stefanzweifel/git-auto-commit-action@v4

.github/workflows/run-tests.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,22 @@ jobs:
1212
fail-fast: true
1313
matrix:
1414
os: [ubuntu-latest, macos-latest]
15-
php: [8.2]
16-
laravel: ['10.*', '11.*']
15+
php: [8.2, 8.3, 8.4]
16+
laravel: [10.*, 11.*, 12.*]
1717
stability: [prefer-lowest, prefer-stable]
1818
include:
1919
- laravel: 10.*
20-
testbench: 8.*
21-
workbench: 8.*
20+
testbench: '^8.34'
21+
workbench: '^8.17'
2222
- laravel: 11.*
2323
testbench: 9.*
2424
workbench: 9.*
25+
- laravel: 12.*
26+
testbench: 10.*
27+
workbench: 10.*
28+
exclude:
29+
- php: 8.4
30+
laravel: 10.*
2531

2632
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2733

composer.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@
1616
],
1717
"require": {
1818
"php": "^8.2",
19-
"illuminate/contracts": "^10.0|^11.0",
19+
"illuminate/contracts": "^10.0|^11.0|^12.0",
2020
"spatie/laravel-package-tools": "^1.9.2",
2121
"tonysm/globalid-laravel": "^1.1"
2222
},
2323
"require-dev": {
2424
"laravel/pint": "^1.10",
2525
"livewire/livewire": "^3.4",
2626
"nunomaduro/collision": "^6.0|^8.0",
27-
"orchestra/testbench": "^8.21|^9.0",
28-
"orchestra/workbench": "^8.0|^9.0",
29-
"phpunit/phpunit": "^10.5",
27+
"orchestra/testbench": "^8.21|^9.0|^10.0",
28+
"orchestra/workbench": "^8.0|^9.0|^10.0",
29+
"phpunit/phpunit": "^10.5|^11.5.3",
3030
"symfony/html-sanitizer": "^7.0"
3131
},
3232
"autoload": {
@@ -63,8 +63,7 @@
6363
"@php vendor/bin/testbench serve"
6464
],
6565
"lint": [
66-
"@php vendor/bin/pint",
67-
"@php vendor/bin/phpstan analyse"
66+
"@php vendor/bin/pint"
6867
]
6968
},
7069
"config": {

tests/ContentTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
class ContentTest extends TestCase
1616
{
17-
public function setUp(): void
17+
protected function setUp(): void
1818
{
1919
parent::setUp();
2020

tests/RemoteFileTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static function filesizesProvider()
3333
*
3434
* @dataProvider filesizesProvider
3535
*/
36-
public function converts_file_size_to_human_readable($bytes, $humanReadable)
36+
public function converts_file_size_to_human_readable($bytes, $human)
3737
{
3838
$file = new RemoteFile([
3939
'url' => 'not-relevant',
@@ -43,6 +43,6 @@ public function converts_file_size_to_human_readable($bytes, $humanReadable)
4343
'filesize' => $bytes,
4444
]);
4545

46-
$this->assertEquals($humanReadable, $file->filesizeForHumans());
46+
$this->assertEquals($human, $file->filesizeForHumans());
4747
}
4848
}

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class TestCase extends Orchestra
1313
use RefreshDatabase;
1414
use WithWorkbench;
1515

16-
public function setUp(): void
16+
protected function setUp(): void
1717
{
1818
parent::setUp();
1919

0 commit comments

Comments
 (0)