Skip to content

Commit e413b0c

Browse files
author
Augustin Pasquini
committed
CI fixed
1 parent e17afd3 commit e413b0c

8 files changed

Lines changed: 66 additions & 58 deletions

File tree

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@
3030
"require": {
3131
"doctrine/doctrine-bundle": "^2.12",
3232
"giggsey/libphonenumber-for-php": "^8.13",
33-
"php": "^8.2",
34-
"symfony/http-kernel": "^6.4|^7.0",
35-
"symfony/validator": "^6.4|^7.0",
33+
"php": "^8.3",
34+
"symfony/http-kernel": "^7.0",
35+
"symfony/validator": "^7.0",
3636
"egulias/email-validator": "^3.2|^4.0",
37-
"symfony/property-access": "^6.4|^7.0",
37+
"symfony/property-access": "^7.0",
3838
"jeremykendall/php-domain-parser": "^6.0",
3939
"moneyphp/money": "^3.0|^4.0",
4040
"assoconnect/php-date": "^2.0",
4141
"doctrine/orm": "^2.7",
42-
"symfony/intl": "^6.0|^7.0",
42+
"symfony/intl": "^7.0",
4343
"assoconnect/doctrine-types-bundle": "^v2.13",
4444
"assoconnect/php-percent":"^1.1",
4545
"assoconnect/absolute-percent-value-bundle": "dev-sf-7",
@@ -48,9 +48,9 @@
4848
},
4949
"require-dev": {
5050
"doctrine/cache": "~1.0",
51-
"symfony/phpunit-bridge": "^6.4.3|^7.0",
52-
"symfony/framework-bundle": "^6.4|^7.0",
53-
"symfony/yaml": "^6.4|^7.0",
51+
"symfony/phpunit-bridge": "^7.0",
52+
"symfony/framework-bundle": "^7.0",
53+
"symfony/yaml": "^7.0",
5454
"dg/bypass-finals": "^1.1",
5555
"assoconnect/php-quality-config": "^1.16",
5656
"guzzlehttp/guzzle": "^7.7",

phpstan-baseline.neon

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -465,11 +465,6 @@ parameters:
465465
count: 1
466466
path: src/Validator/Constraints/Email.php
467467

468-
-
469-
message: "#^Public property `mode` not marked as readonly\\.$#"
470-
count: 1
471-
path: src/Validator/Constraints/Email.php
472-
473468
-
474469
message: "#^Public property `tldMessage` not marked as readonly\\.$#"
475470
count: 1
@@ -480,6 +475,11 @@ parameters:
480475
count: 1
481476
path: src/Validator/Constraints/EmployerIdentificationNumber.php
482477

478+
-
479+
message: "#^Return type \\(string\\) of method AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\Entity\\:\\:getTargets\\(\\) should be covariant with return type \\('class'\\|'property'\\|array\\<'class'\\|'property'\\>\\) of method Symfony\\\\Component\\\\Validator\\\\Constraint\\:\\:getTargets\\(\\)$#"
480+
count: 1
481+
path: src/Validator/Constraints/Entity.php
482+
483483
-
484484
message: "#^Method AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\EntityValidator\\:\\:getFieldAttributes\\(\\) has parameter \\$reflectionClass with generic class ReflectionClass but does not specify its types\\: T$#"
485485
count: 1
@@ -495,11 +495,6 @@ parameters:
495495
count: 1
496496
path: src/Validator/Constraints/EntityValidator.php
497497

498-
-
499-
message: "#^Class AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\FloatScale has an uninitialized property \\$scale\\. Give it default value or assign it in the constructor\\.$#"
500-
count: 1
501-
path: src/Validator/Constraints/FloatScale.php
502-
503498
-
504499
message: "#^Public property `message` not marked as readonly\\.$#"
505500
count: 1
@@ -518,17 +513,27 @@ parameters:
518513
-
519514
message: "#^Public property `message` not marked as readonly\\.$#"
520515
count: 1
521-
path: src/Validator/Constraints/FrenchSiren.php
516+
path: src/Validator/Constraints/LastDigitsUsSocialSecurityNumber.php
522517

523518
-
524-
message: "#^Public property `message` not marked as readonly\\.$#"
519+
message: "#^Cannot assign float to \\$this\\-\\>max \\- floats are not allowed\\.$#"
525520
count: 1
526-
path: src/Validator/Constraints/FrenchSiret.php
521+
path: src/Validator/Constraints/Money.php
527522

528523
-
529-
message: "#^Public property `message` not marked as readonly\\.$#"
524+
message: "#^Cannot assign float to \\$this\\-\\>min \\- floats are not allowed\\.$#"
530525
count: 1
531-
path: src/Validator/Constraints/LastDigitsUsSocialSecurityNumber.php
526+
path: src/Validator/Constraints/Money.php
527+
528+
-
529+
message: "#^Parameter \\#1 \\$min of method AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\Money\\:\\:__construct\\(\\) cannot have float\\|null as its type \\- floats are not allowed\\.$#"
530+
count: 1
531+
path: src/Validator/Constraints/Money.php
532+
533+
-
534+
message: "#^Parameter \\#2 \\$max of method AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\Money\\:\\:__construct\\(\\) cannot have float\\|null as its type \\- floats are not allowed\\.$#"
535+
count: 1
536+
path: src/Validator/Constraints/Money.php
532537

533538
-
534539
message: "#^Property AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\Money\\:\\:\\$max cannot have float as its type \\- floats are not allowed\\.$#"
@@ -585,21 +590,6 @@ parameters:
585590
count: 1
586591
path: src/Validator/Constraints/Phone.php
587592

588-
-
589-
message: "#^Public property `wrongTypeMessage` not marked as readonly\\.$#"
590-
count: 1
591-
path: src/Validator/Constraints/PhoneLandline.php
592-
593-
-
594-
message: "#^Public property `wrongTypeMessage` not marked as readonly\\.$#"
595-
count: 1
596-
path: src/Validator/Constraints/PhoneMobile.php
597-
598-
-
599-
message: "#^Class AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\Postal has an uninitialized property \\$countryPropertyPath\\. Give it default value or assign it in the constructor\\.$#"
600-
count: 1
601-
path: src/Validator/Constraints/Postal.php
602-
603593
-
604594
message: "#^Public property `countryPropertyPath` not marked as readonly\\.$#"
605595
count: 1
@@ -635,6 +625,11 @@ parameters:
635625
count: 1
636626
path: src/Validator/Constraints/UsSocialSecurityNumber.php
637627

628+
-
629+
message: "#^Parameter \\$max of class Symfony\\\\Component\\\\Validator\\\\Constraints\\\\Length constructor expects int\\<1, max\\>\\|null, int given\\.$#"
630+
count: 1
631+
path: src/Validator/ConstraintsSetProvider/Field/EmailProvider.php
632+
638633
-
639634
message: "#^Method AssoConnect\\\\ValidatorBundle\\\\Validator\\\\ConstraintsSetProvider\\\\Field\\\\IntegerProvider\\:\\:getMaxValue\\(\\) cannot have float\\|int as its return type \\- floats are not allowed\\.$#"
640635
count: 1
@@ -649,3 +644,18 @@ parameters:
649644
message: "#^Missing native return typehint float$#"
650645
count: 2
651646
path: src/Validator/ConstraintsSetProvider/Field/IntegerProvider.php
647+
648+
-
649+
message: "#^Parameter \\$max of class Symfony\\\\Component\\\\Validator\\\\Constraints\\\\Length constructor expects int\\<1, max\\>\\|null, int given\\.$#"
650+
count: 1
651+
path: src/Validator/ConstraintsSetProvider/Field/StringProvider.php
652+
653+
-
654+
message: "#^Parameter \\$max of class Symfony\\\\Component\\\\Validator\\\\Constraints\\\\Length constructor expects int\\<1, max\\>\\|null, int given\\.$#"
655+
count: 1
656+
path: src/Validator/ConstraintsSetProvider/Field/TextProvider.php
657+
658+
-
659+
message: "#^Parameter \\#1 \\$array1 of static method AssoConnect\\\\ValidatorBundle\\\\Test\\\\ConstraintValidatorTestCase\\<AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\EntityValidator\\>\\:\\:assertArrayContainsSameObjects\\(\\) expects array, array\\|Symfony\\\\Component\\\\Validator\\\\Constraint given\\.$#"
660+
count: 1
661+
path: tests/Validator/Constraints/EntityValidatorTest.php

src/Validator/Constraints/FrenchSiren.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ class FrenchSiren extends Luhn
1414
{
1515
public const INVALID_FORMAT_ERROR = '4d762774-3g50-4bd5-a6d5-b10a3299d8d3';
1616

17-
public string $message;
18-
1917
public function __construct(
2018
?string $message = null,
2119
?array $groups = null,
2220
mixed $payload = null,
2321
) {
24-
$this->message = $message ?? 'The value {{ value }} is not a valid SIREN number.';
25-
26-
parent::__construct(message: $this->message, groups: $groups, payload: $payload);
22+
parent::__construct(
23+
message: $message ?? 'The value {{ value }} is not a valid SIREN number.',
24+
groups: $groups,
25+
payload: $payload,
26+
);
2727
}
2828
}

src/Validator/Constraints/FrenchSiret.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ class FrenchSiret extends Luhn
1414
{
1515
public const INVALID_FORMAT_ERROR = 'cbe06561-776e-45c2-b33c-a73141746d43';
1616

17-
public string $message;
18-
1917
public function __construct(
2018
?string $message = null,
2119
?array $groups = null,
2220
mixed $payload = null,
2321
) {
24-
$this->message = $message ?? 'The value {{ value }} is not a valid SIRET number.';
25-
26-
parent::__construct(message: $this->message, groups: $groups, payload: $payload);
22+
parent::__construct(
23+
message: $message ?? 'The value {{ value }} is not a valid SIRET number.',
24+
groups: $groups,
25+
payload: $payload,
26+
);
2727
}
2828
}

src/Validator/Constraints/LastDigitsUsSocialSecurityNumber.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public function __construct(
2323
) {
2424
parent::__construct(groups: $groups, payload: $payload);
2525

26-
$this->message = $message ?? 'The value {{ value }} is not a valid set of last four digits of a US Social Security Number.';
26+
$this->message = $message
27+
?? 'The value {{ value }} is not a valid set of last four digits of a US Social Security Number.';
2728
}
2829
}

src/Validator/Constraints/Phone.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,14 @@ public function __construct(
6363
parent::__construct(groups: $groups, payload: $payload);
6464

6565
$this->message = $message ?? 'The value {{ value }} is not a valid phone number.';
66-
$this->notIntlFormatMessage = $notIntlFormatMessage ?? 'The value {{ value }} is not formatted as an international phone number.';
66+
$this->notIntlFormatMessage = $notIntlFormatMessage
67+
?? 'The value {{ value }} is not formatted as an international phone number.';
6768
$this->tooShortMessage = $tooShortMessage ?? 'The phone number {{ value }} is too short.';
6869
$this->tooLongMessage = $tooLongMessage ?? 'The phone number {{ value }} is too long.';
6970
$this->inexistantMessage = $inexistantMessage ?? 'The phone number {{ value }} does not exist.';
7071
$this->wrongTypeMessage = $wrongTypeMessage ?? 'The value {{ value }} is not an accepted phone number type.';
71-
$this->invalidCountryCodeMessage = $invalidCountryCodeMessage ?? 'The phone number {{ value }} does not have a valid country code.';
72+
$this->invalidCountryCodeMessage = $invalidCountryCodeMessage
73+
?? 'The phone number {{ value }} does not have a valid country code.';
7274
}
7375

7476
/**

src/Validator/Constraints/Postal.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function __construct(
3636
$this->message = $message ?? 'The value {{ value }} is not a valid postal code.';
3737
$this->unknownCountryMessage = $unknownCountryMessage ?? 'The country {{ country }} is unknown.';
3838
$this->missingPostalCodeMessage = $missingPostalCodeMessage ?? 'The postal code must be provided.';
39-
$this->noPostalCodeMessage = $noPostalCodeMessage ?? 'There is no postal code system in the country {{ country }}.';
39+
$this->noPostalCodeMessage = $noPostalCodeMessage
40+
?? 'There is no postal code system in the country {{ country }}.';
4041
}
4142
}

tests/Validator/Constraints/PostalValidatorTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ public function createValidator(): ConstraintValidator
2828
return new PostalValidator();
2929
}
3030

31-
public function testMissingPropertyPath(): void
32-
{
33-
$this->expectException(\ArgumentCountError::class);
34-
new Postal();
35-
}
36-
3731
public function testMissingObject(): void
3832
{
3933
$this->setObject(null);

0 commit comments

Comments
 (0)