Skip to content

Commit c4de9d3

Browse files
committed
PHPStan error is not ignorable
Property Doctrine\Bundle\MongoDBBundle\Validator\Constraints\Unique::$service overriding property Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity::$service (string) should also have native type string. https://github.com/phpstan/phpstan-src/blob/f4e4354045c2ed972ff3c4ad927fcad539a8a338/src/Rules/Properties/OverridingPropertyRule.php#L168-L176
1 parent 350ef15 commit c4de9d3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

phpstan.neon.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ parameters:
88
- config
99
- src
1010
- tests
11+
excludePaths:
12+
# Error "overriding property ... should also have native type" is not ignorable
13+
- src/Validator/Constraints/Unique.php
1114

1215
ignoreErrors:
1316
- message: '# with generic class Doctrine\\ODM\\MongoDB\\Mapping\\ClassMetadata#'

src/Validator/Constraints/Unique.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ class Unique extends UniqueEntity
3131
#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)]
3232
class Unique extends UniqueEntity
3333
{
34-
/**
35-
* @phpstan-ignore missingType.property
36-
* @var string $service
37-
*/
34+
/** @var string $service */
3835
public $service = 'doctrine_odm.mongodb.unique';
3936
}
4037
}

0 commit comments

Comments
 (0)