Skip to content

Commit d56bfdf

Browse files
committed
Update dependencies, drop PHP 8.2 and Laravel 10 support
1 parent 840c311 commit d56bfdf

File tree

3 files changed

+71
-56
lines changed

3 files changed

+71
-56
lines changed

composer.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,20 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^8.2",
20-
"illuminate/contracts": "^10.0 || ^11.0",
21-
"illuminate/database": "^10.0 || ^11.0"
19+
"php": "^8.3",
20+
"illuminate/contracts": "^11.0",
21+
"illuminate/database": "^11.0"
2222
},
2323
"require-dev": {
2424
"friendsofphp/php-cs-fixer": "^3.7",
25-
"nunomaduro/collision": "^7.10 || ^8.0",
26-
"larastan/larastan": "^2.0.1",
27-
"orchestra/testbench": "^8.0 || ^9.0",
28-
"pestphp/pest": "^2.24",
29-
"pestphp/pest-plugin-laravel": "^2.2",
25+
"nunomaduro/collision": "^8.0",
26+
"larastan/larastan": "^3.0",
27+
"orchestra/testbench": "^9.0",
28+
"pestphp/pest": "^3.0",
29+
"pestphp/pest-plugin-laravel": "^3",
3030
"phpstan/extension-installer": "^1.1",
31-
"phpstan/phpstan-deprecation-rules": "^1.0",
32-
"phpstan/phpstan-phpunit": "^1.0",
33-
"phpunit/phpunit": "^10.4",
31+
"phpstan/phpstan-deprecation-rules": "^2.0",
32+
"phpstan/phpstan-phpunit": "^2.0",
3433
"soyhuce/next-ide-helper": "^0.19.2",
3534
"tpetry/laravel-postgresql-enhanced": "^0.37.0"
3635
},

phpstan-baseline.neon

Lines changed: 61 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,152 +1,170 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: "#^PHPDoc tag @mixin contains generic class Illuminate\\\\Database\\\\Eloquent\\\\Collection but does not specify its types\\: TKey, TModel$#"
4+
message: '#^Trait Soyhuce\\EloquentExtended\\Concerns\\LoadsAttributes is used zero times and is not analysed\.$#'
5+
identifier: trait.unused
56
count: 1
6-
path: src/Mixins/CollectionMixin.php
7+
path: src/Concerns/LoadsAttributes.php
78

89
-
9-
message: "#^Call to protected method addTimestampsToUpsertValues\\(\\) of class Illuminate\\\\Database\\\\Eloquent\\\\Builder\\<TModel of Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\.$#"
10+
message: '#^Call to protected method addTimestampsToUpsertValues\(\) of class Illuminate\\Database\\Eloquent\\Builder\<TModel of Illuminate\\Database\\Eloquent\\Model\>\.$#'
11+
identifier: method.protected
1012
count: 2
1113
path: src/Mixins/Creation.php
1214

1315
-
14-
message: "#^PHPDoc tag @mixin contains generic class Illuminate\\\\Database\\\\Eloquent\\\\Builder but does not specify its types\\: TModelClass$#"
16+
message: '#^Parameter \#1 \$builder of method Illuminate\\Database\\Eloquent\\Scope\:\:apply\(\) expects Illuminate\\Database\\Eloquent\\Builder, \$this\(Soyhuce\\EloquentExtended\\Mixins\\Misc\<TModel of Illuminate\\Database\\Eloquent\\Model\>\) given\.$#'
17+
identifier: argument.type
1518
count: 1
1619
path: src/Mixins/Misc.php
1720

1821
-
19-
message: "#^Parameter \\#1 \\$builder of method Illuminate\\\\Database\\\\Eloquent\\\\Scope\\:\\:apply\\(\\) expects Illuminate\\\\Database\\\\Eloquent\\\\Builder, \\$this\\(Soyhuce\\\\EloquentExtended\\\\Mixins\\\\Misc\\) given\\.$#"
20-
count: 1
21-
path: src/Mixins/Misc.php
22-
23-
-
24-
message: "#^Call to protected method callScope\\(\\) of class Illuminate\\\\Database\\\\Eloquent\\\\Builder\\<mixed\\>\\.$#"
22+
message: '#^Call to protected method callScope\(\) of class Illuminate\\Database\\Eloquent\\Builder\<mixed\>\.$#'
23+
identifier: method.protected
2524
count: 1
2625
path: src/Mixins/Ordering.php
2726

2827
-
29-
message: "#^Call to protected method getRelationWithoutConstraints\\(\\) of class Illuminate\\\\Database\\\\Eloquent\\\\Builder\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\.$#"
28+
message: '#^Call to protected method getRelationWithoutConstraints\(\) of class Illuminate\\Database\\Eloquent\\Builder\<TModel of Illuminate\\Database\\Eloquent\\Model\>\.$#'
29+
identifier: method.protected
3030
count: 1
3131
path: src/Mixins/Ordering.php
3232

3333
-
34-
message: "#^Method Soyhuce\\\\EloquentExtended\\\\Mixins\\\\Ordering\\:\\:orderByAggregate\\(\\) invoked with 5 parameters, 0 required\\.$#"
34+
message: '#^Method Soyhuce\\EloquentExtended\\Mixins\\Ordering\<TModel of Illuminate\\Database\\Eloquent\\Model\>\:\:orderByAggregate\(\) invoked with 5 parameters, 0 required\.$#'
35+
identifier: arguments.count
3536
count: 5
3637
path: src/Mixins/Ordering.php
3738

3839
-
39-
message: "#^Method Soyhuce\\\\EloquentExtended\\\\Mixins\\\\Ordering\\:\\:orderByCount\\(\\) invoked with 3 parameters, 0 required\\.$#"
40+
message: '#^Method Soyhuce\\EloquentExtended\\Mixins\\Ordering\<TModel of Illuminate\\Database\\Eloquent\\Model\>\:\:orderByCount\(\) invoked with 3 parameters, 0 required\.$#'
41+
identifier: arguments.count
4042
count: 1
4143
path: src/Mixins/Ordering.php
4244

4345
-
44-
message: "#^Method Soyhuce\\\\EloquentExtended\\\\Mixins\\\\Ordering\\:\\:orderByExists\\(\\) invoked with 3 parameters, 0 required\\.$#"
46+
message: '#^Method Soyhuce\\EloquentExtended\\Mixins\\Ordering\<TModel of Illuminate\\Database\\Eloquent\\Model\>\:\:orderByExists\(\) invoked with 3 parameters, 0 required\.$#'
47+
identifier: arguments.count
4548
count: 1
4649
path: src/Mixins/Ordering.php
4750

4851
-
49-
message: "#^Method Soyhuce\\\\EloquentExtended\\\\Mixins\\\\Ordering\\:\\:orderByMax\\(\\) invoked with 4 parameters, 0 required\\.$#"
52+
message: '#^Method Soyhuce\\EloquentExtended\\Mixins\\Ordering\<TModel of Illuminate\\Database\\Eloquent\\Model\>\:\:orderByMax\(\) invoked with 4 parameters, 0 required\.$#'
53+
identifier: arguments.count
5054
count: 1
5155
path: src/Mixins/Ordering.php
5256

5357
-
54-
message: "#^Method Soyhuce\\\\EloquentExtended\\\\Mixins\\\\Ordering\\:\\:orderByMin\\(\\) invoked with 4 parameters, 0 required\\.$#"
58+
message: '#^Method Soyhuce\\EloquentExtended\\Mixins\\Ordering\<TModel of Illuminate\\Database\\Eloquent\\Model\>\:\:orderByMin\(\) invoked with 4 parameters, 0 required\.$#'
59+
identifier: arguments.count
5560
count: 1
5661
path: src/Mixins/Ordering.php
5762

5863
-
59-
message: "#^Method Soyhuce\\\\EloquentExtended\\\\Mixins\\\\Ordering\\:\\:orderBySum\\(\\) invoked with 4 parameters, 0 required\\.$#"
64+
message: '#^Method Soyhuce\\EloquentExtended\\Mixins\\Ordering\<TModel of Illuminate\\Database\\Eloquent\\Model\>\:\:orderBySum\(\) invoked with 4 parameters, 0 required\.$#'
65+
identifier: arguments.count
6066
count: 1
6167
path: src/Mixins/Ordering.php
6268

6369
-
64-
message: "#^Method Soyhuce\\\\EloquentExtended\\\\Mixins\\\\Ordering\\:\\:preventInvalidDirection\\(\\) invoked with 1 parameter, 0 required\\.$#"
70+
message: '#^Method Soyhuce\\EloquentExtended\\Mixins\\Ordering\<TModel of Illuminate\\Database\\Eloquent\\Model\>\:\:preventInvalidDirection\(\) invoked with 1 parameter, 0 required\.$#'
71+
identifier: arguments.count
6572
count: 3
6673
path: src/Mixins/Ordering.php
6774

6875
-
69-
message: "#^PHPDoc tag @mixin contains generic class Illuminate\\\\Database\\\\Eloquent\\\\Builder but does not specify its types\\: TModelClass$#"
70-
count: 1
71-
path: src/Mixins/Ordering.php
72-
73-
-
74-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, array\\|null given\\.$#"
76+
message: '#^Parameter \#1 \$value of function count expects array\|Countable, array\|null given\.$#'
77+
identifier: argument.type
7578
count: 1
7679
path: src/Mixins/Ordering.php
7780

7881
-
79-
message: "#^Parameter \\#2 \\$parentQuery of method Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\Relation\\<\\*\\>\\:\\:getRelationExistenceQuery\\(\\) expects Illuminate\\\\Database\\\\Eloquent\\\\Builder\\<TDeclaringModel of Illuminate\\\\Database\\\\Eloquent\\\\Model\\>, \\$this\\(Soyhuce\\\\EloquentExtended\\\\Mixins\\\\Ordering\\) given\\.$#"
82+
message: '#^Parameter \#2 \$parentQuery of method Illuminate\\Database\\Eloquent\\Relations\\Relation\<\*,\*,\*\>\:\:getRelationExistenceQuery\(\) expects Illuminate\\Database\\Eloquent\\Builder\<mixed\>, \$this\(Soyhuce\\EloquentExtended\\Mixins\\Ordering\<TModel of Illuminate\\Database\\Eloquent\\Model\>\) given\.$#'
83+
identifier: argument.type
8084
count: 1
8185
path: src/Mixins/Ordering.php
8286

8387
-
84-
message: "#^Property Illuminate\\\\Database\\\\Query\\\\Builder\\:\\:\\$orders \\(array\\) does not accept null\\.$#"
88+
message: '#^Parameter \#3 \$columns of method Illuminate\\Database\\Eloquent\\Relations\\Relation\<\*,\*,\*\>\:\:getRelationExistenceQuery\(\) expects array\<model property of never\>\|model property of never, Illuminate\\Database\\Query\\Expression given\.$#'
89+
identifier: argument.type
8590
count: 1
8691
path: src/Mixins/Ordering.php
8792

8893
-
89-
message: "#^PHPDoc tag @mixin contains generic class Illuminate\\\\Database\\\\Eloquent\\\\Builder but does not specify its types\\: TModelClass$#"
90-
count: 1
91-
path: src/Mixins/Result.php
92-
93-
-
94-
message: "#^Anonymous function should return Soyhuce\\\\EloquentExtended\\\\Mixins\\\\Select but returns Closure\\.$#"
94+
message: '#^Anonymous function should return Soyhuce\\EloquentExtended\\Mixins\\Select but returns Closure\.$#'
95+
identifier: return.type
9596
count: 2
9697
path: src/Mixins/Select.php
9798

9899
-
99-
message: "#^Binary operation \"\\.\" between Illuminate\\\\Database\\\\Query\\\\Expression\\|string and '\\.\\*' results in an error\\.$#"
100+
message: '#^Binary operation "\." between Illuminate\\Database\\Query\\Expression\|string and ''\.\*'' results in an error\.$#'
101+
identifier: binaryOp.invalid
100102
count: 1
101103
path: src/Mixins/Select.php
102104

103105
-
104-
message: "#^Call to protected method callScope\\(\\) of class Illuminate\\\\Database\\\\Eloquent\\\\Builder\\<mixed\\>\\.$#"
106+
message: '#^Call to protected method callScope\(\) of class Illuminate\\Database\\Eloquent\\Builder\<mixed\>\.$#'
107+
identifier: method.protected
105108
count: 1
106109
path: src/Mixins/Select.php
107110

108111
-
109-
message: "#^Call to protected method getRelationWithoutConstraints\\(\\) of class Illuminate\\\\Database\\\\Eloquent\\\\Builder\\<TModelClass of Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\.$#"
112+
message: '#^Call to protected method getRelationWithoutConstraints\(\) of class Illuminate\\Database\\Eloquent\\Builder\<TModel of Illuminate\\Database\\Eloquent\\Model\>\.$#'
113+
identifier: method.protected
110114
count: 1
111115
path: src/Mixins/Select.php
112116

113117
-
114-
message: "#^Call to protected method parseWithRelations\\(\\) of class Illuminate\\\\Database\\\\Eloquent\\\\Builder\\<TModelClass of Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\.$#"
118+
message: '#^Call to protected method parseWithRelations\(\) of class Illuminate\\Database\\Eloquent\\Builder\<TModel of Illuminate\\Database\\Eloquent\\Model\>\.$#'
119+
identifier: method.protected
115120
count: 1
116121
path: src/Mixins/Select.php
117122

118123
-
119-
message: "#^Method Soyhuce\\\\EloquentExtended\\\\Mixins\\\\Select\\<TModelClass of Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\:\\:withAggregateFunction\\(\\) invoked with 2 parameters, 0 required\\.$#"
124+
message: '#^Method Soyhuce\\EloquentExtended\\Mixins\\Select\<TModel of Illuminate\\Database\\Eloquent\\Model\>\:\:withAggregateFunction\(\) invoked with 2 parameters, 0 required\.$#'
125+
identifier: arguments.count
120126
count: 2
121127
path: src/Mixins/Select.php
122128

123129
-
124-
message: "#^Parameter \\#1 \\$query of method Soyhuce\\\\EloquentExtended\\\\Aggregates\\\\Contracts\\\\AggregateFunction\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\:\\:apply\\(\\) expects Illuminate\\\\Database\\\\Eloquent\\\\Builder\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>, \\$this\\(Soyhuce\\\\EloquentExtended\\\\Mixins\\\\Select\\<TModelClass of Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\) given\\.$#"
130+
message: '#^PHPDoc tag @param has invalid value \(\\Soyhuce\\EloquentExtended\\Aggregates\\Contracts\\AggregateFunction\<TModel\>\)\: Unexpected token "\\n ", expected variable at offset 167 on line 3$#'
131+
identifier: phpDoc.parseError
132+
count: 1
133+
path: src/Mixins/Select.php
134+
135+
-
136+
message: '#^Parameter \#1 \$query of method Soyhuce\\EloquentExtended\\Aggregates\\Contracts\\AggregateFunction\<Illuminate\\Database\\Eloquent\\Model\>\:\:apply\(\) expects Illuminate\\Database\\Eloquent\\Builder\<Illuminate\\Database\\Eloquent\\Model\>, \$this\(Soyhuce\\EloquentExtended\\Mixins\\Select\<TModel of Illuminate\\Database\\Eloquent\\Model\>\) given\.$#'
137+
identifier: argument.type
125138
count: 1
126139
path: src/Mixins/Select.php
127140

128141
-
129-
message: "#^Parameter \\#1 \\$query of method Soyhuce\\\\EloquentExtended\\\\Aggregates\\\\Contracts\\\\MultiRelationAggregate\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\:\\:enclose\\(\\) expects Illuminate\\\\Database\\\\Eloquent\\\\Builder\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>, \\$this\\(Soyhuce\\\\EloquentExtended\\\\Mixins\\\\Select\\<TModelClass of Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\) given\\.$#"
142+
message: '#^Parameter \#1 \$query of method Soyhuce\\EloquentExtended\\Aggregates\\Contracts\\MultiRelationAggregate\<Illuminate\\Database\\Eloquent\\Model\>\:\:enclose\(\) expects Illuminate\\Database\\Eloquent\\Builder\<Illuminate\\Database\\Eloquent\\Model\>, \$this\(Soyhuce\\EloquentExtended\\Mixins\\Select\<TModel of Illuminate\\Database\\Eloquent\\Model\>\) given\.$#'
143+
identifier: argument.type
130144
count: 1
131145
path: src/Mixins/Select.php
132146

133147
-
134-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, array\\|null given\\.$#"
148+
message: '#^Parameter \#1 \$value of function count expects array\|Countable, array\|null given\.$#'
149+
identifier: argument.type
135150
count: 1
136151
path: src/Mixins/Select.php
137152

138153
-
139-
message: "#^Parameter \\#1 \\$value of static method Illuminate\\\\Support\\\\Str\\:\\:snake\\(\\) expects string, string\\|null given\\.$#"
154+
message: '#^Parameter \#1 \$value of static method Illuminate\\Support\\Str\:\:snake\(\) expects string, string\|null given\.$#'
155+
identifier: argument.type
140156
count: 1
141157
path: src/Mixins/Select.php
142158

143159
-
144-
message: "#^Parameter \\#2 \\$parentQuery of method Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\Relation\\<\\*\\>\\:\\:getRelationExistenceQuery\\(\\) expects Illuminate\\\\Database\\\\Eloquent\\\\Builder\\<TDeclaringModel of Illuminate\\\\Database\\\\Eloquent\\\\Model\\>, \\$this\\(Soyhuce\\\\EloquentExtended\\\\Mixins\\\\Select\\<TModelClass of Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\) given\\.$#"
160+
message: '#^Parameter \#2 \$parentQuery of method Illuminate\\Database\\Eloquent\\Relations\\Relation\<\*,\*,\*\>\:\:getRelationExistenceQuery\(\) expects Illuminate\\Database\\Eloquent\\Builder\<mixed\>, \$this\(Soyhuce\\EloquentExtended\\Mixins\\Select\<TModel of Illuminate\\Database\\Eloquent\\Model\>\) given\.$#'
161+
identifier: argument.type
145162
count: 1
146163
path: src/Mixins/Select.php
147164

148165
-
149-
message: "#^Property Illuminate\\\\Database\\\\Query\\\\Builder\\:\\:\\$orders \\(array\\) does not accept null\\.$#"
166+
message: '#^Parameter \#3 \$columns of method Illuminate\\Database\\Eloquent\\Relations\\Relation\<\*,\*,\*\>\:\:getRelationExistenceQuery\(\) expects array\<model property of never\>\|model property of never, Illuminate\\Database\\Query\\Expression given\.$#'
167+
identifier: argument.type
150168
count: 1
151169
path: src/Mixins/Select.php
152170

phpstan.neon.dist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ parameters:
77
- src
88
checkOctaneCompatibility: true
99
checkModelProperties: true
10-
checkMissingIterableValueType: true
11-

0 commit comments

Comments
 (0)