Skip to content

Commit bc66ab7

Browse files
Bump spaze/phpstan-disallowed-calls from 4.2.1 to 4.3.1 (#831)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Markus Staab <maggus.staab@googlemail.com>
1 parent 0ac9bbc commit bc66ab7

30 files changed

+899
-242
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"phpstan/phpstan-phpunit": "2.0.4",
99
"phpstan/phpstan-strict-rules": "2.0.3",
1010
"phpstan/phpstan-symfony": "2.0.2",
11-
"spaze/phpstan-disallowed-calls": "4.2.1",
11+
"spaze/phpstan-disallowed-calls": "4.3.1",
1212
"sqlftw/sqlftw": "0.1.17",
1313
"staabm/phpstan-baseline-analysis": "0.13.1",
1414
"staabm/phpstan-dba": "0.3.3",

composer.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/composer/autoload_classmap.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,7 @@
10941094
'Rector\\TypePerfect\\ValueObject\\MethodCallReference' => $vendorDir . '/rector/type-perfect/src/ValueObject/MethodCallReference.php',
10951095
'Spaze\\PHPStan\\Rules\\Disallowed\\Allowed\\Allowed' => $vendorDir . '/spaze/phpstan-disallowed-calls/src/Allowed/Allowed.php',
10961096
'Spaze\\PHPStan\\Rules\\Disallowed\\Allowed\\AllowedConfig' => $vendorDir . '/spaze/phpstan-disallowed-calls/src/Allowed/AllowedConfig.php',
1097+
'Spaze\\PHPStan\\Rules\\Disallowed\\Allowed\\AllowedConfigFactory' => $vendorDir . '/spaze/phpstan-disallowed-calls/src/Allowed/AllowedConfigFactory.php',
10971098
'Spaze\\PHPStan\\Rules\\Disallowed\\Allowed\\AllowedPath' => $vendorDir . '/spaze/phpstan-disallowed-calls/src/Allowed/AllowedPath.php',
10981099
'Spaze\\PHPStan\\Rules\\Disallowed\\Calls\\EchoCalls' => $vendorDir . '/spaze/phpstan-disallowed-calls/src/Calls/EchoCalls.php',
10991100
'Spaze\\PHPStan\\Rules\\Disallowed\\Calls\\EmptyCalls' => $vendorDir . '/spaze/phpstan-disallowed-calls/src/Calls/EmptyCalls.php',
@@ -1172,6 +1173,8 @@
11721173
'Spaze\\PHPStan\\Rules\\Disallowed\\Usages\\AttributeUsages' => $vendorDir . '/spaze/phpstan-disallowed-calls/src/Usages/AttributeUsages.php',
11731174
'Spaze\\PHPStan\\Rules\\Disallowed\\Usages\\ClassConstantUsages' => $vendorDir . '/spaze/phpstan-disallowed-calls/src/Usages/ClassConstantUsages.php',
11741175
'Spaze\\PHPStan\\Rules\\Disallowed\\Usages\\ConstantUsages' => $vendorDir . '/spaze/phpstan-disallowed-calls/src/Usages/ConstantUsages.php',
1176+
'Spaze\\PHPStan\\Rules\\Disallowed\\Usages\\NamespaceUsage' => $vendorDir . '/spaze/phpstan-disallowed-calls/src/Usages/NamespaceUsage.php',
1177+
'Spaze\\PHPStan\\Rules\\Disallowed\\Usages\\NamespaceUsageFactory' => $vendorDir . '/spaze/phpstan-disallowed-calls/src/Usages/NamespaceUsageFactory.php',
11751178
'Spaze\\PHPStan\\Rules\\Disallowed\\Usages\\NamespaceUsages' => $vendorDir . '/spaze/phpstan-disallowed-calls/src/Usages/NamespaceUsages.php',
11761179
'Spaze\\PHPStan\\Rules\\Disallowed\\Usages\\VariableUsages' => $vendorDir . '/spaze/phpstan-disallowed-calls/src/Usages/VariableUsages.php',
11771180
'SqlFtw\\Analyzer\\AnalyzerFlags' => $vendorDir . '/sqlftw/sqlftw/sources/Analyzer/AnalyzerFlags.php',

vendor/composer/autoload_static.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,7 @@ class ComposerStaticInit9cf8af24a7a084f114b4553be2a1ff9f
12491249
'Rector\\TypePerfect\\ValueObject\\MethodCallReference' => __DIR__ . '/..' . '/rector/type-perfect/src/ValueObject/MethodCallReference.php',
12501250
'Spaze\\PHPStan\\Rules\\Disallowed\\Allowed\\Allowed' => __DIR__ . '/..' . '/spaze/phpstan-disallowed-calls/src/Allowed/Allowed.php',
12511251
'Spaze\\PHPStan\\Rules\\Disallowed\\Allowed\\AllowedConfig' => __DIR__ . '/..' . '/spaze/phpstan-disallowed-calls/src/Allowed/AllowedConfig.php',
1252+
'Spaze\\PHPStan\\Rules\\Disallowed\\Allowed\\AllowedConfigFactory' => __DIR__ . '/..' . '/spaze/phpstan-disallowed-calls/src/Allowed/AllowedConfigFactory.php',
12521253
'Spaze\\PHPStan\\Rules\\Disallowed\\Allowed\\AllowedPath' => __DIR__ . '/..' . '/spaze/phpstan-disallowed-calls/src/Allowed/AllowedPath.php',
12531254
'Spaze\\PHPStan\\Rules\\Disallowed\\Calls\\EchoCalls' => __DIR__ . '/..' . '/spaze/phpstan-disallowed-calls/src/Calls/EchoCalls.php',
12541255
'Spaze\\PHPStan\\Rules\\Disallowed\\Calls\\EmptyCalls' => __DIR__ . '/..' . '/spaze/phpstan-disallowed-calls/src/Calls/EmptyCalls.php',
@@ -1327,6 +1328,8 @@ class ComposerStaticInit9cf8af24a7a084f114b4553be2a1ff9f
13271328
'Spaze\\PHPStan\\Rules\\Disallowed\\Usages\\AttributeUsages' => __DIR__ . '/..' . '/spaze/phpstan-disallowed-calls/src/Usages/AttributeUsages.php',
13281329
'Spaze\\PHPStan\\Rules\\Disallowed\\Usages\\ClassConstantUsages' => __DIR__ . '/..' . '/spaze/phpstan-disallowed-calls/src/Usages/ClassConstantUsages.php',
13291330
'Spaze\\PHPStan\\Rules\\Disallowed\\Usages\\ConstantUsages' => __DIR__ . '/..' . '/spaze/phpstan-disallowed-calls/src/Usages/ConstantUsages.php',
1331+
'Spaze\\PHPStan\\Rules\\Disallowed\\Usages\\NamespaceUsage' => __DIR__ . '/..' . '/spaze/phpstan-disallowed-calls/src/Usages/NamespaceUsage.php',
1332+
'Spaze\\PHPStan\\Rules\\Disallowed\\Usages\\NamespaceUsageFactory' => __DIR__ . '/..' . '/spaze/phpstan-disallowed-calls/src/Usages/NamespaceUsageFactory.php',
13301333
'Spaze\\PHPStan\\Rules\\Disallowed\\Usages\\NamespaceUsages' => __DIR__ . '/..' . '/spaze/phpstan-disallowed-calls/src/Usages/NamespaceUsages.php',
13311334
'Spaze\\PHPStan\\Rules\\Disallowed\\Usages\\VariableUsages' => __DIR__ . '/..' . '/spaze/phpstan-disallowed-calls/src/Usages/VariableUsages.php',
13321335
'SqlFtw\\Analyzer\\AnalyzerFlags' => __DIR__ . '/..' . '/sqlftw/sqlftw/sources/Analyzer/AnalyzerFlags.php',

vendor/composer/installed.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,17 +1468,17 @@
14681468
},
14691469
{
14701470
"name": "spaze/phpstan-disallowed-calls",
1471-
"version": "v4.2.1",
1472-
"version_normalized": "4.2.1.0",
1471+
"version": "v4.3.1",
1472+
"version_normalized": "4.3.1.0",
14731473
"source": {
14741474
"type": "git",
14751475
"url": "https://github.com/spaze/phpstan-disallowed-calls.git",
1476-
"reference": "eb3841ed93768e5754970e6da03d93d3a06c1e6a"
1476+
"reference": "50cedf9c10df5fd61b804ab3e0dc5ebe7420df3c"
14771477
},
14781478
"dist": {
14791479
"type": "zip",
1480-
"url": "https://api.github.com/repos/spaze/phpstan-disallowed-calls/zipball/eb3841ed93768e5754970e6da03d93d3a06c1e6a",
1481-
"reference": "eb3841ed93768e5754970e6da03d93d3a06c1e6a",
1480+
"url": "https://api.github.com/repos/spaze/phpstan-disallowed-calls/zipball/50cedf9c10df5fd61b804ab3e0dc5ebe7420df3c",
1481+
"reference": "50cedf9c10df5fd61b804ab3e0dc5ebe7420df3c",
14821482
"shasum": ""
14831483
},
14841484
"require": {
@@ -1494,7 +1494,7 @@
14941494
"phpunit/phpunit": "^8.5.14 || ^10.1 || ^11.0",
14951495
"spaze/coding-standard": "^1.7"
14961496
},
1497-
"time": "2025-01-23T17:42:09+00:00",
1497+
"time": "2025-02-12T01:51:55+00:00",
14981498
"type": "phpstan-extension",
14991499
"extra": {
15001500
"phpstan": {
@@ -1526,7 +1526,7 @@
15261526
],
15271527
"support": {
15281528
"issues": "https://github.com/spaze/phpstan-disallowed-calls/issues",
1529-
"source": "https://github.com/spaze/phpstan-disallowed-calls/tree/v4.2.1"
1529+
"source": "https://github.com/spaze/phpstan-disallowed-calls/tree/v4.3.1"
15301530
},
15311531
"funding": [
15321532
{

vendor/composer/installed.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'name' => '__root__',
44
'pretty_version' => 'dev-main',
55
'version' => 'dev-main',
6-
'reference' => '3f5b95635b5717bd281a342c6a6000c3b91a6563',
6+
'reference' => 'fc377c5f22b0c3d196a86b4f40f5bb64dde5453f',
77
'type' => 'library',
88
'install_path' => __DIR__ . '/../../',
99
'aliases' => array(),
@@ -13,7 +13,7 @@
1313
'__root__' => array(
1414
'pretty_version' => 'dev-main',
1515
'version' => 'dev-main',
16-
'reference' => '3f5b95635b5717bd281a342c6a6000c3b91a6563',
16+
'reference' => 'fc377c5f22b0c3d196a86b4f40f5bb64dde5453f',
1717
'type' => 'library',
1818
'install_path' => __DIR__ . '/../../',
1919
'aliases' => array(),
@@ -221,9 +221,9 @@
221221
'dev_requirement' => false,
222222
),
223223
'spaze/phpstan-disallowed-calls' => array(
224-
'pretty_version' => 'v4.2.1',
225-
'version' => '4.2.1.0',
226-
'reference' => 'eb3841ed93768e5754970e6da03d93d3a06c1e6a',
224+
'pretty_version' => 'v4.3.1',
225+
'version' => '4.3.1.0',
226+
'reference' => '50cedf9c10df5fd61b804ab3e0dc5ebe7420df3c',
227227
'type' => 'phpstan-extension',
228228
'install_path' => __DIR__ . '/../spaze/phpstan-disallowed-calls',
229229
'aliases' => array(),

vendor/spaze/phpstan-disallowed-calls/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ Let's say you have disallowed `foo()` with custom rules. But you want to re-allo
5454
- [Allow in methods or functions](docs/allow-in-methods.md)
5555
- [Allow with specified parameters](docs/allow-with-parameters.md)
5656
- [Allow with specified flags](docs/allow-with-flags.md)
57+
- [Allow in class with given attributes](docs/allow-in-class-with-attributes.md)
58+
- [Allow in methods or functions with given attributes](docs/allow-in-methods.md)
59+
- [Allow in class with given attributes on any method](docs/allow-in-class-with-method-attributes.md)
5760

5861
[Re-allowing attributes](docs/allow-attributes.md) uses a similar [configuration](docs/allow-attributes.md).
5962

vendor/spaze/phpstan-disallowed-calls/extension.neon

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ parametersSchema:
2424
?allowIn: listOf(string()),
2525
?allowExceptIn: listOf(string()),
2626
?disallowIn: listOf(string()),
27+
?allowInClassWithAttributes: listOf(string()),
28+
?allowExceptInClassWithAttributes: listOf(string()),
29+
?disallowInClassWithAttributes: listOf(string()),
30+
?allowInFunctionsWithAttributes: listOf(string()),
31+
?allowInMethodsWithAttributes: listOf(string()),
32+
?allowExceptInFunctionsWithAttributes: listOf(string()),
33+
?allowExceptInMethodsWithAttributes: listOf(string()),
34+
?disallowInFunctionsWithAttributes: listOf(string()),
35+
?disallowInMethodsWithAttributes: listOf(string()),
36+
?allowInClassWithMethodAttributes: listOf(string()),
37+
?allowExceptInClassWithMethodAttributes: listOf(string()),
38+
?disallowInClassWithMethodAttributes: listOf(string()),
39+
?allowInUse: bool(),
2740
?errorIdentifier: string(),
2841
?errorTip: string(),
2942
])
@@ -37,6 +50,19 @@ parametersSchema:
3750
?allowIn: listOf(string()),
3851
?allowExceptIn: listOf(string()),
3952
?disallowIn: listOf(string()),
53+
?allowInClassWithAttributes: listOf(string()),
54+
?allowExceptInClassWithAttributes: listOf(string()),
55+
?disallowInClassWithAttributes: listOf(string()),
56+
?allowInFunctionsWithAttributes: listOf(string()),
57+
?allowInMethodsWithAttributes: listOf(string()),
58+
?allowExceptInFunctionsWithAttributes: listOf(string()),
59+
?allowExceptInMethodsWithAttributes: listOf(string()),
60+
?disallowInFunctionsWithAttributes: listOf(string()),
61+
?disallowInMethodsWithAttributes: listOf(string()),
62+
?allowInClassWithMethodAttributes: listOf(string()),
63+
?allowExceptInClassWithMethodAttributes: listOf(string()),
64+
?disallowInClassWithMethodAttributes: listOf(string()),
65+
?allowInUse: bool(),
4066
?errorIdentifier: string(),
4167
?errorTip: string(),
4268
])
@@ -75,6 +101,18 @@ parametersSchema:
75101
?disallowParamFlags: arrayOf(anyOf(int(), structure([position: int(), ?value: int(), ?typeString: string(), ?name: string()])), anyOf(int(), string())),
76102
?allowExceptCaseInsensitiveParams: arrayOf(anyOf(int(), string(), bool(), structure([position: int(), ?value: anyOf(int(), string(), bool()), ?typeString: string(), ?name: string()])), anyOf(int(), string())),
77103
?disallowCaseInsensitiveParams: arrayOf(anyOf(int(), string(), bool(), structure([position: int(), ?value: anyOf(int(), string(), bool()), ?typeString: string(), ?name: string()])), anyOf(int(), string())),
104+
?allowInClassWithAttributes: listOf(string()),
105+
?allowExceptInClassWithAttributes: listOf(string()),
106+
?disallowInClassWithAttributes: listOf(string()),
107+
?allowInFunctionsWithAttributes: listOf(string()),
108+
?allowInMethodsWithAttributes: listOf(string()),
109+
?allowExceptInFunctionsWithAttributes: listOf(string()),
110+
?allowExceptInMethodsWithAttributes: listOf(string()),
111+
?disallowInFunctionsWithAttributes: listOf(string()),
112+
?disallowInMethodsWithAttributes: listOf(string()),
113+
?allowInClassWithMethodAttributes: listOf(string()),
114+
?allowExceptInClassWithMethodAttributes: listOf(string()),
115+
?disallowInClassWithMethodAttributes: listOf(string()),
78116
?errorIdentifier: string(),
79117
?errorTip: string(),
80118
])
@@ -113,6 +151,18 @@ parametersSchema:
113151
?disallowParamFlags: arrayOf(anyOf(int(), structure([position: int(), ?value: int(), ?typeString: string(), ?name: string()])), anyOf(int(), string())),
114152
?allowExceptCaseInsensitiveParams: arrayOf(anyOf(int(), string(), bool(), structure([position: int(), ?value: anyOf(int(), string(), bool()), ?typeString: string(), ?name: string()])), anyOf(int(), string())),
115153
?disallowCaseInsensitiveParams: arrayOf(anyOf(int(), string(), bool(), structure([position: int(), ?value: anyOf(int(), string(), bool()), ?typeString: string(), ?name: string()])), anyOf(int(), string())),
154+
?allowInClassWithAttributes: listOf(string()),
155+
?allowExceptInClassWithAttributes: listOf(string()),
156+
?disallowInClassWithAttributes: listOf(string()),
157+
?allowInFunctionsWithAttributes: listOf(string()),
158+
?allowInMethodsWithAttributes: listOf(string()),
159+
?allowExceptInFunctionsWithAttributes: listOf(string()),
160+
?allowExceptInMethodsWithAttributes: listOf(string()),
161+
?disallowInFunctionsWithAttributes: listOf(string()),
162+
?disallowInMethodsWithAttributes: listOf(string()),
163+
?allowInClassWithMethodAttributes: listOf(string()),
164+
?allowExceptInClassWithMethodAttributes: listOf(string()),
165+
?disallowInClassWithMethodAttributes: listOf(string()),
116166
?errorIdentifier: string(),
117167
?errorTip: string(),
118168
])
@@ -151,6 +201,18 @@ parametersSchema:
151201
?disallowParamFlags: arrayOf(anyOf(int(), structure([position: int(), ?value: int(), ?typeString: string(), ?name: string()])), anyOf(int(), string())),
152202
?allowExceptCaseInsensitiveParams: arrayOf(anyOf(int(), string(), bool(), structure([position: int(), ?value: anyOf(int(), string(), bool()), ?typeString: string(), ?name: string()])), anyOf(int(), string())),
153203
?disallowCaseInsensitiveParams: arrayOf(anyOf(int(), string(), bool(), structure([position: int(), ?value: anyOf(int(), string(), bool()), ?typeString: string(), ?name: string()])), anyOf(int(), string())),
204+
?allowInClassWithAttributes: listOf(string()),
205+
?allowExceptInClassWithAttributes: listOf(string()),
206+
?disallowInClassWithAttributes: listOf(string()),
207+
?allowInFunctionsWithAttributes: listOf(string()),
208+
?allowInMethodsWithAttributes: listOf(string()),
209+
?allowExceptInFunctionsWithAttributes: listOf(string()),
210+
?allowExceptInMethodsWithAttributes: listOf(string()),
211+
?disallowInFunctionsWithAttributes: listOf(string()),
212+
?disallowInMethodsWithAttributes: listOf(string()),
213+
?allowInClassWithMethodAttributes: listOf(string()),
214+
?allowExceptInClassWithMethodAttributes: listOf(string()),
215+
?disallowInClassWithMethodAttributes: listOf(string()),
154216
?errorIdentifier: string(),
155217
?errorTip: string(),
156218
])
@@ -221,6 +283,18 @@ parametersSchema:
221283
?disallowParamFlags: arrayOf(anyOf(int(), structure([position: int(), ?value: int(), ?typeString: string(), ?name: string()])), anyOf(int(), string())),
222284
?allowExceptCaseInsensitiveParams: arrayOf(anyOf(int(), string(), bool(), structure([position: int(), ?value: anyOf(int(), string(), bool()), ?typeString: string(), ?name: string()])), anyOf(int(), string())),
223285
?disallowCaseInsensitiveParams: arrayOf(anyOf(int(), string(), bool(), structure([position: int(), ?value: anyOf(int(), string(), bool()), ?typeString: string(), ?name: string()])), anyOf(int(), string())),
286+
?allowInClassWithAttributes: listOf(string()),
287+
?allowExceptInClassWithAttributes: listOf(string()),
288+
?disallowInClassWithAttributes: listOf(string()),
289+
?allowInFunctionsWithAttributes: listOf(string()),
290+
?allowInMethodsWithAttributes: listOf(string()),
291+
?allowExceptInFunctionsWithAttributes: listOf(string()),
292+
?allowExceptInMethodsWithAttributes: listOf(string()),
293+
?disallowInFunctionsWithAttributes: listOf(string()),
294+
?disallowInMethodsWithAttributes: listOf(string()),
295+
?allowInClassWithMethodAttributes: listOf(string()),
296+
?allowExceptInClassWithMethodAttributes: listOf(string()),
297+
?disallowInClassWithMethodAttributes: listOf(string()),
224298
?errorIdentifier: string(),
225299
?errorTip: string(),
226300
])
@@ -240,6 +314,7 @@ parametersSchema:
240314

241315
services:
242316
- Spaze\PHPStan\Rules\Disallowed\Allowed\Allowed
317+
- Spaze\PHPStan\Rules\Disallowed\Allowed\AllowedConfigFactory
243318
- Spaze\PHPStan\Rules\Disallowed\Allowed\AllowedPath
244319
- Spaze\PHPStan\Rules\Disallowed\DisallowedAttributeFactory
245320
- Spaze\PHPStan\Rules\Disallowed\DisallowedCallFactory
@@ -261,6 +336,7 @@ services:
261336
- Spaze\PHPStan\Rules\Disallowed\RuleErrors\DisallowedCallsRuleErrors
262337
- Spaze\PHPStan\Rules\Disallowed\RuleErrors\DisallowedVariableRuleErrors
263338
- Spaze\PHPStan\Rules\Disallowed\Type\TypeResolver
339+
- Spaze\PHPStan\Rules\Disallowed\Usages\NamespaceUsageFactory
264340
-
265341
factory: Spaze\PHPStan\Rules\Disallowed\Usages\NamespaceUsages(forbiddenNamespaces: %disallowedNamespaces%)
266342
tags:

0 commit comments

Comments
 (0)