From 4b727d6d2eb0de51f087a53fde817b5c7e8239f0 Mon Sep 17 00:00:00 2001 From: Sylvain Fabre Date: Fri, 20 Mar 2026 13:30:42 +0100 Subject: [PATCH 1/7] Upgrade PHPUnit configuration to version 10 - Update phpunit.xml.dist schema to PHPUnit 10.5 - Remove deprecated processUncoveredFiles attribute - Remove obsolete SYMFONY_PHPUNIT_VERSION env vars - Override testValidValues/testInvalidValues in EntityValidatorTest and PostalValidatorTest to skip when data providers are empty (PHPUnit 10 now errors on empty data providers instead of silently skipping) Co-Authored-By: Claude Sonnet 4.6 --- phpunit.xml.dist | 15 +- .../Constraints/EntityValidatorTest.php | 418 +++++++++--------- .../Constraints/PostalValidatorTest.php | 330 +++++++------- 3 files changed, 390 insertions(+), 373 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ea70e73..b58d9c8 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,22 +1,19 @@ - + - - - - - - ./src - - ./tests/ + + + ./src + + diff --git a/tests/Validator/Constraints/EntityValidatorTest.php b/tests/Validator/Constraints/EntityValidatorTest.php index ad49faf..760b2af 100644 --- a/tests/Validator/Constraints/EntityValidatorTest.php +++ b/tests/Validator/Constraints/EntityValidatorTest.php @@ -1,204 +1,214 @@ - - */ -class EntityValidatorTest extends ConstraintValidatorTestCase -{ - protected EntityManagerInterface $em; - - protected function setUp(): void - { - $this->em = $this->createMock(EntityManagerInterface::class); - $this->em->method('getClassMetadata')->willReturn($this->getMockClassMetadata()); - - parent::setUp(); - } - - protected function getConstraint(): Constraint - { - return new Entity(); - } - - public function createValidator(): ConstraintValidator - { - return new EntityValidator($this->em, [new PhoneProvider()]); - } - - public function testGetConstraintsForTypeUnknown(): void - { - $fieldMapping = [ - 'type' => 'fail', - 'fieldName' => 'some_name', - 'columnName' => 'some_name', - ]; - - $this->expectException(\DomainException::class); - $this->validator->getConstraintsForType($fieldMapping); - } - - public function testGetConstraintsForType(): void - { - self::assertArrayContainsSameObjects( - $this->validator->getConstraintsForType([ - 'type' => 'phone', - 'fieldName' => 'some_name', - 'columnName' => 'some_name', - ]), - [new Phone()] - ); - } - - public function testGetConstraintsForNullableField(): void - { - self::assertArrayContainsSameObjects( - $this->validator->getConstraints('class', 'nullable'), - [new Phone()] - ); - } - - public function testGetConstraintsForNotNullableField(): void - { - self::assertArrayContainsSameObjects( - $this->validator->getConstraints('class', 'notnullable'), - [new NotNull(), new Phone()] - ); - } - - public function testGetConstraintsForEmbeddable(): void - { - self::assertArrayContainsSameObjects( - $this->validator->getConstraints('class', 'embedded'), - [new Valid()] - ); - } - - public function testGetConstraintsForRelationNotOWningSide(): void - { - self::assertEmpty($this->validator->getConstraints('class', 'notowning')); - } - - public function testGetConstraintsForRelationToOne(): void - { - self::assertArrayContainsSameObjects( - $this->validator->getConstraints('class', 'owningToOne'), - [new Type(MyEntityParent::class)] - ); - } - - public function testGetConstraintsForRelationToOneNotNullable(): void - { - self::assertArrayContainsSameObjects( - $this->validator->getConstraints('class', 'owningToOneNotNull'), - [new Type(MyEntityParent::class), new NotNull()] - ); - } - - public function testGetConstraintsForRelationToMany(): void - { - $constraints = $this->validator->getConstraints('class', 'owningToMany'); - self::assertArrayContainsSameObjects( - $constraints, - [new All(constraints: [new Type(MyEntityParent::class)])] - ); - self::assertInstanceOf(All::class, $constraints[0]); - self::assertIsArray($constraints[0]->constraints); - self::assertArrayContainsSameObjects( - $constraints[0]->constraints, - [new Type(MyEntityParent::class)] - ); - } - - public function testGetConstraintsForRelationUnknown(): void - { - $this->expectException(\DomainException::class); - - $this->validator->getConstraints('class', 'owningUnknown'); - } - - public function testGetConstraintsForUnknownField(): void - { - $this->expectException(\LogicException::class); - - $this->validator->getConstraints('class', 'unknown'); - } - - public static function providerInvalidValues(): iterable - { - return []; - } - - public static function providerValidValues(): iterable - { - return []; - } - - private function getMockClassMetadata(): \stdClass - { - $metadata = new \stdClass(); - $metadata->fieldMappings = [ - 'nullable' => [ - 'type' => 'phone', - 'nullable' => true, - ], - 'notnullable' => [ - 'type' => 'phone', - 'nullable' => false, - ], - ]; - $metadata->embeddedClasses = [ - 'embedded' => [ - 'type' => 'bic', - ], - ]; - $metadata->associationMappings = [ - 'notowning' => [ - 'isOwningSide' => false, - 'targetEntity' => MyEntityParent::class, - 'type' => ClassMetadataInfo::TO_ONE, - ], - 'owningToOne' => [ - 'isOwningSide' => true, - 'type' => ClassMetadataInfo::TO_ONE, - 'targetEntity' => MyEntityParent::class, - ], - 'owningToOneNotNull' => [ - 'isOwningSide' => true, - 'type' => ClassMetadataInfo::TO_ONE, - 'targetEntity' => MyEntityParent::class, - 'joinColumns' => [['nullable' => false]], - ], - 'owningToMany' => [ - 'isOwningSide' => true, - 'type' => ClassMetadataInfo::TO_MANY, - 'targetEntity' => MyEntityParent::class, - ], - 'owningUnknown' => [ - 'isOwningSide' => true, - 'type' => 0, - ], - ]; - - return $metadata; - } -} + + */ +class EntityValidatorTest extends ConstraintValidatorTestCase +{ + protected EntityManagerInterface $em; + + protected function setUp(): void + { + $this->em = $this->createMock(EntityManagerInterface::class); + $this->em->method('getClassMetadata')->willReturn($this->getMockClassMetadata()); + + parent::setUp(); + } + + protected function getConstraint(): Constraint + { + return new Entity(); + } + + public function createValidator(): ConstraintValidator + { + return new EntityValidator($this->em, [new PhoneProvider()]); + } + + public function testGetConstraintsForTypeUnknown(): void + { + $fieldMapping = [ + 'type' => 'fail', + 'fieldName' => 'some_name', + 'columnName' => 'some_name', + ]; + + $this->expectException(\DomainException::class); + $this->validator->getConstraintsForType($fieldMapping); + } + + public function testGetConstraintsForType(): void + { + self::assertArrayContainsSameObjects( + $this->validator->getConstraintsForType([ + 'type' => 'phone', + 'fieldName' => 'some_name', + 'columnName' => 'some_name', + ]), + [new Phone()] + ); + } + + public function testGetConstraintsForNullableField(): void + { + self::assertArrayContainsSameObjects( + $this->validator->getConstraints('class', 'nullable'), + [new Phone()] + ); + } + + public function testGetConstraintsForNotNullableField(): void + { + self::assertArrayContainsSameObjects( + $this->validator->getConstraints('class', 'notnullable'), + [new NotNull(), new Phone()] + ); + } + + public function testGetConstraintsForEmbeddable(): void + { + self::assertArrayContainsSameObjects( + $this->validator->getConstraints('class', 'embedded'), + [new Valid()] + ); + } + + public function testGetConstraintsForRelationNotOWningSide(): void + { + self::assertEmpty($this->validator->getConstraints('class', 'notowning')); + } + + public function testGetConstraintsForRelationToOne(): void + { + self::assertArrayContainsSameObjects( + $this->validator->getConstraints('class', 'owningToOne'), + [new Type(MyEntityParent::class)] + ); + } + + public function testGetConstraintsForRelationToOneNotNullable(): void + { + self::assertArrayContainsSameObjects( + $this->validator->getConstraints('class', 'owningToOneNotNull'), + [new Type(MyEntityParent::class), new NotNull()] + ); + } + + public function testGetConstraintsForRelationToMany(): void + { + $constraints = $this->validator->getConstraints('class', 'owningToMany'); + self::assertArrayContainsSameObjects( + $constraints, + [new All(constraints: [new Type(MyEntityParent::class)])] + ); + self::assertInstanceOf(All::class, $constraints[0]); + self::assertIsArray($constraints[0]->constraints); + self::assertArrayContainsSameObjects( + $constraints[0]->constraints, + [new Type(MyEntityParent::class)] + ); + } + + public function testGetConstraintsForRelationUnknown(): void + { + $this->expectException(\DomainException::class); + + $this->validator->getConstraints('class', 'owningUnknown'); + } + + public function testGetConstraintsForUnknownField(): void + { + $this->expectException(\LogicException::class); + + $this->validator->getConstraints('class', 'unknown'); + } + + public static function providerInvalidValues(): iterable + { + return []; + } + + public static function providerValidValues(): iterable + { + return []; + } + + public function testValidValues(mixed $value = null): void + { + self::markTestSkipped('No valid values to test for EntityValidator'); + } + + public function testInvalidValues(mixed $value = null, string $code = '', string $message = '', ?array $parameters = null): void + { + self::markTestSkipped('No invalid values to test for EntityValidator'); + } + + private function getMockClassMetadata(): \stdClass + { + $metadata = new \stdClass(); + $metadata->fieldMappings = [ + 'nullable' => [ + 'type' => 'phone', + 'nullable' => true, + ], + 'notnullable' => [ + 'type' => 'phone', + 'nullable' => false, + ], + ]; + $metadata->embeddedClasses = [ + 'embedded' => [ + 'type' => 'bic', + ], + ]; + $metadata->associationMappings = [ + 'notowning' => [ + 'isOwningSide' => false, + 'targetEntity' => MyEntityParent::class, + 'type' => ClassMetadataInfo::TO_ONE, + ], + 'owningToOne' => [ + 'isOwningSide' => true, + 'type' => ClassMetadataInfo::TO_ONE, + 'targetEntity' => MyEntityParent::class, + ], + 'owningToOneNotNull' => [ + 'isOwningSide' => true, + 'type' => ClassMetadataInfo::TO_ONE, + 'targetEntity' => MyEntityParent::class, + 'joinColumns' => [['nullable' => false]], + ], + 'owningToMany' => [ + 'isOwningSide' => true, + 'type' => ClassMetadataInfo::TO_MANY, + 'targetEntity' => MyEntityParent::class, + ], + 'owningUnknown' => [ + 'isOwningSide' => true, + 'type' => 0, + ], + ]; + + return $metadata; + } +} diff --git a/tests/Validator/Constraints/PostalValidatorTest.php b/tests/Validator/Constraints/PostalValidatorTest.php index eeaddf5..5100554 100644 --- a/tests/Validator/Constraints/PostalValidatorTest.php +++ b/tests/Validator/Constraints/PostalValidatorTest.php @@ -1,160 +1,170 @@ - - */ -class PostalValidatorTest extends ConstraintValidatorTestCase -{ - protected function getConstraint(): Constraint - { - return new Postal(countryPropertyPath: 'country'); - } - - public function createValidator(): ConstraintValidator - { - return new PostalValidator(); - } - - public function testMissingObject(): void - { - $this->setObject(null); - - $this->expectException(ConstraintDefinitionException::class); - $this->validator->validate(null, $this->getConstraint()); - } - - public function testInvalidPropertyPath(): void - { - $object = new \stdClass(); - $object->country2 = 'KK'; - - $this->setObject($object); - - $this->expectException(ConstraintDefinitionException::class); - $this->validator->validate(null, $this->getConstraint()); - } - - public function testUnexpectedCountry(): void - { - $object = new \stdClass(); - $object->country = 'KK'; - - $this->setObject($object); - - $this->validator->validate(null, $this->getConstraint()); - - $this - ->buildViolation('The country {{ country }} is unknown.') - ->setParameter('{{ country }}', '"KK"') - ->setCode(Postal::UNKNOWN_COUNTRY_ERROR) - ->assertRaised() - ; - } - - public function testMissingPostalError(): void - { - $object = new \stdClass(); - $object->country = 'FR'; - - $this->setObject($object); - - $this->validator->validate(null, $this->getConstraint()); - - $this - ->buildViolation('The postal code must be provided.') - ->setCode(Postal::MISSING_ERROR) - ->assertRaised() - ; - } - - public function testNoPostalCodeSystem(): void - { - $object = new \stdClass(); - $object->country = 'AE'; - - $this->setObject($object); - - $this->validator->validate('postal', $this->getConstraint()); - - $this - ->buildViolation('There is no postal code system in the country {{ country }}.') - ->setCode(Postal::NO_POSTAL_CODE_SYSTEM) - ->setParameter('{{ country }}', '"AE"') - ->assertRaised() - ; - } - - public function testInvalidPostalFormatError(): void - { - $object = new \stdClass(); - $object->country = 'FR'; - - $this->setObject($object); - - $this->validator->validate('foo', $this->getConstraint()); - - $this - ->buildViolation('The value {{ value }} is not a valid postal code.') - ->setParameter('{{ value }}', '"foo"') - ->setCode(Postal::INVALID_FORMAT_ERROR) - ->assertRaised() - ; - } - - public function testPostalRequiredNoViolation(): void - { - $object = new \stdClass(); - $object->country = 'FR'; - - $this->setObject($object); - - $this->validator->validate('75002', $this->getConstraint()); - - self::assertNoViolation(); - } - - public function testPostalNotRequiredNoViolation(): void - { - $object = new \stdClass(); - $object->country = 'AE'; - - $this->setObject($object); - - $this->validator->validate('', $this->getConstraint()); - - self::assertNoViolation(); - } - - public function testCountryNullWithPostalNull(): void - { - $object = new \stdClass(); - $object->country = null; - - $this->setObject($object); - - $this->validator->validate(null, $this->getConstraint()); - - self::assertNoViolation(); - } - - public static function providerValidValues(): iterable - { - return []; - } - - public static function providerInvalidValues(): iterable - { - return []; - } -} + + */ +class PostalValidatorTest extends ConstraintValidatorTestCase +{ + protected function getConstraint(): Constraint + { + return new Postal(countryPropertyPath: 'country'); + } + + public function createValidator(): ConstraintValidator + { + return new PostalValidator(); + } + + public function testMissingObject(): void + { + $this->setObject(null); + + $this->expectException(ConstraintDefinitionException::class); + $this->validator->validate(null, $this->getConstraint()); + } + + public function testInvalidPropertyPath(): void + { + $object = new \stdClass(); + $object->country2 = 'KK'; + + $this->setObject($object); + + $this->expectException(ConstraintDefinitionException::class); + $this->validator->validate(null, $this->getConstraint()); + } + + public function testUnexpectedCountry(): void + { + $object = new \stdClass(); + $object->country = 'KK'; + + $this->setObject($object); + + $this->validator->validate(null, $this->getConstraint()); + + $this + ->buildViolation('The country {{ country }} is unknown.') + ->setParameter('{{ country }}', '"KK"') + ->setCode(Postal::UNKNOWN_COUNTRY_ERROR) + ->assertRaised() + ; + } + + public function testMissingPostalError(): void + { + $object = new \stdClass(); + $object->country = 'FR'; + + $this->setObject($object); + + $this->validator->validate(null, $this->getConstraint()); + + $this + ->buildViolation('The postal code must be provided.') + ->setCode(Postal::MISSING_ERROR) + ->assertRaised() + ; + } + + public function testNoPostalCodeSystem(): void + { + $object = new \stdClass(); + $object->country = 'AE'; + + $this->setObject($object); + + $this->validator->validate('postal', $this->getConstraint()); + + $this + ->buildViolation('There is no postal code system in the country {{ country }}.') + ->setCode(Postal::NO_POSTAL_CODE_SYSTEM) + ->setParameter('{{ country }}', '"AE"') + ->assertRaised() + ; + } + + public function testInvalidPostalFormatError(): void + { + $object = new \stdClass(); + $object->country = 'FR'; + + $this->setObject($object); + + $this->validator->validate('foo', $this->getConstraint()); + + $this + ->buildViolation('The value {{ value }} is not a valid postal code.') + ->setParameter('{{ value }}', '"foo"') + ->setCode(Postal::INVALID_FORMAT_ERROR) + ->assertRaised() + ; + } + + public function testPostalRequiredNoViolation(): void + { + $object = new \stdClass(); + $object->country = 'FR'; + + $this->setObject($object); + + $this->validator->validate('75002', $this->getConstraint()); + + self::assertNoViolation(); + } + + public function testPostalNotRequiredNoViolation(): void + { + $object = new \stdClass(); + $object->country = 'AE'; + + $this->setObject($object); + + $this->validator->validate('', $this->getConstraint()); + + self::assertNoViolation(); + } + + public function testCountryNullWithPostalNull(): void + { + $object = new \stdClass(); + $object->country = null; + + $this->setObject($object); + + $this->validator->validate(null, $this->getConstraint()); + + self::assertNoViolation(); + } + + public static function providerValidValues(): iterable + { + return []; + } + + public static function providerInvalidValues(): iterable + { + return []; + } + + public function testValidValues(mixed $value = null): void + { + self::markTestSkipped('No valid values to test for PostalValidator'); + } + + public function testInvalidValues(mixed $value = null, string $code = '', string $message = '', ?array $parameters = null): void + { + self::markTestSkipped('No invalid values to test for PostalValidator'); + } +} From 744a5fcb6c143667da97d3831e8bcaa78c675f91 Mon Sep 17 00:00:00 2001 From: Sylvain Fabre Date: Fri, 20 Mar 2026 14:11:21 +0100 Subject: [PATCH 2/7] Fix CRLF, bump php-quality-config to ^2.2, replace simple-phpunit with phpunit Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/build.yml | 5 +- composer.json | 130 +++--- .../Constraints/EntityValidatorTest.php | 428 +++++++++--------- .../Constraints/PostalValidatorTest.php | 340 +++++++------- 4 files changed, 450 insertions(+), 453 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b729a7..ae2acdf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,10 +38,7 @@ jobs: - run: vendor/bin/rector process --dry-run if: ${{ failure() || success() }} - - run: vendor/bin/simple-phpunit --coverage-clover ./clover.xml --log-junit ./phpunit.report.xml - env: - XDEBUG_MODE: coverage - SYMFONY_DEPRECATIONS_HELPER: disabled + - run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover ./clover.xml --log-junit ./phpunit.report.xml if: ${{ failure() || success() }} # https://community.sonarsource.com/t/code-coverage-doesnt-work-with-github-action/16747 diff --git a/composer.json b/composer.json index 8cafa87..513ee17 100644 --- a/composer.json +++ b/composer.json @@ -1,65 +1,65 @@ -{ - "name": "assoconnect/validator-bundle", - "description": "Custom Symfony validators for common scalar types.", - "type": "symfony-bundle", - "license": "MIT", - "keywords": ["Symfony", "Validation"], - "authors": [ - { - "name": "AssoConnect", - "homepage": "https://www.assoconnect.com" - }, - { - "name": "Sylvain Fabre" - }, - { - "name": "Tristan Pouliquen", - "email": "tristan.pouliquen@yahoo.fr" - } - ], - "autoload": { - "psr-4": { - "AssoConnect\\ValidatorBundle\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "AssoConnect\\ValidatorBundle\\Tests\\": "tests/" - } - }, - "require": { - "doctrine/doctrine-bundle": "^2.12", - "giggsey/libphonenumber-for-php": "^8.13", - "php": "^8.3", - "symfony/http-kernel": "^7.0", - "symfony/validator": "^7.0", - "egulias/email-validator": "^3.2|^4.0", - "symfony/property-access": "^7.0", - "jeremykendall/php-domain-parser": "^6.0", - "moneyphp/money": "^3.0|^4.0", - "assoconnect/php-date": "^2.0", - "doctrine/orm": "^2.7", - "symfony/intl": "^7.0", - "assoconnect/doctrine-types-bundle": "^v2.15", - "assoconnect/php-percent":"^1.1", - "assoconnect/absolute-percent-value-bundle": "^1.5", - "webmozart/assert": "^1.11", - "psr/simple-cache": "^1.0" - }, - "require-dev": { - "doctrine/cache": "~1.0", - "symfony/phpunit-bridge": "^7.0", - "symfony/framework-bundle": "^7.0", - "symfony/yaml": "^7.0", - "dg/bypass-finals": "^1.1", - "assoconnect/php-quality-config": "^2", - "guzzlehttp/guzzle": "^7.7", - "guzzlehttp/psr7": "^2.4.5", - "phpstan/phpstan-symfony": "^2" - }, - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - } - } -} +{ + "name": "assoconnect/validator-bundle", + "description": "Custom Symfony validators for common scalar types.", + "type": "symfony-bundle", + "license": "MIT", + "keywords": ["Symfony", "Validation"], + "authors": [ + { + "name": "AssoConnect", + "homepage": "https://www.assoconnect.com" + }, + { + "name": "Sylvain Fabre" + }, + { + "name": "Tristan Pouliquen", + "email": "tristan.pouliquen@yahoo.fr" + } + ], + "autoload": { + "psr-4": { + "AssoConnect\\ValidatorBundle\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "AssoConnect\\ValidatorBundle\\Tests\\": "tests/" + } + }, + "require": { + "doctrine/doctrine-bundle": "^2.12", + "giggsey/libphonenumber-for-php": "^8.13", + "php": "^8.3", + "symfony/http-kernel": "^7.0", + "symfony/validator": "^7.0", + "egulias/email-validator": "^3.2|^4.0", + "symfony/property-access": "^7.0", + "jeremykendall/php-domain-parser": "^6.0", + "moneyphp/money": "^3.0|^4.0", + "assoconnect/php-date": "^2.0", + "doctrine/orm": "^2.7", + "symfony/intl": "^7.0", + "assoconnect/doctrine-types-bundle": "^v2.15", + "assoconnect/php-percent":"^1.1", + "assoconnect/absolute-percent-value-bundle": "^1.5", + "webmozart/assert": "^1.11", + "psr/simple-cache": "^1.0" + }, + "require-dev": { + "doctrine/cache": "~1.0", + "symfony/phpunit-bridge": "^7.0", + "symfony/framework-bundle": "^7.0", + "symfony/yaml": "^7.0", + "dg/bypass-finals": "^1.1", + "assoconnect/php-quality-config": "^2.2", + "guzzlehttp/guzzle": "^7.7", + "guzzlehttp/psr7": "^2.4.5", + "phpstan/phpstan-symfony": "^2" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + } +} diff --git a/tests/Validator/Constraints/EntityValidatorTest.php b/tests/Validator/Constraints/EntityValidatorTest.php index 760b2af..762b68b 100644 --- a/tests/Validator/Constraints/EntityValidatorTest.php +++ b/tests/Validator/Constraints/EntityValidatorTest.php @@ -1,214 +1,214 @@ - - */ -class EntityValidatorTest extends ConstraintValidatorTestCase -{ - protected EntityManagerInterface $em; - - protected function setUp(): void - { - $this->em = $this->createMock(EntityManagerInterface::class); - $this->em->method('getClassMetadata')->willReturn($this->getMockClassMetadata()); - - parent::setUp(); - } - - protected function getConstraint(): Constraint - { - return new Entity(); - } - - public function createValidator(): ConstraintValidator - { - return new EntityValidator($this->em, [new PhoneProvider()]); - } - - public function testGetConstraintsForTypeUnknown(): void - { - $fieldMapping = [ - 'type' => 'fail', - 'fieldName' => 'some_name', - 'columnName' => 'some_name', - ]; - - $this->expectException(\DomainException::class); - $this->validator->getConstraintsForType($fieldMapping); - } - - public function testGetConstraintsForType(): void - { - self::assertArrayContainsSameObjects( - $this->validator->getConstraintsForType([ - 'type' => 'phone', - 'fieldName' => 'some_name', - 'columnName' => 'some_name', - ]), - [new Phone()] - ); - } - - public function testGetConstraintsForNullableField(): void - { - self::assertArrayContainsSameObjects( - $this->validator->getConstraints('class', 'nullable'), - [new Phone()] - ); - } - - public function testGetConstraintsForNotNullableField(): void - { - self::assertArrayContainsSameObjects( - $this->validator->getConstraints('class', 'notnullable'), - [new NotNull(), new Phone()] - ); - } - - public function testGetConstraintsForEmbeddable(): void - { - self::assertArrayContainsSameObjects( - $this->validator->getConstraints('class', 'embedded'), - [new Valid()] - ); - } - - public function testGetConstraintsForRelationNotOWningSide(): void - { - self::assertEmpty($this->validator->getConstraints('class', 'notowning')); - } - - public function testGetConstraintsForRelationToOne(): void - { - self::assertArrayContainsSameObjects( - $this->validator->getConstraints('class', 'owningToOne'), - [new Type(MyEntityParent::class)] - ); - } - - public function testGetConstraintsForRelationToOneNotNullable(): void - { - self::assertArrayContainsSameObjects( - $this->validator->getConstraints('class', 'owningToOneNotNull'), - [new Type(MyEntityParent::class), new NotNull()] - ); - } - - public function testGetConstraintsForRelationToMany(): void - { - $constraints = $this->validator->getConstraints('class', 'owningToMany'); - self::assertArrayContainsSameObjects( - $constraints, - [new All(constraints: [new Type(MyEntityParent::class)])] - ); - self::assertInstanceOf(All::class, $constraints[0]); - self::assertIsArray($constraints[0]->constraints); - self::assertArrayContainsSameObjects( - $constraints[0]->constraints, - [new Type(MyEntityParent::class)] - ); - } - - public function testGetConstraintsForRelationUnknown(): void - { - $this->expectException(\DomainException::class); - - $this->validator->getConstraints('class', 'owningUnknown'); - } - - public function testGetConstraintsForUnknownField(): void - { - $this->expectException(\LogicException::class); - - $this->validator->getConstraints('class', 'unknown'); - } - - public static function providerInvalidValues(): iterable - { - return []; - } - - public static function providerValidValues(): iterable - { - return []; - } - - public function testValidValues(mixed $value = null): void - { - self::markTestSkipped('No valid values to test for EntityValidator'); - } - - public function testInvalidValues(mixed $value = null, string $code = '', string $message = '', ?array $parameters = null): void - { - self::markTestSkipped('No invalid values to test for EntityValidator'); - } - - private function getMockClassMetadata(): \stdClass - { - $metadata = new \stdClass(); - $metadata->fieldMappings = [ - 'nullable' => [ - 'type' => 'phone', - 'nullable' => true, - ], - 'notnullable' => [ - 'type' => 'phone', - 'nullable' => false, - ], - ]; - $metadata->embeddedClasses = [ - 'embedded' => [ - 'type' => 'bic', - ], - ]; - $metadata->associationMappings = [ - 'notowning' => [ - 'isOwningSide' => false, - 'targetEntity' => MyEntityParent::class, - 'type' => ClassMetadataInfo::TO_ONE, - ], - 'owningToOne' => [ - 'isOwningSide' => true, - 'type' => ClassMetadataInfo::TO_ONE, - 'targetEntity' => MyEntityParent::class, - ], - 'owningToOneNotNull' => [ - 'isOwningSide' => true, - 'type' => ClassMetadataInfo::TO_ONE, - 'targetEntity' => MyEntityParent::class, - 'joinColumns' => [['nullable' => false]], - ], - 'owningToMany' => [ - 'isOwningSide' => true, - 'type' => ClassMetadataInfo::TO_MANY, - 'targetEntity' => MyEntityParent::class, - ], - 'owningUnknown' => [ - 'isOwningSide' => true, - 'type' => 0, - ], - ]; - - return $metadata; - } -} + + */ +class EntityValidatorTest extends ConstraintValidatorTestCase +{ + protected EntityManagerInterface $em; + + protected function setUp(): void + { + $this->em = $this->createMock(EntityManagerInterface::class); + $this->em->method('getClassMetadata')->willReturn($this->getMockClassMetadata()); + + parent::setUp(); + } + + protected function getConstraint(): Constraint + { + return new Entity(); + } + + public function createValidator(): ConstraintValidator + { + return new EntityValidator($this->em, [new PhoneProvider()]); + } + + public function testGetConstraintsForTypeUnknown(): void + { + $fieldMapping = [ + 'type' => 'fail', + 'fieldName' => 'some_name', + 'columnName' => 'some_name', + ]; + + $this->expectException(\DomainException::class); + $this->validator->getConstraintsForType($fieldMapping); + } + + public function testGetConstraintsForType(): void + { + self::assertArrayContainsSameObjects( + $this->validator->getConstraintsForType([ + 'type' => 'phone', + 'fieldName' => 'some_name', + 'columnName' => 'some_name', + ]), + [new Phone()] + ); + } + + public function testGetConstraintsForNullableField(): void + { + self::assertArrayContainsSameObjects( + $this->validator->getConstraints('class', 'nullable'), + [new Phone()] + ); + } + + public function testGetConstraintsForNotNullableField(): void + { + self::assertArrayContainsSameObjects( + $this->validator->getConstraints('class', 'notnullable'), + [new NotNull(), new Phone()] + ); + } + + public function testGetConstraintsForEmbeddable(): void + { + self::assertArrayContainsSameObjects( + $this->validator->getConstraints('class', 'embedded'), + [new Valid()] + ); + } + + public function testGetConstraintsForRelationNotOWningSide(): void + { + self::assertEmpty($this->validator->getConstraints('class', 'notowning')); + } + + public function testGetConstraintsForRelationToOne(): void + { + self::assertArrayContainsSameObjects( + $this->validator->getConstraints('class', 'owningToOne'), + [new Type(MyEntityParent::class)] + ); + } + + public function testGetConstraintsForRelationToOneNotNullable(): void + { + self::assertArrayContainsSameObjects( + $this->validator->getConstraints('class', 'owningToOneNotNull'), + [new Type(MyEntityParent::class), new NotNull()] + ); + } + + public function testGetConstraintsForRelationToMany(): void + { + $constraints = $this->validator->getConstraints('class', 'owningToMany'); + self::assertArrayContainsSameObjects( + $constraints, + [new All(constraints: [new Type(MyEntityParent::class)])] + ); + self::assertInstanceOf(All::class, $constraints[0]); + self::assertIsArray($constraints[0]->constraints); + self::assertArrayContainsSameObjects( + $constraints[0]->constraints, + [new Type(MyEntityParent::class)] + ); + } + + public function testGetConstraintsForRelationUnknown(): void + { + $this->expectException(\DomainException::class); + + $this->validator->getConstraints('class', 'owningUnknown'); + } + + public function testGetConstraintsForUnknownField(): void + { + $this->expectException(\LogicException::class); + + $this->validator->getConstraints('class', 'unknown'); + } + + public static function providerInvalidValues(): iterable + { + return []; + } + + public static function providerValidValues(): iterable + { + return []; + } + + public function testValidValues(mixed $value = null): void + { + self::markTestSkipped('No valid values to test for EntityValidator'); + } + + public function testInvalidValues(mixed $value = null, string $code = '', string $message = '', ?array $parameters = null): void + { + self::markTestSkipped('No invalid values to test for EntityValidator'); + } + + private function getMockClassMetadata(): \stdClass + { + $metadata = new \stdClass(); + $metadata->fieldMappings = [ + 'nullable' => [ + 'type' => 'phone', + 'nullable' => true, + ], + 'notnullable' => [ + 'type' => 'phone', + 'nullable' => false, + ], + ]; + $metadata->embeddedClasses = [ + 'embedded' => [ + 'type' => 'bic', + ], + ]; + $metadata->associationMappings = [ + 'notowning' => [ + 'isOwningSide' => false, + 'targetEntity' => MyEntityParent::class, + 'type' => ClassMetadataInfo::TO_ONE, + ], + 'owningToOne' => [ + 'isOwningSide' => true, + 'type' => ClassMetadataInfo::TO_ONE, + 'targetEntity' => MyEntityParent::class, + ], + 'owningToOneNotNull' => [ + 'isOwningSide' => true, + 'type' => ClassMetadataInfo::TO_ONE, + 'targetEntity' => MyEntityParent::class, + 'joinColumns' => [['nullable' => false]], + ], + 'owningToMany' => [ + 'isOwningSide' => true, + 'type' => ClassMetadataInfo::TO_MANY, + 'targetEntity' => MyEntityParent::class, + ], + 'owningUnknown' => [ + 'isOwningSide' => true, + 'type' => 0, + ], + ]; + + return $metadata; + } +} diff --git a/tests/Validator/Constraints/PostalValidatorTest.php b/tests/Validator/Constraints/PostalValidatorTest.php index 5100554..12b52e0 100644 --- a/tests/Validator/Constraints/PostalValidatorTest.php +++ b/tests/Validator/Constraints/PostalValidatorTest.php @@ -1,170 +1,170 @@ - - */ -class PostalValidatorTest extends ConstraintValidatorTestCase -{ - protected function getConstraint(): Constraint - { - return new Postal(countryPropertyPath: 'country'); - } - - public function createValidator(): ConstraintValidator - { - return new PostalValidator(); - } - - public function testMissingObject(): void - { - $this->setObject(null); - - $this->expectException(ConstraintDefinitionException::class); - $this->validator->validate(null, $this->getConstraint()); - } - - public function testInvalidPropertyPath(): void - { - $object = new \stdClass(); - $object->country2 = 'KK'; - - $this->setObject($object); - - $this->expectException(ConstraintDefinitionException::class); - $this->validator->validate(null, $this->getConstraint()); - } - - public function testUnexpectedCountry(): void - { - $object = new \stdClass(); - $object->country = 'KK'; - - $this->setObject($object); - - $this->validator->validate(null, $this->getConstraint()); - - $this - ->buildViolation('The country {{ country }} is unknown.') - ->setParameter('{{ country }}', '"KK"') - ->setCode(Postal::UNKNOWN_COUNTRY_ERROR) - ->assertRaised() - ; - } - - public function testMissingPostalError(): void - { - $object = new \stdClass(); - $object->country = 'FR'; - - $this->setObject($object); - - $this->validator->validate(null, $this->getConstraint()); - - $this - ->buildViolation('The postal code must be provided.') - ->setCode(Postal::MISSING_ERROR) - ->assertRaised() - ; - } - - public function testNoPostalCodeSystem(): void - { - $object = new \stdClass(); - $object->country = 'AE'; - - $this->setObject($object); - - $this->validator->validate('postal', $this->getConstraint()); - - $this - ->buildViolation('There is no postal code system in the country {{ country }}.') - ->setCode(Postal::NO_POSTAL_CODE_SYSTEM) - ->setParameter('{{ country }}', '"AE"') - ->assertRaised() - ; - } - - public function testInvalidPostalFormatError(): void - { - $object = new \stdClass(); - $object->country = 'FR'; - - $this->setObject($object); - - $this->validator->validate('foo', $this->getConstraint()); - - $this - ->buildViolation('The value {{ value }} is not a valid postal code.') - ->setParameter('{{ value }}', '"foo"') - ->setCode(Postal::INVALID_FORMAT_ERROR) - ->assertRaised() - ; - } - - public function testPostalRequiredNoViolation(): void - { - $object = new \stdClass(); - $object->country = 'FR'; - - $this->setObject($object); - - $this->validator->validate('75002', $this->getConstraint()); - - self::assertNoViolation(); - } - - public function testPostalNotRequiredNoViolation(): void - { - $object = new \stdClass(); - $object->country = 'AE'; - - $this->setObject($object); - - $this->validator->validate('', $this->getConstraint()); - - self::assertNoViolation(); - } - - public function testCountryNullWithPostalNull(): void - { - $object = new \stdClass(); - $object->country = null; - - $this->setObject($object); - - $this->validator->validate(null, $this->getConstraint()); - - self::assertNoViolation(); - } - - public static function providerValidValues(): iterable - { - return []; - } - - public static function providerInvalidValues(): iterable - { - return []; - } - - public function testValidValues(mixed $value = null): void - { - self::markTestSkipped('No valid values to test for PostalValidator'); - } - - public function testInvalidValues(mixed $value = null, string $code = '', string $message = '', ?array $parameters = null): void - { - self::markTestSkipped('No invalid values to test for PostalValidator'); - } -} + + */ +class PostalValidatorTest extends ConstraintValidatorTestCase +{ + protected function getConstraint(): Constraint + { + return new Postal(countryPropertyPath: 'country'); + } + + public function createValidator(): ConstraintValidator + { + return new PostalValidator(); + } + + public function testMissingObject(): void + { + $this->setObject(null); + + $this->expectException(ConstraintDefinitionException::class); + $this->validator->validate(null, $this->getConstraint()); + } + + public function testInvalidPropertyPath(): void + { + $object = new \stdClass(); + $object->country2 = 'KK'; + + $this->setObject($object); + + $this->expectException(ConstraintDefinitionException::class); + $this->validator->validate(null, $this->getConstraint()); + } + + public function testUnexpectedCountry(): void + { + $object = new \stdClass(); + $object->country = 'KK'; + + $this->setObject($object); + + $this->validator->validate(null, $this->getConstraint()); + + $this + ->buildViolation('The country {{ country }} is unknown.') + ->setParameter('{{ country }}', '"KK"') + ->setCode(Postal::UNKNOWN_COUNTRY_ERROR) + ->assertRaised() + ; + } + + public function testMissingPostalError(): void + { + $object = new \stdClass(); + $object->country = 'FR'; + + $this->setObject($object); + + $this->validator->validate(null, $this->getConstraint()); + + $this + ->buildViolation('The postal code must be provided.') + ->setCode(Postal::MISSING_ERROR) + ->assertRaised() + ; + } + + public function testNoPostalCodeSystem(): void + { + $object = new \stdClass(); + $object->country = 'AE'; + + $this->setObject($object); + + $this->validator->validate('postal', $this->getConstraint()); + + $this + ->buildViolation('There is no postal code system in the country {{ country }}.') + ->setCode(Postal::NO_POSTAL_CODE_SYSTEM) + ->setParameter('{{ country }}', '"AE"') + ->assertRaised() + ; + } + + public function testInvalidPostalFormatError(): void + { + $object = new \stdClass(); + $object->country = 'FR'; + + $this->setObject($object); + + $this->validator->validate('foo', $this->getConstraint()); + + $this + ->buildViolation('The value {{ value }} is not a valid postal code.') + ->setParameter('{{ value }}', '"foo"') + ->setCode(Postal::INVALID_FORMAT_ERROR) + ->assertRaised() + ; + } + + public function testPostalRequiredNoViolation(): void + { + $object = new \stdClass(); + $object->country = 'FR'; + + $this->setObject($object); + + $this->validator->validate('75002', $this->getConstraint()); + + self::assertNoViolation(); + } + + public function testPostalNotRequiredNoViolation(): void + { + $object = new \stdClass(); + $object->country = 'AE'; + + $this->setObject($object); + + $this->validator->validate('', $this->getConstraint()); + + self::assertNoViolation(); + } + + public function testCountryNullWithPostalNull(): void + { + $object = new \stdClass(); + $object->country = null; + + $this->setObject($object); + + $this->validator->validate(null, $this->getConstraint()); + + self::assertNoViolation(); + } + + public static function providerValidValues(): iterable + { + return []; + } + + public static function providerInvalidValues(): iterable + { + return []; + } + + public function testValidValues(mixed $value = null): void + { + self::markTestSkipped('No valid values to test for PostalValidator'); + } + + public function testInvalidValues(mixed $value = null, string $code = '', string $message = '', ?array $parameters = null): void + { + self::markTestSkipped('No invalid values to test for PostalValidator'); + } +} From 0eca2f39f82addfc07fc6df4f80581c05047be75 Mon Sep 17 00:00:00 2001 From: Sylvain Fabre Date: Sat, 21 Mar 2026 22:25:45 +0100 Subject: [PATCH 3/7] Fix PHPCS and PHPStan issues - Add phpcs:ignore for PHP 8.3 typed constants in BelgianEnterpriseNumber - Fix line length in EntityValidatorTest and PostalValidatorTest - Add docblocks to FrenchSiren/FrenchSiret constructors for PHPStan - Remove now-fixed entries from phpstan baseline Co-Authored-By: Claude Sonnet 4.6 --- phpstan-baseline.neon | 1550 ++++++++--------- .../Constraints/BelgianEnterpriseNumber.php | 2 + src/Validator/Constraints/FrenchSiren.php | 4 + src/Validator/Constraints/FrenchSiret.php | 4 + .../Constraints/EntityValidatorTest.php | 8 +- .../Constraints/PostalValidatorTest.php | 8 +- 6 files changed, 791 insertions(+), 785 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e6c5c68..da02d48 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,781 +1,769 @@ -parameters: - ignoreErrors: - - - message: '#^Public property `bool` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEmbeddable.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$absoluteDate\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$array\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$bic\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$bigint\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$bigintUnsigned\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$boolean\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$country\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$currency\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$date\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$datetime\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$decimal\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$email\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$embeddable\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$float\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$frenchRNA\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$frenchSIREN\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$iban\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$id\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$integer\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$ip\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$json\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$latitude\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$locale\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$longitude\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$mainParent\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$money\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$notNullable\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$parentNotNullable\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$parentNullable\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$parents\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$percent\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$phone\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$phonelandline\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$phonemobile\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$smallint\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$smallintUnsigned\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$string\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$text\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$timezone\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$uuid\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$uuid_binary_ordered_time\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Property AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity\:\:\$decimal cannot have float as its type \- floats are not allowed\.$#' - identifier: float.property - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Property AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity\:\:\$float cannot have float as its type \- floats are not allowed\.$#' - identifier: float.property - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Property AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity\:\:\$money cannot have float as its type \- floats are not allowed\.$#' - identifier: float.property - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Property AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity\:\:\$percent cannot have float as its type \- floats are not allowed\.$#' - identifier: float.property - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `absoluteDate` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `array` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `bic` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `bigintUnsigned` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `bigint` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `boolean` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `country` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `currency` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `date` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `datetime` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `decimal` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `email` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `embeddable` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `float` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `frenchRNA` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `frenchSIREN` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `iban` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `id` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `integer` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `ip` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `json` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `latitude` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `locale` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `longitude` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `mainParent` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `money` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `notNullable` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `parentNotNullable` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `parentNullable` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `parents` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `percent` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `phone` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `phonelandline` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `phonemobile` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `smallintUnsigned` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `smallint` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `string` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `text` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `timezone` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `uuid_binary_ordered_time` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Public property `uuid` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntity.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntityParent has an uninitialized property \$id\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntityParent.php - - - - message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntityParent has an uninitialized property \$mainChild\. Give it default value or assign it in the constructor\.$#' - identifier: property.uninitialized - count: 1 - path: src/Test/Functional/App/Entity/MyEntityParent.php - - - - message: '#^Public property `id` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntityParent.php - - - - message: '#^Public property `mainChild` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Test/Functional/App/Entity/MyEntityParent.php - - - - message: '#^Method AssoConnect\\ValidatorBundle\\Validator\\Constraints\\Email\:\:__construct\(\) has parameter \$normalizer with no signature specified for callable\.$#' - identifier: missingType.callable - count: 1 - path: src/Validator/Constraints/Email.php - - - - message: '#^Public property `checkDNS` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Email.php - - - - message: '#^Public property `dnsMessage` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Email.php - - - - message: '#^Public property `tldMessage` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Email.php - - - - message: '#^Public property `message` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/EmployerIdentificationNumber.php - - - - message: '#^Public property `message` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/FloatScale.php - - - - message: '#^Public property `scale` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/FloatScale.php - - - - message: '#^Method AssoConnect\\ValidatorBundle\\Validator\\Constraints\\FrenchRna\:\:__construct\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/Validator/Constraints/FrenchRna.php - - - - message: '#^Public property `message` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/FrenchRna.php - - - - message: '#^Method AssoConnect\\ValidatorBundle\\Validator\\Constraints\\FrenchSiren\:\:__construct\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/Validator/Constraints/FrenchSiren.php - - - - message: '#^Method AssoConnect\\ValidatorBundle\\Validator\\Constraints\\FrenchSiret\:\:__construct\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/Validator/Constraints/FrenchSiret.php - - - - message: '#^Public property `message` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/LastDigitsUsSocialSecurityNumber.php - - - - message: '#^Parameter \#1 \$min of method AssoConnect\\ValidatorBundle\\Validator\\Constraints\\Money\:\:__construct\(\) cannot have float as its type \- floats are not allowed\.$#' - identifier: float.type - count: 1 - path: src/Validator/Constraints/Money.php - - - - message: '#^Parameter \#2 \$max of method AssoConnect\\ValidatorBundle\\Validator\\Constraints\\Money\:\:__construct\(\) cannot have float as its type \- floats are not allowed\.$#' - identifier: float.type - count: 1 - path: src/Validator/Constraints/Money.php - - - - message: '#^Cannot assign float to \$this\->min \- floats are not allowed\.$#' - identifier: float.assign - count: 1 - path: src/Validator/Constraints/Money.php - - - - message: '#^Cannot assign float to \$this\->max \- floats are not allowed\.$#' - identifier: float.assign - count: 1 - path: src/Validator/Constraints/Money.php - - - - message: '#^Property AssoConnect\\ValidatorBundle\\Validator\\Constraints\\Money\:\:\$max cannot have float as its type \- floats are not allowed\.$#' - identifier: float.property - count: 1 - path: src/Validator/Constraints/Money.php - - - - message: '#^Property AssoConnect\\ValidatorBundle\\Validator\\Constraints\\Money\:\:\$min cannot have float as its type \- floats are not allowed\.$#' - identifier: float.property - count: 1 - path: src/Validator/Constraints/Money.php - - - - message: '#^Public property `max` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Money.php - - - - message: '#^Public property `min` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Money.php - - - - message: '#^Public property `inexistantMessage` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Phone.php - - - - message: '#^Public property `invalidCountryCodeMessage` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Phone.php - - - - message: '#^Public property `message` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Phone.php - - - - message: '#^Public property `notIntlFormatMessage` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Phone.php - - - - message: '#^Public property `tooLongMessage` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Phone.php - - - - message: '#^Public property `tooShortMessage` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Phone.php - - - - message: '#^Public property `wrongTypeMessage` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Phone.php - - - - message: '#^Public property `wrongTypeMessage` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/PhoneLandline.php - - - - message: '#^Public property `wrongTypeMessage` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/PhoneMobile.php - - - - message: '#^Public property `countryPropertyPath` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Postal.php - - - - message: '#^Public property `message` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Postal.php - - - - message: '#^Public property `missingPostalCodeMessage` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Postal.php - - - - message: '#^Public property `noPostalCodeMessage` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Postal.php - - - - message: '#^Public property `unknownCountryMessage` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Postal.php - - - - message: '#^Public property `message` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/Timezone.php - - - - message: '#^Public property `message` not marked as readonly\.$#' - identifier: shipmonk.publicPropertyNotReadonly - count: 1 - path: src/Validator/Constraints/UsSocialSecurityNumber.php - - - - message: '#^Method AssoConnect\\ValidatorBundle\\Validator\\ConstraintsSetProvider\\Field\\IntegerProvider\:\:getMaxValue\(\) cannot have float\|int as its return type \- floats are not allowed\.$#' - identifier: float.type - count: 1 - path: src/Validator/ConstraintsSetProvider/Field/IntegerProvider.php - - - - message: '#^Method AssoConnect\\ValidatorBundle\\Validator\\ConstraintsSetProvider\\Field\\IntegerProvider\:\:getMinValue\(\) cannot have float\|int as its return type \- floats are not allowed\.$#' - identifier: float.type - count: 1 - path: src/Validator/ConstraintsSetProvider/Field/IntegerProvider.php - - - - message: '#^Method registerBundles always return list, but is marked as iterable\$#' - identifier: shipmonk.returnListNotUsed - count: 1 - path: tests/TestKernel.php +parameters: + ignoreErrors: + - + message: '#^Public property `bool` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEmbeddable.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$absoluteDate\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$array\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$bic\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$bigint\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$bigintUnsigned\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$boolean\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$country\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$currency\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$date\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$datetime\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$decimal\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$email\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$embeddable\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$float\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$frenchRNA\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$frenchSIREN\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$iban\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$id\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$integer\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$ip\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$json\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$latitude\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$locale\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$longitude\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$mainParent\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$money\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$notNullable\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$parentNotNullable\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$parentNullable\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$parents\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$percent\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$phone\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$phonelandline\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$phonemobile\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$smallint\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$smallintUnsigned\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$string\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$text\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$timezone\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$uuid\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity has an uninitialized property \$uuid_binary_ordered_time\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Property AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity\:\:\$decimal cannot have float as its type \- floats are not allowed\.$#' + identifier: float.property + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Property AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity\:\:\$float cannot have float as its type \- floats are not allowed\.$#' + identifier: float.property + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Property AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity\:\:\$money cannot have float as its type \- floats are not allowed\.$#' + identifier: float.property + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Property AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntity\:\:\$percent cannot have float as its type \- floats are not allowed\.$#' + identifier: float.property + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `absoluteDate` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `array` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `bic` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `bigintUnsigned` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `bigint` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `boolean` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `country` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `currency` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `date` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `datetime` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `decimal` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `email` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `embeddable` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `float` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `frenchRNA` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `frenchSIREN` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `iban` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `id` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `integer` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `ip` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `json` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `latitude` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `locale` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `longitude` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `mainParent` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `money` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `notNullable` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `parentNotNullable` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `parentNullable` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `parents` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `percent` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `phone` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `phonelandline` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `phonemobile` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `smallintUnsigned` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `smallint` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `string` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `text` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `timezone` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `uuid_binary_ordered_time` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Public property `uuid` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntity.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntityParent has an uninitialized property \$id\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntityParent.php + + - + message: '#^Class AssoConnect\\ValidatorBundle\\Test\\Functional\\App\\Entity\\MyEntityParent has an uninitialized property \$mainChild\. Give it default value or assign it in the constructor\.$#' + identifier: property.uninitialized + count: 1 + path: src/Test/Functional/App/Entity/MyEntityParent.php + + - + message: '#^Public property `id` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntityParent.php + + - + message: '#^Public property `mainChild` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Test/Functional/App/Entity/MyEntityParent.php + + - + message: '#^Method AssoConnect\\ValidatorBundle\\Validator\\Constraints\\Email\:\:__construct\(\) has parameter \$normalizer with no signature specified for callable\.$#' + identifier: missingType.callable + count: 1 + path: src/Validator/Constraints/Email.php + + - + message: '#^Public property `checkDNS` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Email.php + + - + message: '#^Public property `dnsMessage` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Email.php + + - + message: '#^Public property `tldMessage` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Email.php + + - + message: '#^Public property `message` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/EmployerIdentificationNumber.php + + - + message: '#^Public property `message` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/FloatScale.php + + - + message: '#^Public property `scale` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/FloatScale.php + + - + message: '#^Method AssoConnect\\ValidatorBundle\\Validator\\Constraints\\FrenchRna\:\:__construct\(\) has parameter \$options with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Validator/Constraints/FrenchRna.php + + - + message: '#^Public property `message` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/FrenchRna.php + + - + message: '#^Public property `message` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/LastDigitsUsSocialSecurityNumber.php + + - + message: '#^Parameter \#1 \$min of method AssoConnect\\ValidatorBundle\\Validator\\Constraints\\Money\:\:__construct\(\) cannot have float as its type \- floats are not allowed\.$#' + identifier: float.type + count: 1 + path: src/Validator/Constraints/Money.php + + - + message: '#^Parameter \#2 \$max of method AssoConnect\\ValidatorBundle\\Validator\\Constraints\\Money\:\:__construct\(\) cannot have float as its type \- floats are not allowed\.$#' + identifier: float.type + count: 1 + path: src/Validator/Constraints/Money.php + + - + message: '#^Cannot assign float to \$this\->min \- floats are not allowed\.$#' + identifier: float.assign + count: 1 + path: src/Validator/Constraints/Money.php + + - + message: '#^Cannot assign float to \$this\->max \- floats are not allowed\.$#' + identifier: float.assign + count: 1 + path: src/Validator/Constraints/Money.php + + - + message: '#^Property AssoConnect\\ValidatorBundle\\Validator\\Constraints\\Money\:\:\$max cannot have float as its type \- floats are not allowed\.$#' + identifier: float.property + count: 1 + path: src/Validator/Constraints/Money.php + + - + message: '#^Property AssoConnect\\ValidatorBundle\\Validator\\Constraints\\Money\:\:\$min cannot have float as its type \- floats are not allowed\.$#' + identifier: float.property + count: 1 + path: src/Validator/Constraints/Money.php + + - + message: '#^Public property `max` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Money.php + + - + message: '#^Public property `min` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Money.php + + - + message: '#^Public property `inexistantMessage` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Phone.php + + - + message: '#^Public property `invalidCountryCodeMessage` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Phone.php + + - + message: '#^Public property `message` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Phone.php + + - + message: '#^Public property `notIntlFormatMessage` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Phone.php + + - + message: '#^Public property `tooLongMessage` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Phone.php + + - + message: '#^Public property `tooShortMessage` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Phone.php + + - + message: '#^Public property `wrongTypeMessage` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Phone.php + + - + message: '#^Public property `wrongTypeMessage` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/PhoneLandline.php + + - + message: '#^Public property `wrongTypeMessage` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/PhoneMobile.php + + - + message: '#^Public property `countryPropertyPath` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Postal.php + + - + message: '#^Public property `message` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Postal.php + + - + message: '#^Public property `missingPostalCodeMessage` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Postal.php + + - + message: '#^Public property `noPostalCodeMessage` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Postal.php + + - + message: '#^Public property `unknownCountryMessage` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Postal.php + + - + message: '#^Public property `message` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/Timezone.php + + - + message: '#^Public property `message` not marked as readonly\.$#' + identifier: shipmonk.publicPropertyNotReadonly + count: 1 + path: src/Validator/Constraints/UsSocialSecurityNumber.php + + - + message: '#^Method AssoConnect\\ValidatorBundle\\Validator\\ConstraintsSetProvider\\Field\\IntegerProvider\:\:getMaxValue\(\) cannot have float\|int as its return type \- floats are not allowed\.$#' + identifier: float.type + count: 1 + path: src/Validator/ConstraintsSetProvider/Field/IntegerProvider.php + + - + message: '#^Method AssoConnect\\ValidatorBundle\\Validator\\ConstraintsSetProvider\\Field\\IntegerProvider\:\:getMinValue\(\) cannot have float\|int as its return type \- floats are not allowed\.$#' + identifier: float.type + count: 1 + path: src/Validator/ConstraintsSetProvider/Field/IntegerProvider.php + + - + message: '#^Method registerBundles always return list, but is marked as iterable\$#' + identifier: shipmonk.returnListNotUsed + count: 1 + path: tests/TestKernel.php diff --git a/src/Validator/Constraints/BelgianEnterpriseNumber.php b/src/Validator/Constraints/BelgianEnterpriseNumber.php index 3902969..fffd259 100644 --- a/src/Validator/Constraints/BelgianEnterpriseNumber.php +++ b/src/Validator/Constraints/BelgianEnterpriseNumber.php @@ -9,6 +9,8 @@ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD)] class BelgianEnterpriseNumber extends Constraint { + // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName -- PHP 8.3 typed constants not yet supported by sniff public const string WRONG_FORMAT_ERROR = '3f7d2e1c-a845-4b9f-c631-52d78e04fb6a'; + // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName -- PHP 8.3 typed constants not yet supported by sniff public const string MESSAGE = 'The Belgian Enterprise Number {{ value }} is not valid.'; } diff --git a/src/Validator/Constraints/FrenchSiren.php b/src/Validator/Constraints/FrenchSiren.php index f9903b1..460278a 100755 --- a/src/Validator/Constraints/FrenchSiren.php +++ b/src/Validator/Constraints/FrenchSiren.php @@ -14,6 +14,10 @@ class FrenchSiren extends Luhn { public const INVALID_FORMAT_ERROR = '4d762774-3g50-4bd5-a6d5-b10a3299d8d3'; + /** + * @param array|null $options + * @param array|null $groups + */ public function __construct( ?array $options = null, ?string $message = null, diff --git a/src/Validator/Constraints/FrenchSiret.php b/src/Validator/Constraints/FrenchSiret.php index 616a7d8..63460ea 100644 --- a/src/Validator/Constraints/FrenchSiret.php +++ b/src/Validator/Constraints/FrenchSiret.php @@ -14,6 +14,10 @@ class FrenchSiret extends Luhn { public const INVALID_FORMAT_ERROR = 'cbe06561-776e-45c2-b33c-a73141746d43'; + /** + * @param array|null $options + * @param array|null $groups + */ public function __construct( ?array $options = null, ?string $message = null, diff --git a/tests/Validator/Constraints/EntityValidatorTest.php b/tests/Validator/Constraints/EntityValidatorTest.php index 762b68b..a0f5532 100644 --- a/tests/Validator/Constraints/EntityValidatorTest.php +++ b/tests/Validator/Constraints/EntityValidatorTest.php @@ -158,8 +158,12 @@ public function testValidValues(mixed $value = null): void self::markTestSkipped('No valid values to test for EntityValidator'); } - public function testInvalidValues(mixed $value = null, string $code = '', string $message = '', ?array $parameters = null): void - { + public function testInvalidValues( + mixed $value = null, + string $code = '', + string $message = '', + ?array $parameters = null + ): void { self::markTestSkipped('No invalid values to test for EntityValidator'); } diff --git a/tests/Validator/Constraints/PostalValidatorTest.php b/tests/Validator/Constraints/PostalValidatorTest.php index 12b52e0..ebe34e0 100644 --- a/tests/Validator/Constraints/PostalValidatorTest.php +++ b/tests/Validator/Constraints/PostalValidatorTest.php @@ -163,8 +163,12 @@ public function testValidValues(mixed $value = null): void self::markTestSkipped('No valid values to test for PostalValidator'); } - public function testInvalidValues(mixed $value = null, string $code = '', string $message = '', ?array $parameters = null): void - { + public function testInvalidValues( + mixed $value = null, + string $code = '', + string $message = '', + ?array $parameters = null + ): void { self::markTestSkipped('No invalid values to test for PostalValidator'); } } From 0ccb9742e2f96ad6285342966444162ec8711f72 Mon Sep 17 00:00:00 2001 From: Sylvain Fabre Date: Sun, 22 Mar 2026 09:48:41 +0100 Subject: [PATCH 4/7] Disable SYMFONY_DEPRECATIONS_HELPER to avoid false failures Previously set via simple-phpunit env, now set in phpunit.xml.dist. Co-Authored-By: Claude Sonnet 4.6 --- phpunit.xml.dist | 1 + 1 file changed, 1 insertion(+) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index b58d9c8..09d01a7 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -5,6 +5,7 @@ + From 9c71bba9f81173a0935640cd82e4a8956605c968 Mon Sep 17 00:00:00 2001 From: Sylvain Fabre Date: Sun, 22 Mar 2026 09:54:21 +0100 Subject: [PATCH 5/7] Use weak mode for SYMFONY_DEPRECATIONS_HELPER Fails only on deprecations from our own code, not from dependencies. Co-Authored-By: Claude Sonnet 4.6 --- phpunit.xml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 09d01a7..e381b42 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -5,7 +5,7 @@ - + From 212049a96a23ec264e02d62c055d0d3719bf536e Mon Sep 17 00:00:00 2001 From: Sylvain Fabre Date: Sun, 22 Mar 2026 10:00:36 +0100 Subject: [PATCH 6/7] Remove unnecessary phpcs:ignore comments PHP_CodeSniffer 3.9+ handles PHP 8.3 typed constants correctly. Co-Authored-By: Claude Sonnet 4.6 --- src/Validator/Constraints/BelgianEnterpriseNumber.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Validator/Constraints/BelgianEnterpriseNumber.php b/src/Validator/Constraints/BelgianEnterpriseNumber.php index fffd259..3902969 100644 --- a/src/Validator/Constraints/BelgianEnterpriseNumber.php +++ b/src/Validator/Constraints/BelgianEnterpriseNumber.php @@ -9,8 +9,6 @@ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD)] class BelgianEnterpriseNumber extends Constraint { - // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName -- PHP 8.3 typed constants not yet supported by sniff public const string WRONG_FORMAT_ERROR = '3f7d2e1c-a845-4b9f-c631-52d78e04fb6a'; - // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName -- PHP 8.3 typed constants not yet supported by sniff public const string MESSAGE = 'The Belgian Enterprise Number {{ value }} is not valid.'; } From e757eca659b7d723826ed44b69b2a7457316461a Mon Sep 17 00:00:00 2001 From: Sylvain Fabre Date: Sun, 22 Mar 2026 10:45:35 +0100 Subject: [PATCH 7/7] Clarify markTestSkipped messages with reason Co-Authored-By: Claude Sonnet 4.6 --- tests/Validator/Constraints/EntityValidatorTest.php | 4 ++-- tests/Validator/Constraints/PostalValidatorTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Validator/Constraints/EntityValidatorTest.php b/tests/Validator/Constraints/EntityValidatorTest.php index a0f5532..392df45 100644 --- a/tests/Validator/Constraints/EntityValidatorTest.php +++ b/tests/Validator/Constraints/EntityValidatorTest.php @@ -155,7 +155,7 @@ public static function providerValidValues(): iterable public function testValidValues(mixed $value = null): void { - self::markTestSkipped('No valid values to test for EntityValidator'); + self::markTestSkipped('EntityValidator validates fields based on Doctrine metadata, not raw values'); } public function testInvalidValues( @@ -164,7 +164,7 @@ public function testInvalidValues( string $message = '', ?array $parameters = null ): void { - self::markTestSkipped('No invalid values to test for EntityValidator'); + self::markTestSkipped('EntityValidator validates fields based on Doctrine metadata, not raw values'); } private function getMockClassMetadata(): \stdClass diff --git a/tests/Validator/Constraints/PostalValidatorTest.php b/tests/Validator/Constraints/PostalValidatorTest.php index ebe34e0..dd441fd 100644 --- a/tests/Validator/Constraints/PostalValidatorTest.php +++ b/tests/Validator/Constraints/PostalValidatorTest.php @@ -160,7 +160,7 @@ public static function providerInvalidValues(): iterable public function testValidValues(mixed $value = null): void { - self::markTestSkipped('No valid values to test for PostalValidator'); + self::markTestSkipped('PostalValidator requires object context with a country property, not a raw value'); } public function testInvalidValues( @@ -169,6 +169,6 @@ public function testInvalidValues( string $message = '', ?array $parameters = null ): void { - self::markTestSkipped('No invalid values to test for PostalValidator'); + self::markTestSkipped('PostalValidator requires object context with a country property, not a raw value'); } }