Skip to content

Commit e5d6e24

Browse files
committed
L13 upgrade
1 parent 130ec0b commit e5d6e24

7 files changed

Lines changed: 60 additions & 26 deletions

File tree

.github/workflows/phpstan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
runs-on: ubuntu-latest
1414
timeout-minutes: 5
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v6
1717

1818
- name: Setup PHP
1919
uses: shivammathur/setup-php@v2
2020
with:
21-
php-version: '8.2'
21+
php-version: '8.3'
2222
coverage: none
2323

2424
- name: Install composer dependencies

.github/workflows/run-tests.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,16 @@ jobs:
1717
strategy:
1818
fail-fast: true
1919
matrix:
20-
php: [ 8.4, 8.3, 8.2 ]
21-
laravel: [ 12.*, 11.*, 10.* ]
20+
php: [ 8.3, 8.4 ]
21+
laravel: [ 13.*, 12.*, 11.* ]
2222
stability: [ prefer-stable ]
2323
include:
24+
- laravel: 13.*
25+
testbench: 11.*
2426
- laravel: 12.*
2527
testbench: 10.*
2628
- laravel: 11.*
2729
testbench: 9.*
28-
- laravel: 10.*
29-
testbench: 8.*
30-
exclude:
31-
- php: 8.4
32-
laravel: 10.*
3330

3431
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
3532

composer.json

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^8.2",
20-
"illuminate/contracts": "^10.0||^11.0||^12.0",
21-
"pdphilip/elasticsearch": "^5",
22-
"pdphilip/omniterm": "^2",
23-
"pdphilip/cf-request": "^3",
19+
"php": "^8.3",
20+
"illuminate/contracts": "^11.0||^12.0||^13.0",
21+
"pdphilip/elasticsearch": "^5.6",
22+
"pdphilip/omniterm": "^3.0",
23+
"pdphilip/cf-request": "^3.1",
2424
"spatie/laravel-package-tools": "^1.16"
2525
},
2626
"require-dev": {
2727
"laravel/pint": "^1.14",
28-
"larastan/larastan": "^2||^3",
29-
"nunomaduro/collision": "^7.10.0||^8.1.1",
30-
"orchestra/testbench": "^8.0||^9.0||^10.0",
31-
"pestphp/pest": "^2||^3",
32-
"pestphp/pest-plugin-arch": "^2||^3",
33-
"pestphp/pest-plugin-laravel": "^2||^3",
34-
"phpstan/extension-installer": "^1.3",
35-
"phpstan/phpstan-deprecation-rules": "^1||^2",
36-
"phpstan/phpstan-phpunit": "^1||^2"
28+
"larastan/larastan": "^3",
29+
"nunomaduro/collision": "^8.1.1",
30+
"orchestra/testbench": "^9.0||^10.0||^11.0",
31+
"pestphp/pest": "^3||^4",
32+
"pestphp/pest-plugin-arch": "^3||^4",
33+
"pestphp/pest-plugin-laravel": "^3||^4",
34+
"phpstan/extension-installer": "^1.4||^2.0",
35+
"phpstan/phpstan-deprecation-rules": "^2",
36+
"phpstan/phpstan-phpunit": "^2"
3737
},
3838
"autoload": {
3939
"psr-4": {
@@ -70,6 +70,24 @@
7070
"@test:lint",
7171
"@test:types",
7272
"@test:unit"
73+
],
74+
"test:l11": [
75+
"@composer update --with laravel/framework:^11.0 --prefer-stable --no-interaction --quiet",
76+
"@test:unit"
77+
],
78+
"test:l12": [
79+
"@composer update --with laravel/framework:^12.0 --prefer-stable --no-interaction --quiet",
80+
"@test:unit"
81+
],
82+
"test:l13": [
83+
"@composer update --with laravel/framework:^13.0 --prefer-stable --no-interaction --quiet",
84+
"@test:unit"
85+
],
86+
"test:all": [
87+
"Composer\\Config::disableProcessTimeout",
88+
"@test:l11",
89+
"@test:l12",
90+
"@test:l13"
7391
]
7492
},
7593
"config": {
@@ -89,4 +107,4 @@
89107
},
90108
"minimum-stability": "dev",
91109
"prefer-stable": true
92-
}
110+
}

phpstan-baseline.neon

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: '#^Parameter \#1 \$view of function view expects view\-string\|null, string given\.$#'
5+
identifier: argument.type
6+
count: 1
7+
path: src/Commands/OmniEventMakeCommand.php
8+
9+
-
10+
message: '#^Trait PDPhilip\\OmniEvent\\Eventable is used zero times and is not analysed\.$#'
11+
identifier: trait.unused
12+
count: 1
13+
path: src/Eventable.php

phpstan.neon.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ parameters:
55
level: 5
66
paths:
77
- src
8-
- config
98
tmpDir: build/phpstan
109
checkOctaneCompatibility: true
1110
checkModelProperties: true

src/Eventable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ trait Eventable
1717

1818
public static function bootEventable(): void
1919
{
20-
$eventModel = OmniEvent::fetchEventModel(new static);
20+
$eventModel = OmniEvent::fetchEventModelFromClass(static::class);
2121
$validated = $eventModel::validateSchema();
2222

2323
static::$eventModel = $eventModel;

src/OmniEvent.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ public static function fetchEventModelClass(object $baseModel): string
1616
return config('omnievent.namespaces.events').'\\'.class_basename($baseModel).'Event';
1717
}
1818

19+
public static function fetchEventModelFromClass(string $class): EventModel
20+
{
21+
$eventClass = config('omnievent.namespaces.events').'\\'.class_basename($class).'Event';
22+
23+
return new $eventClass;
24+
}
25+
1926
public static function fetchEventModel(object $baseModel): EventModel
2027
{
2128
$class = self::fetchEventModelClass($baseModel);

0 commit comments

Comments
 (0)