Skip to content

Commit 32cec2d

Browse files
authored
Merge pull request #90 from worksome/JIRA-14531_no-dynamic-where-rule
feat: JIRA-14531 Cleanup Larastan Strict Rules
2 parents e15b625 + 433f624 commit 32cec2d

File tree

2 files changed

+53
-70
lines changed

2 files changed

+53
-70
lines changed

composer.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
"php": "^8.2",
77
"composer-plugin-api": "^2.0",
88
"canvural/larastan-strict-rules": "^3.0",
9-
"larastan/larastan": "^3.0",
10-
"phpstan/phpstan": "^2.0",
9+
"larastan/larastan": "^3.1",
10+
"phpstan/phpstan": "^2.1",
1111
"phpstan/phpstan-deprecation-rules": "^2.0",
1212
"phpstan/phpstan-mockery": "^2.0",
1313
"rector/rector": "^2.0",
14-
"slevomat/coding-standard": "^8.15",
15-
"spaze/phpstan-disallowed-calls": "^4.0.1",
16-
"symplify/easy-coding-standard": "^12.4"
14+
"slevomat/coding-standard": "^8.16",
15+
"spaze/phpstan-disallowed-calls": "^4.4",
16+
"symplify/easy-coding-standard": "^12.5"
1717
},
1818
"require-dev": {
19-
"composer/composer": "^2.7",
20-
"friendsofphp/php-cs-fixer": "^3.53",
21-
"orchestra/testbench": "^9.5",
22-
"pestphp/pest": "^3.0",
19+
"composer/composer": "^2.8",
20+
"friendsofphp/php-cs-fixer": "^3.70",
21+
"orchestra/testbench": "^9.11",
22+
"pestphp/pest": "^3.7",
2323
"spatie/invade": "^1.1.1",
24-
"squizlabs/php_codesniffer": "^3.8"
24+
"squizlabs/php_codesniffer": "^3.11"
2525
},
2626
"autoload": {
2727
"psr-4": {

larastan.neon

+43-60
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,51 @@
11
includes:
22
- ./phpstan.neon
33
- ../../larastan/larastan/extension.neon
4+
- ../../canvural/larastan-strict-rules/rules.neon
45

56
parameters:
7+
larastanStrictRules:
8+
allRules: false
9+
noFacade: true
10+
noValidationInController: true
11+
scopeShouldReturnQueryBuilder: true
12+
noPropertyAccessor: true
13+
noGlobalLaravelFunction: true
14+
allowedGlobalFunctions:
15+
- class_basename
16+
- class_uses_recursive
17+
- e
18+
- env
19+
- object_get
20+
- preg_replace_array
21+
- retry
22+
- str
23+
- tap
24+
- throw_if
25+
- throw_unless
26+
- trait_uses_recursive
27+
- with
28+
- collect
29+
- data_fill
30+
- data_get
31+
- data_set
32+
- value
33+
- config
34+
- fake
35+
- method_field
36+
- now
37+
- old
38+
- redirect
39+
- response
40+
- route
41+
- trans
42+
- trans_choice
43+
- __
44+
- view
45+
- url
46+
- secure_url
47+
- asset
48+
- secure_asset
649
worksomeLaravel:
750
allRules: true
851
disallowEnvironmentChecks: %worksomeLaravel.allRules%
@@ -40,66 +83,6 @@ services:
4083
class: Worksome\CodingStyle\PHPStan\Laravel\EnforceKebabCaseArtisanCommandsRule
4184
-
4285
class: Worksome\CodingStyle\PHPStan\Laravel\Migrations\RequireWithoutTimestampsRule
43-
-
44-
class: Vural\LarastanStrictRules\Rules\NoDynamicWhereRule
45-
tags:
46-
- phpstan.rules.rule
47-
-
48-
class: Vural\LarastanStrictRules\Rules\NoFacadeRule
49-
tags:
50-
- phpstan.rules.rule
51-
-
52-
class: Vural\LarastanStrictRules\Rules\NoValidationInControllerRule
53-
tags:
54-
- phpstan.rules.rule
55-
-
56-
class: Vural\LarastanStrictRules\Rules\ScopeShouldReturnQueryBuilderRule
57-
tags:
58-
- phpstan.rules.rule
59-
-
60-
class: Vural\LarastanStrictRules\Rules\NoPropertyAccessorRule
61-
tags:
62-
- phpstan.rules.rule
63-
-
64-
class: Vural\LarastanStrictRules\Rules\NoGlobalLaravelFunctionRule
65-
arguments:
66-
allowedFunctions:
67-
- class_basename
68-
- class_uses_recursive
69-
- e
70-
- env
71-
- object_get
72-
- preg_replace_array
73-
- retry
74-
- str
75-
- tap
76-
- throw_if
77-
- throw_unless
78-
- trait_uses_recursive
79-
- with
80-
- collect
81-
- data_fill
82-
- data_get
83-
- data_set
84-
- value
85-
- config
86-
- fake
87-
- method_field
88-
- now
89-
- old
90-
- redirect
91-
- response
92-
- route
93-
- trans
94-
- trans_choice
95-
- __
96-
- view
97-
- url
98-
- secure_url
99-
- asset
100-
- secure_asset
101-
tags:
102-
- phpstan.rules.rule
10386

10487
conditionalTags:
10588
Worksome\CodingStyle\PHPStan\Laravel\DisallowEnvironmentCheck\DisallowEnvironmentCheckRule:

0 commit comments

Comments
 (0)