Skip to content

Commit 31098f5

Browse files
authored
Merge pull request #657 from Ocramius/dependabot/composer/vimeo/psalm-4.3.2
Bump vimeo/psalm from 3.12.2 to 4.3.2
2 parents 15440d5 + be0138a commit 31098f5

12 files changed

+287
-275
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"nikic/php-parser": "^4.6.0",
3939
"phpbench/phpbench": "^0.17.1",
4040
"infection/infection": "^0.16.4",
41-
"vimeo/psalm": "^3.12.2",
41+
"vimeo/psalm": "^4.3.2",
4242
"codelicia/xulieta": "^0.1.2"
4343
},
4444
"suggest": {

composer.lock

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

psalm.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040

4141
<DeprecatedMethod>
4242
<errorLevel type="suppress">
43-
<referencedMethod name="ProxyManager\ProxyGenerator\Util\Properties::onlyPropertiesThatCanBeUnset"/>
4443
<directory name="tests" />
4544
</errorLevel>
4645
</DeprecatedMethod>

src/ProxyManager/ProxyGenerator/Util/Properties.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ public function onlyNullableProperties(): self
124124
$this->properties,
125125
static function (ReflectionProperty $property): bool {
126126
$type = $property->getType();
127-
assert($type instanceof ReflectionType || $type === null);
128127

129128
return $type === null || $type->allowsNull();
130129
}

tests/ProxyManagerBench/LazyLoadingGhostInstantiationBench.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public function setUp(): void
4848

4949
public function benchOriginalConstructorInstantiationOfEmptyObject(): void
5050
{
51+
/** @psalm-suppress UnsafeInstantiation it is allowed (by design) to instantiate these proxies */
5152
new $this->emptyClassProxy();
5253
}
5354

@@ -60,6 +61,7 @@ public function benchInstantiationOfEmptyObject(): void
6061

6162
public function benchOriginalConstructorInstantiationOfObjectWithPrivateProperties(): void
6263
{
64+
/** @psalm-suppress UnsafeInstantiation it is allowed (by design) to instantiate these proxies */
6365
new $this->privatePropertiesProxy();
6466
}
6567

@@ -72,6 +74,7 @@ public function benchInstantiationOfObjectWithPrivateProperties(): void
7274

7375
public function benchOriginalConstructorInstantiationOfObjectWithProtectedProperties(): void
7476
{
77+
/** @psalm-suppress UnsafeInstantiation it is allowed (by design) to instantiate these proxies */
7578
new $this->protectedPropertiesProxy();
7679
}
7780

@@ -84,6 +87,7 @@ public function benchInstantiationOfObjectWithProtectedProperties(): void
8487

8588
public function benchOriginalConstructorInstantiationOfObjectWithPublicProperties(): void
8689
{
90+
/** @psalm-suppress UnsafeInstantiation it is allowed (by design) to instantiate these proxies */
8791
new $this->publicPropertiesProxy();
8892
}
8993

@@ -96,6 +100,7 @@ public function benchInstantiationOfObjectWithPublicProperties(): void
96100

97101
public function benchOriginalConstructorInstantiationOfObjectWithMixedProperties(): void
98102
{
103+
/** @psalm-suppress UnsafeInstantiation it is allowed (by design) to instantiate these proxies */
99104
new $this->mixedPropertiesProxy();
100105
}
101106

tests/ProxyManagerBench/LazyLoadingValueHolderInstantiationBench.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public function setUp(): void
5252

5353
public function benchOriginalConstructorInstantiationOfEmptyObject(): void
5454
{
55+
/** @psalm-suppress UnsafeInstantiation it is allowed (by design) to instantiate these proxies */
5556
new $this->emptyClassProxy();
5657
}
5758

@@ -64,6 +65,7 @@ public function benchInstantiationOfEmptyObject(): void
6465

6566
public function benchOriginalConstructorInstantiationOfObjectWithPrivateProperties(): void
6667
{
68+
/** @psalm-suppress UnsafeInstantiation it is allowed (by design) to instantiate these proxies */
6769
new $this->privatePropertiesProxy();
6870
}
6971

@@ -76,6 +78,7 @@ public function benchInstantiationOfObjectWithPrivateProperties(): void
7678

7779
public function benchOriginalConstructorInstantiationOfObjectWithProtectedProperties(): void
7880
{
81+
/** @psalm-suppress UnsafeInstantiation it is allowed (by design) to instantiate these proxies */
7982
new $this->protectedPropertiesProxy();
8083
}
8184

@@ -88,6 +91,7 @@ public function benchInstantiationOfObjectWithProtectedProperties(): void
8891

8992
public function benchOriginalConstructorInstantiationOfObjectWithPublicProperties(): void
9093
{
94+
/** @psalm-suppress UnsafeInstantiation it is allowed (by design) to instantiate these proxies */
9195
new $this->publicPropertiesProxy();
9296
}
9397

@@ -100,6 +104,7 @@ public function benchInstantiationOfObjectWithPublicProperties(): void
100104

101105
public function benchOriginalConstructorInstantiationOfObjectWithMixedProperties(): void
102106
{
107+
/** @psalm-suppress UnsafeInstantiation it is allowed (by design) to instantiate these proxies */
103108
new $this->mixedPropertiesProxy();
104109
}
105110

tests/ProxyManagerBench/LazyLoadingValueHolderPropertyAccessBench.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ static function (
224224
) use ($originalClass): bool {
225225
$initializer = null;
226226

227+
/** @psalm-suppress UnsafeInstantiation it is allowed (by design) to instantiate these proxies */
227228
$valueHolder = new $originalClass();
228229

229230
return true;

tests/ProxyManagerTest/Factory/AbstractBaseFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final class AbstractBaseFactoryTest extends TestCase
3131
/**
3232
* Note: we mock the class in order to assert on the abstract method usage
3333
*
34-
* @var AbstractBaseFactory|MockObject
34+
* @var AbstractBaseFactory&MockObject
3535
*/
3636
private AbstractBaseFactory $factory;
3737

tests/ProxyManagerTest/Functional/AccessInterceptorScopeLocalizerFunctionalTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ public function testWillBehaveLikeObjectWithNormalConstructor(): void
345345
->createProxy(new ClassWithCounterConstructor(0))
346346
);
347347

348+
/** @psalm-suppress UnsafeInstantiation it is allowed (by design) to instantiate these proxies */
348349
$proxy = new $proxyName(15);
349350

350351
self::assertSame(15, $proxy->amount, 'Verifying that the proxy constructor works as expected');

tests/ProxyManagerTest/Functional/AccessInterceptorValueHolderFunctionalTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ public function testWillBehaveLikeObjectWithNormalConstructor(): void
350350
->createProxy(new ClassWithCounterConstructor(0))
351351
);
352352

353+
/** @psalm-suppress UnsafeInstantiation it is allowed (by design) to instantiate these proxies */
353354
$proxy = new $proxyName(15);
354355

355356
self::assertSame(15, $proxy->amount, 'Verifying that the proxy constructor works as expected');

0 commit comments

Comments
 (0)