Skip to content

Commit 60fc8d9

Browse files
Bump phpstan/phpstan from 2.1.10 to 2.1.11 (#859)
* Bump phpstan/phpstan from 2.1.10 to 2.1.11 Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 2.1.10 to 2.1.11. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Changelog](https://github.com/phpstan/phpstan/blob/2.1.x/CHANGELOG.md) - [Commits](phpstan/phpstan@2.1.10...2.1.11) --- updated-dependencies: - dependency-name: phpstan/phpstan dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * update vendor --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Markus Staab <markus.staab@redaxo.de>
1 parent cf6aa9e commit 60fc8d9

24 files changed

+121
-187
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"php": ">=7.4",
44
"justinrainbow/json-schema": "^5.3",
55
"php-parallel-lint/php-parallel-lint": "1.4",
6-
"phpstan/phpstan": "2.1.10",
6+
"phpstan/phpstan": "2.1.11",
77
"phpstan/phpstan-deprecation-rules": "2.0.1",
88
"phpstan/phpstan-phpunit": "2.0.5",
99
"phpstan/phpstan-strict-rules": "2.0.4",

composer.lock

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/composer/InstalledVersions.php

+18-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ class InstalledVersions
3232
*/
3333
private static $installed;
3434

35+
/**
36+
* @var bool
37+
*/
38+
private static $installedIsLocalDir;
39+
3540
/**
3641
* @var bool|null
3742
*/
@@ -309,6 +314,12 @@ public static function reload($data)
309314
{
310315
self::$installed = $data;
311316
self::$installedByVendor = array();
317+
318+
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
319+
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
320+
// so we have to assume it does not, and that may result in duplicate data being returned when listing
321+
// all installed packages for example
322+
self::$installedIsLocalDir = false;
312323
}
313324

314325
/**
@@ -325,19 +336,24 @@ private static function getInstalled()
325336
$copiedLocalDir = false;
326337

327338
if (self::$canGetVendors) {
339+
$selfDir = strtr(__DIR__, '\\', '/');
328340
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
341+
$vendorDir = strtr($vendorDir, '\\', '/');
329342
if (isset(self::$installedByVendor[$vendorDir])) {
330343
$installed[] = self::$installedByVendor[$vendorDir];
331344
} elseif (is_file($vendorDir.'/composer/installed.php')) {
332345
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
333346
$required = require $vendorDir.'/composer/installed.php';
334347
self::$installedByVendor[$vendorDir] = $required;
335348
$installed[] = $required;
336-
if (strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
349+
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
337350
self::$installed = $required;
338-
$copiedLocalDir = true;
351+
self::$installedIsLocalDir = true;
339352
}
340353
}
354+
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
355+
$copiedLocalDir = true;
356+
}
341357
}
342358
}
343359

vendor/composer/autoload_classmap.php

-2
Original file line numberDiff line numberDiff line change
@@ -1013,9 +1013,7 @@
10131013
'PHPStan\\Type\\PHPUnit\\Assert\\AssertMethodTypeSpecifyingExtension' => $vendorDir . '/phpstan/phpstan-phpunit/src/Type/PHPUnit/Assert/AssertMethodTypeSpecifyingExtension.php',
10141014
'PHPStan\\Type\\PHPUnit\\Assert\\AssertStaticMethodTypeSpecifyingExtension' => $vendorDir . '/phpstan/phpstan-phpunit/src/Type/PHPUnit/Assert/AssertStaticMethodTypeSpecifyingExtension.php',
10151015
'PHPStan\\Type\\PHPUnit\\Assert\\AssertTypeSpecifyingExtensionHelper' => $vendorDir . '/phpstan/phpstan-phpunit/src/Type/PHPUnit/Assert/AssertTypeSpecifyingExtensionHelper.php',
1016-
'PHPStan\\Type\\PHPUnit\\InvocationMockerDynamicReturnTypeExtension' => $vendorDir . '/phpstan/phpstan-phpunit/src/Type/PHPUnit/InvocationMockerDynamicReturnTypeExtension.php',
10171016
'PHPStan\\Type\\PHPUnit\\MockBuilderDynamicReturnTypeExtension' => $vendorDir . '/phpstan/phpstan-phpunit/src/Type/PHPUnit/MockBuilderDynamicReturnTypeExtension.php',
1018-
'PHPStan\\Type\\PHPUnit\\MockObjectDynamicReturnTypeExtension' => $vendorDir . '/phpstan/phpstan-phpunit/src/Type/PHPUnit/MockObjectDynamicReturnTypeExtension.php',
10191017
'PHPStan\\Type\\Symfony\\ArgumentTypeSpecifyingExtension' => $vendorDir . '/phpstan/phpstan-symfony/src/Type/Symfony/ArgumentTypeSpecifyingExtension.php',
10201018
'PHPStan\\Type\\Symfony\\CacheInterfaceGetDynamicReturnTypeExtension' => $vendorDir . '/phpstan/phpstan-symfony/src/Type/Symfony/CacheInterfaceGetDynamicReturnTypeExtension.php',
10211019
'PHPStan\\Type\\Symfony\\CommandGetHelperDynamicReturnTypeExtension' => $vendorDir . '/phpstan/phpstan-symfony/src/Type/Symfony/CommandGetHelperDynamicReturnTypeExtension.php',

vendor/composer/autoload_psr4.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
'Rector\\TypePerfect\\' => array($vendorDir . '/rector/type-perfect/src'),
2020
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
2121
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
22-
'PHPStan\\' => array($vendorDir . '/phpstan/phpstan-deprecation-rules/src', $vendorDir . '/phpstan/phpstan-phpunit/src', $vendorDir . '/phpstan/phpstan-strict-rules/src', $vendorDir . '/phpstan/phpstan-symfony/src'),
22+
'PHPStan\\' => array($vendorDir . '/phpstan/phpstan-symfony/src', $vendorDir . '/phpstan/phpstan-strict-rules/src', $vendorDir . '/phpstan/phpstan-phpunit/src', $vendorDir . '/phpstan/phpstan-deprecation-rules/src'),
2323
'JsonSchema\\' => array($vendorDir . '/justinrainbow/json-schema/src/JsonSchema'),
2424
'Doctrine\\Deprecations\\' => array($vendorDir . '/doctrine/deprecations/src'),
2525
'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/src'),

vendor/composer/autoload_static.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ class ComposerStaticInit9cf8af24a7a084f114b4553be2a1ff9f
125125
),
126126
'PHPStan\\' =>
127127
array (
128-
0 => __DIR__ . '/..' . '/phpstan/phpstan-deprecation-rules/src',
129-
1 => __DIR__ . '/..' . '/phpstan/phpstan-phpunit/src',
130-
2 => __DIR__ . '/..' . '/phpstan/phpstan-strict-rules/src',
131-
3 => __DIR__ . '/..' . '/phpstan/phpstan-symfony/src',
128+
0 => __DIR__ . '/..' . '/phpstan/phpstan-symfony/src',
129+
1 => __DIR__ . '/..' . '/phpstan/phpstan-strict-rules/src',
130+
2 => __DIR__ . '/..' . '/phpstan/phpstan-phpunit/src',
131+
3 => __DIR__ . '/..' . '/phpstan/phpstan-deprecation-rules/src',
132132
),
133133
'JsonSchema\\' =>
134134
array (
@@ -1168,9 +1168,7 @@ class ComposerStaticInit9cf8af24a7a084f114b4553be2a1ff9f
11681168
'PHPStan\\Type\\PHPUnit\\Assert\\AssertMethodTypeSpecifyingExtension' => __DIR__ . '/..' . '/phpstan/phpstan-phpunit/src/Type/PHPUnit/Assert/AssertMethodTypeSpecifyingExtension.php',
11691169
'PHPStan\\Type\\PHPUnit\\Assert\\AssertStaticMethodTypeSpecifyingExtension' => __DIR__ . '/..' . '/phpstan/phpstan-phpunit/src/Type/PHPUnit/Assert/AssertStaticMethodTypeSpecifyingExtension.php',
11701170
'PHPStan\\Type\\PHPUnit\\Assert\\AssertTypeSpecifyingExtensionHelper' => __DIR__ . '/..' . '/phpstan/phpstan-phpunit/src/Type/PHPUnit/Assert/AssertTypeSpecifyingExtensionHelper.php',
1171-
'PHPStan\\Type\\PHPUnit\\InvocationMockerDynamicReturnTypeExtension' => __DIR__ . '/..' . '/phpstan/phpstan-phpunit/src/Type/PHPUnit/InvocationMockerDynamicReturnTypeExtension.php',
11721171
'PHPStan\\Type\\PHPUnit\\MockBuilderDynamicReturnTypeExtension' => __DIR__ . '/..' . '/phpstan/phpstan-phpunit/src/Type/PHPUnit/MockBuilderDynamicReturnTypeExtension.php',
1173-
'PHPStan\\Type\\PHPUnit\\MockObjectDynamicReturnTypeExtension' => __DIR__ . '/..' . '/phpstan/phpstan-phpunit/src/Type/PHPUnit/MockObjectDynamicReturnTypeExtension.php',
11741172
'PHPStan\\Type\\Symfony\\ArgumentTypeSpecifyingExtension' => __DIR__ . '/..' . '/phpstan/phpstan-symfony/src/Type/Symfony/ArgumentTypeSpecifyingExtension.php',
11751173
'PHPStan\\Type\\Symfony\\CacheInterfaceGetDynamicReturnTypeExtension' => __DIR__ . '/..' . '/phpstan/phpstan-symfony/src/Type/Symfony/CacheInterfaceGetDynamicReturnTypeExtension.php',
11761174
'PHPStan\\Type\\Symfony\\CommandGetHelperDynamicReturnTypeExtension' => __DIR__ . '/..' . '/phpstan/phpstan-symfony/src/Type/Symfony/CommandGetHelperDynamicReturnTypeExtension.php',

vendor/composer/installed.json

+15-13
Original file line numberDiff line numberDiff line change
@@ -1017,17 +1017,17 @@
10171017
},
10181018
{
10191019
"name": "phpstan/phpstan",
1020-
"version": "2.1.10",
1021-
"version_normalized": "2.1.10.0",
1020+
"version": "2.1.11",
1021+
"version_normalized": "2.1.11.0",
10221022
"source": {
10231023
"type": "git",
10241024
"url": "https://github.com/phpstan/phpstan.git",
1025-
"reference": "051a3b6b9b80df4ba3a7f801a8b53ad7d8f1c15f"
1025+
"reference": "8ca5f79a8f63c49b2359065832a654e1ec70ac30"
10261026
},
10271027
"dist": {
10281028
"type": "zip",
1029-
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/051a3b6b9b80df4ba3a7f801a8b53ad7d8f1c15f",
1030-
"reference": "051a3b6b9b80df4ba3a7f801a8b53ad7d8f1c15f",
1029+
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/8ca5f79a8f63c49b2359065832a654e1ec70ac30",
1030+
"reference": "8ca5f79a8f63c49b2359065832a654e1ec70ac30",
10311031
"shasum": ""
10321032
},
10331033
"require": {
@@ -1036,7 +1036,7 @@
10361036
"conflict": {
10371037
"phpstan/phpstan-shim": "*"
10381038
},
1039-
"time": "2025-03-23T14:57:55+00:00",
1039+
"time": "2025-03-24T13:45:00+00:00",
10401040
"bin": [
10411041
"phpstan",
10421042
"phpstan.phar"
@@ -1128,17 +1128,17 @@
11281128
},
11291129
{
11301130
"name": "phpstan/phpstan-phpunit",
1131-
"version": "2.0.4",
1132-
"version_normalized": "2.0.4.0",
1131+
"version": "2.0.5",
1132+
"version_normalized": "2.0.5.0",
11331133
"source": {
11341134
"type": "git",
11351135
"url": "https://github.com/phpstan/phpstan-phpunit.git",
1136-
"reference": "d09e152f403c843998d7a52b5d87040c937525dd"
1136+
"reference": "4d2b44bdba358f0a1990247f8b59f6c31185e600"
11371137
},
11381138
"dist": {
11391139
"type": "zip",
1140-
"url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/d09e152f403c843998d7a52b5d87040c937525dd",
1141-
"reference": "d09e152f403c843998d7a52b5d87040c937525dd",
1140+
"url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/4d2b44bdba358f0a1990247f8b59f6c31185e600",
1141+
"reference": "4d2b44bdba358f0a1990247f8b59f6c31185e600",
11421142
"shasum": ""
11431143
},
11441144
"require": {
@@ -1149,11 +1149,13 @@
11491149
"phpunit/phpunit": "<7.0"
11501150
},
11511151
"require-dev": {
1152+
"nikic/php-parser": "^5",
11521153
"php-parallel-lint/php-parallel-lint": "^1.2",
1154+
"phpstan/phpstan-deprecation-rules": "^2.0",
11531155
"phpstan/phpstan-strict-rules": "^2.0",
11541156
"phpunit/phpunit": "^9.6"
11551157
},
1156-
"time": "2025-01-22T13:07:38+00:00",
1158+
"time": "2025-03-24T14:21:04+00:00",
11571159
"type": "phpstan-extension",
11581160
"extra": {
11591161
"phpstan": {
@@ -1176,7 +1178,7 @@
11761178
"description": "PHPUnit extensions and rules for PHPStan",
11771179
"support": {
11781180
"issues": "https://github.com/phpstan/phpstan-phpunit/issues",
1179-
"source": "https://github.com/phpstan/phpstan-phpunit/tree/2.0.4"
1181+
"source": "https://github.com/phpstan/phpstan-phpunit/tree/2.0.5"
11801182
},
11811183
"install-path": "../phpstan/phpstan-phpunit"
11821184
},

vendor/composer/installed.php

+8-8
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' => 'bd58223a3627042e18787dc7c1aaf4f52eca23cf',
6+
'reference' => '17e815c2a0d0ab9fb4d902d47658aca340fdf490',
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' => 'bd58223a3627042e18787dc7c1aaf4f52eca23cf',
16+
'reference' => '17e815c2a0d0ab9fb4d902d47658aca340fdf490',
1717
'type' => 'library',
1818
'install_path' => __DIR__ . '/../../',
1919
'aliases' => array(),
@@ -149,9 +149,9 @@
149149
'dev_requirement' => false,
150150
),
151151
'phpstan/phpstan' => array(
152-
'pretty_version' => '2.1.10',
153-
'version' => '2.1.10.0',
154-
'reference' => '051a3b6b9b80df4ba3a7f801a8b53ad7d8f1c15f',
152+
'pretty_version' => '2.1.11',
153+
'version' => '2.1.11.0',
154+
'reference' => '8ca5f79a8f63c49b2359065832a654e1ec70ac30',
155155
'type' => 'library',
156156
'install_path' => __DIR__ . '/../phpstan/phpstan',
157157
'aliases' => array(),
@@ -167,9 +167,9 @@
167167
'dev_requirement' => false,
168168
),
169169
'phpstan/phpstan-phpunit' => array(
170-
'pretty_version' => '2.0.4',
171-
'version' => '2.0.4.0',
172-
'reference' => 'd09e152f403c843998d7a52b5d87040c937525dd',
170+
'pretty_version' => '2.0.5',
171+
'version' => '2.0.5.0',
172+
'reference' => '4d2b44bdba358f0a1990247f8b59f6c31185e600',
173173
'type' => 'phpstan-extension',
174174
'install_path' => __DIR__ . '/../phpstan/phpstan-phpunit',
175175
'aliases' => array(),

vendor/phpstan/phpstan-phpunit/LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
MIT License
22

33
Copyright (c) 2016 Ondřej Mirtes
4+
Copyright (c) 2025 PHPStan s.r.o.
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy
67
of this software and associated documentation files (the "Software"), to deal

vendor/phpstan/phpstan-phpunit/composer.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@
1313
"phpunit/phpunit": "<7.0"
1414
},
1515
"require-dev": {
16+
"nikic/php-parser": "^5",
1617
"php-parallel-lint/php-parallel-lint": "^1.2",
18+
"phpstan/phpstan-deprecation-rules": "^2.0",
1719
"phpstan/phpstan-strict-rules": "^2.0",
1820
"phpunit/phpunit": "^9.6"
1921
},
2022
"config": {
21-
"platform": {
22-
"php": "7.4.6"
23-
},
2423
"sort-packages": true
2524
},
2625
"extra": {

vendor/phpstan/phpstan-phpunit/extension.neon

-9
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ parameters:
1212
- stubs/Assert.stub
1313
- stubs/AssertionFailedError.stub
1414
- stubs/ExpectationFailedException.stub
15-
- stubs/InvocationMocker.stub
1615
- stubs/MockBuilder.stub
1716
- stubs/MockObject.stub
1817
- stubs/Stub.stub
@@ -42,18 +41,10 @@ services:
4241
class: PHPStan\Type\PHPUnit\Assert\AssertStaticMethodTypeSpecifyingExtension
4342
tags:
4443
- phpstan.typeSpecifier.staticMethodTypeSpecifyingExtension
45-
-
46-
class: PHPStan\Type\PHPUnit\InvocationMockerDynamicReturnTypeExtension
47-
tags:
48-
- phpstan.broker.dynamicMethodReturnTypeExtension
4944
-
5045
class: PHPStan\Type\PHPUnit\MockBuilderDynamicReturnTypeExtension
5146
tags:
5247
- phpstan.broker.dynamicMethodReturnTypeExtension
53-
-
54-
class: PHPStan\Type\PHPUnit\MockObjectDynamicReturnTypeExtension
55-
tags:
56-
- phpstan.broker.dynamicMethodReturnTypeExtension
5748
-
5849
class: PHPStan\Rules\PHPUnit\CoversHelper
5950
-

vendor/phpstan/phpstan-phpunit/src/Rules/PHPUnit/ClassCoversExistsRule.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function processNode(Node $node, Scope $scope): array
5050
{
5151
$classReflection = $node->getClassReflection();
5252

53-
if (!$classReflection->isSubclassOf(TestCase::class)) {
53+
if (!$classReflection->is(TestCase::class)) {
5454
return [];
5555
}
5656

vendor/phpstan/phpstan-phpunit/src/Rules/PHPUnit/ClassMethodCoversExistsRule.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function processNode(Node $node, Scope $scope): array
5656
return [];
5757
}
5858

59-
if (!$classReflection->isSubclassOf(TestCase::class)) {
59+
if (!$classReflection->is(TestCase::class)) {
6060
return [];
6161
}
6262

vendor/phpstan/phpstan-phpunit/src/Rules/PHPUnit/DataProviderDeclarationRule.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function processNode(Node $node, Scope $scope): array
5252
{
5353
$classReflection = $scope->getClassReflection();
5454

55-
if ($classReflection === null || !$classReflection->isSubclassOf(TestCase::class)) {
55+
if ($classReflection === null || !$classReflection->is(TestCase::class)) {
5656
return [];
5757
}
5858

vendor/phpstan/phpstan-phpunit/src/Rules/PHPUnit/DataProviderHelper.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function getDataProviderMethods(
7676
}
7777

7878
$dataProviderMethod = $this->parseDataProviderAnnotationValue($scope, $dataProviderValue);
79-
$dataProviderMethod[] = $node->getLine();
79+
$dataProviderMethod[] = $node->getStartLine();
8080

8181
yield $dataProviderValue => $dataProviderMethod;
8282
}
@@ -257,7 +257,7 @@ private function parseDataProviderExternalAttribute(Attribute $attribute): ?arra
257257
sprintf('%s::%s', $className, $methodNameArg->value) => [
258258
$dataProviderClassReflection,
259259
$methodNameArg->value,
260-
$attribute->getLine(),
260+
$attribute->getStartLine(),
261261
],
262262
];
263263
}
@@ -279,7 +279,7 @@ private function parseDataProviderAttribute(Attribute $attribute, ClassReflectio
279279
$methodNameArg->value => [
280280
$classReflection,
281281
$methodNameArg->value,
282-
$attribute->getLine(),
282+
$attribute->getStartLine(),
283283
],
284284
];
285285
}

0 commit comments

Comments
 (0)