Skip to content

Commit f5f7912

Browse files
Lock file maintenance
1 parent 9ca6039 commit f5f7912

31 files changed

Lines changed: 189 additions & 386 deletions

tools/.phpstan/composer.lock

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

tools/.phpstan/vendor/composer/installed.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -251,17 +251,17 @@
251251
},
252252
{
253253
"name": "tomasvotruba/type-coverage",
254-
"version": "2.3.0",
255-
"version_normalized": "2.3.0.0",
254+
"version": "2.3.4",
255+
"version_normalized": "2.3.4.0",
256256
"source": {
257257
"type": "git",
258258
"url": "https://github.com/TomasVotruba/type-coverage.git",
259-
"reference": "7ba48c1bf3bbb7ffe99caacc7017bae5ee72d644"
259+
"reference": "7b4aec57af15514dac9a3c5a9671da501444ecd0"
260260
},
261261
"dist": {
262262
"type": "zip",
263-
"url": "https://api.github.com/repos/TomasVotruba/type-coverage/zipball/7ba48c1bf3bbb7ffe99caacc7017bae5ee72d644",
264-
"reference": "7ba48c1bf3bbb7ffe99caacc7017bae5ee72d644",
263+
"url": "https://api.github.com/repos/TomasVotruba/type-coverage/zipball/7b4aec57af15514dac9a3c5a9671da501444ecd0",
264+
"reference": "7b4aec57af15514dac9a3c5a9671da501444ecd0",
265265
"shasum": ""
266266
},
267267
"require": {
@@ -270,23 +270,24 @@
270270
"webmozart/assert": "^1.11 || ^2.1"
271271
},
272272
"require-dev": {
273+
"doctrine/collections": "^2.3",
273274
"phpstan/extension-installer": "^1.4",
274275
"phpunit/phpunit": "^13.2",
275-
"rector/jack": "^1.0",
276+
"rector/jack": "^1.1",
276277
"rector/rector": "^2.5",
277278
"shipmonk/composer-dependency-analyser": "^1.8",
278279
"symfony/dom-crawler": "^8.1",
280+
"symfony/form": "^8.1",
279281
"symplify/easy-coding-standard": "^13.2",
280282
"tomasvotruba/unused-public": "^2.2",
281283
"tracy/tracy": "^2.12"
282284
},
283-
"time": "2026-07-29T20:32:37+00:00",
285+
"time": "2026-08-18T07:48:32+00:00",
284286
"type": "phpstan-extension",
285287
"extra": {
286288
"phpstan": {
287289
"includes": [
288-
"config/extension.neon",
289-
"packages/type-perfect/config/extension.neon"
290+
"config/extension.neon"
290291
]
291292
}
292293
},
@@ -308,7 +309,7 @@
308309
],
309310
"support": {
310311
"issues": "https://github.com/TomasVotruba/type-coverage/issues",
311-
"source": "https://github.com/TomasVotruba/type-coverage/tree/2.3.0"
312+
"source": "https://github.com/TomasVotruba/type-coverage/tree/2.3.4"
312313
},
313314
"funding": [
314315
{

tools/.phpstan/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' => '7.1.x-dev',
55
'version' => '7.1.9999999.9999999-dev',
6-
'reference' => 'fdb87c64d5a09837baa6e84e81c3246b765f15fc',
6+
'reference' => '9ca60398fd43d741ddfd929c82f2ed857c31c53d',
77
'type' => 'library',
88
'install_path' => __DIR__ . '/../../',
99
'aliases' => array(),
@@ -13,7 +13,7 @@
1313
'__root__' => array(
1414
'pretty_version' => '7.1.x-dev',
1515
'version' => '7.1.9999999.9999999-dev',
16-
'reference' => 'fdb87c64d5a09837baa6e84e81c3246b765f15fc',
16+
'reference' => '9ca60398fd43d741ddfd929c82f2ed857c31c53d',
1717
'type' => 'library',
1818
'install_path' => __DIR__ . '/../../',
1919
'aliases' => array(),
@@ -56,9 +56,9 @@
5656
'dev_requirement' => true,
5757
),
5858
'tomasvotruba/type-coverage' => array(
59-
'pretty_version' => '2.3.0',
60-
'version' => '2.3.0.0',
61-
'reference' => '7ba48c1bf3bbb7ffe99caacc7017bae5ee72d644',
59+
'pretty_version' => '2.3.4',
60+
'version' => '2.3.4.0',
61+
'reference' => '7b4aec57af15514dac9a3c5a9671da501444ecd0',
6262
'type' => 'phpstan-extension',
6363
'install_path' => __DIR__ . '/../tomasvotruba/type-coverage',
6464
'aliases' => array(),

tools/.phpstan/vendor/tomasvotruba/type-coverage/README.md

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ The package is available on PHP 7.2+.
8383

8484
With [PHPStan extension installer](https://github.com/phpstan/extension-installer), everything is ready to run.
8585

86+
Without it, include the config manually:
87+
88+
```yaml
89+
# phpstan.neon
90+
includes:
91+
- vendor/tomasvotruba/type-coverage/config/extension.neon
92+
```
93+
94+
<br>
95+
8696
Enable each item on their own:
8797
8898
```yaml
@@ -167,14 +177,13 @@ These rules ship with the package [installed above](#install), there is nothing
167177

168178
Every rule is opt-in and disabled by default, so you can pick the ones that fit your project. See [Configure](#configure) below for the full list.
169179

170-
The 3 checks below are the simplest ones to start with:
180+
The 2 checks below are the simplest ones to start with:
171181

172182
```yaml
173183
parameters:
174184
type_perfect:
175185
no_isset_on_object: true
176186
no_empty_on_object: true
177-
no_array_access_on_object: true
178187
no_param_type_removal: true
179188
```
180189

@@ -211,29 +220,7 @@ if (! $this->someType instanceof SomeType) {
211220

212221
<br>
213222

214-
Second rule (`no_array_access_on_object`) checks we use explicit object methods over magic array access:
215-
216-
```php
217-
$article = new Article();
218-
219-
$id = $article['id'];
220-
// we have no idea, what the type is
221-
```
222-
223-
:no_good:
224-
225-
226-
227-
```php
228-
$id = $article->getId();
229-
// we know the type is int
230-
```
231-
232-
:heavy_check_mark:
233-
234-
<br>
235-
236-
Last rule (`no_param_type_removal`) checks that all interface implementations follow the same method signature as the interface:
223+
Second rule (`no_param_type_removal`) checks that all interface implementations follow the same method signature as the interface:
237224

238225
```php
239226
interface SomeInterface
@@ -271,10 +258,9 @@ You can enable them all at once:
271258
```yaml
272259
parameters:
273260
type_perfect:
274-
# the 3 checks above
261+
# the 2 checks above
275262
no_isset_on_object: true
276263
no_empty_on_object: true
277-
no_array_access_on_object: true
278264
no_param_type_removal: true
279265
280266
no_mixed_property: true

tools/.phpstan/vendor/tomasvotruba/type-coverage/composer.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
"rector/rector": "^2.5",
1717
"tracy/tracy": "^2.12",
1818
"tomasvotruba/unused-public": "^2.2",
19-
"rector/jack": "^1.0",
19+
"rector/jack": "^1.1",
2020
"shipmonk/composer-dependency-analyser": "^1.8",
21-
"symfony/dom-crawler": "^8.1"
21+
"symfony/dom-crawler": "^8.1",
22+
"doctrine/collections": "^2.3",
23+
"symfony/form": "^8.1"
2224
},
2325
"autoload": {
2426
"psr-4": {
@@ -30,7 +32,10 @@
3032
"psr-4": {
3133
"TomasVotruba\\TypeCoverage\\Tests\\": "tests",
3234
"Rector\\TypePerfect\\Tests\\": "packages/type-perfect/tests"
33-
}
35+
},
36+
"classmap": [
37+
"stubs"
38+
]
3439
},
3540
"scripts": {
3641
"check-cs": "vendor/bin/ecs check --ansi",
@@ -47,8 +52,7 @@
4752
"extra": {
4853
"phpstan": {
4954
"includes": [
50-
"config/extension.neon",
51-
"packages/type-perfect/config/extension.neon"
55+
"config/extension.neon"
5256
]
5357
}
5458
}

tools/.phpstan/vendor/tomasvotruba/type-coverage/config/extension.neon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
includes:
2+
- ../packages/type-perfect/config/extension.neon
3+
14
parametersSchema:
25
# see https://doc.nette.org/en/schema for configuration
36
type_coverage: structure([

tools/.phpstan/vendor/tomasvotruba/type-coverage/packages/type-perfect/config/extension.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ parametersSchema:
1111
no_mixed_caller: bool()
1212

1313
no_param_type_removal: bool()
14-
no_array_access_on_object: bool()
1514
no_isset_on_object: bool()
1615
no_empty_on_object: bool()
1716
])
@@ -28,7 +27,6 @@ parameters:
2827
no_mixed_caller: false
2928

3029
no_param_type_removal: false
31-
no_array_access_on_object: false
3230
no_isset_on_object: false
3331
no_empty_on_object: false
3432

@@ -38,9 +36,6 @@ rules:
3836
# no_param_type_removal
3937
- Rector\TypePerfect\Rules\NoParamTypeRemovalRule
4038

41-
# no_array_access_on_object
42-
- Rector\TypePerfect\Rules\NoArrayAccessOnObjectRule
43-
4439
# no_isset_on_object
4540
- Rector\TypePerfect\Rules\NoIssetOnObjectRule
4641

tools/.phpstan/vendor/tomasvotruba/type-coverage/packages/type-perfect/src/Configuration.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public function __construct(
1919
$this->parameters['no_mixed'] = true;
2020
$this->parameters['null_over_false'] = true;
2121
$this->parameters['no_param_type_removal'] = true;
22-
$this->parameters['no_array_access_on_object'] = true;
2322
$this->parameters['no_isset_on_object'] = true;
2423
$this->parameters['no_empty_on_object'] = true;
2524
}
@@ -63,11 +62,6 @@ public function isNoParamTypeRemovalEnabled(): bool
6362
return $this->parameters['no_param_type_removal'] ?? false;
6463
}
6564

66-
public function isNoArrayAccessOnObjectEnabled(): bool
67-
{
68-
return $this->parameters['no_array_access_on_object'] ?? false;
69-
}
70-
7165
public function isNoIssetOnObjectEnabled(): bool
7266
{
7367
return $this->parameters['no_isset_on_object'] ?? false;

tools/.phpstan/vendor/tomasvotruba/type-coverage/packages/type-perfect/src/Rules/NarrowReturnObjectTypeRule.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,23 @@
2828
{
2929
public const string ERROR_MESSAGE = 'Provide more specific return type "%s" over abstract one';
3030

31+
/**
32+
* These concrete classes are commonly returned behind an abstract interface/type on purpose,
33+
* so narrowing to them would break the intended contract.
34+
*
35+
* @var string[]
36+
*/
37+
private const array SKIPPED_RETURN_CLASSES = [
38+
'Doctrine\Common\Collections\ArrayCollection',
39+
'Doctrine\Common\Collections\Collection',
40+
'Symfony\Component\Form\Form',
41+
'Symfony\Component\Form\FormInterface',
42+
'DateTime',
43+
'DateTimeImmutable',
44+
'SplObjectStorage',
45+
'Doctrine\DBAL\Schema\AbstractSchemaManager',
46+
];
47+
3148
public function __construct(
3249
private ReturnNodeFinder $returnNodeFinder,
3350
private MethodNodeAnalyser $methodNodeAnalyser,
@@ -134,6 +151,11 @@ private function shouldSkipReturnExprType(Type $type): bool
134151
return true;
135152
}
136153

154+
// skip concrete classes that are expected to be returned behind an abstract interface/type
155+
if (in_array($type->getObjectClassNames()[0], self::SKIPPED_RETURN_CLASSES, true)) {
156+
return true;
157+
}
158+
137159
return $type->getObjectClassReflections()[0]
138160
->isAnonymous();
139161
}

0 commit comments

Comments
 (0)