Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,30 @@
}
},
"require": {
"doctrine/doctrine-bundle": "^2.12",
"doctrine/doctrine-bundle": "^2.12|^3.0",
"giggsey/libphonenumber-for-php": "^9.0",
"php": "^8.4",
"symfony/http-kernel": "^7.0",
"symfony/validator": "^7.0",
"symfony/http-kernel": "^7.0|^8.0",
"symfony/validator": "^7.0|^8.0",
"egulias/email-validator": "^4.0",
"symfony/property-access": "^7.0",
"symfony/property-access": "^7.0|^8.0",
"jeremykendall/php-domain-parser": "^6.0",
"moneyphp/money": "^4.0",
"assoconnect/php-date": "^2.0",
"doctrine/orm": "^3.0",
"symfony/intl": "^7.0",
"symfony/intl": "^7.0|^8.0",
"assoconnect/doctrine-types-bundle": "^v2.16",
"assoconnect/php-percent":"^1.1",
"assoconnect/absolute-percent-value-bundle": "^1.5",
"webmozart/assert": "^1.11",
"psr/simple-cache": "^1.0",
"symfony/cache": "^7.0"
"symfony/cache": "^7.0|^8.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^7.0",
"symfony/framework-bundle": "^7.0",
"symfony/var-exporter": "^7.0",
"symfony/yaml": "^7.0",
"symfony/phpunit-bridge": "^7.0|^8.0",
"symfony/framework-bundle": "^7.0|^8.0",
"symfony/var-exporter": "^7.0|^8.0",
"symfony/yaml": "^7.0|^8.0",
"dg/bypass-finals": "^1.1",
"assoconnect/php-quality-config": "^2.2",
"guzzlehttp/guzzle": "^7.7",
Expand Down
6 changes: 0 additions & 6 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -588,12 +588,6 @@ parameters:
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
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/AssoConnectValidatorExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use AssoConnect\ValidatorBundle\Validator\ConstraintsSetProvider\Field\FieldConstraintsSetProviderInterface;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

class AssoConnectValidatorExtension extends Extension
{
Expand Down
2 changes: 2 additions & 0 deletions src/Validator/Constraints/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace AssoConnect\ValidatorBundle\Validator\Constraints;

use Symfony\Component\Validator\Attribute\HasNamedArguments;
use Symfony\Component\Validator\Constraints\Email as _Email;

/**
Expand All @@ -20,6 +21,7 @@ class Email extends _Email

public bool $checkDNS = false;

#[HasNamedArguments]
public function __construct(
?string $message = null,
?string $mode = null,
Expand Down
5 changes: 5 additions & 0 deletions src/Validator/Constraints/FloatScale.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace AssoConnect\ValidatorBundle\Validator\Constraints;

use Symfony\Component\Validator\Attribute\HasNamedArguments;
use Symfony\Component\Validator\Constraint;

/**
Expand All @@ -18,6 +19,10 @@ class FloatScale extends Constraint

public int $scale;

/**
* @param array<string>|null $groups
*/
#[HasNamedArguments]
public function __construct(
int $scale,
?array $groups = null,
Expand Down
8 changes: 6 additions & 2 deletions src/Validator/Constraints/FrenchRna.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace AssoConnect\ValidatorBundle\Validator\Constraints;

use Symfony\Component\Validator\Attribute\HasNamedArguments;
use Symfony\Component\Validator\Constraint;

/**
Expand All @@ -16,13 +17,16 @@ class FrenchRna extends Constraint

public string $message = 'The value {{ value }} is not a valid RNA identifier.';

/**
* @param array<string>|null $groups
*/
#[HasNamedArguments]
public function __construct(
?array $options = null,
?string $message = null,
?array $groups = null,
mixed $payload = null,
) {
parent::__construct($options, $groups, $payload);
parent::__construct(groups: $groups, payload: $payload);

$this->message = $message ?? $this->message;
}
Expand Down
11 changes: 5 additions & 6 deletions src/Validator/Constraints/FrenchSiren.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace AssoConnect\ValidatorBundle\Validator\Constraints;

use Symfony\Component\Validator\Attribute\HasNamedArguments;
use Symfony\Component\Validator\Constraints\Luhn;

/**
Expand All @@ -15,20 +16,18 @@ class FrenchSiren extends Luhn
public const INVALID_FORMAT_ERROR = '4d762774-3g50-4bd5-a6d5-b10a3299d8d3';

/**
* @param array<string, mixed>|null $options
* @param array<string>|null $groups
*/
#[HasNamedArguments]
public function __construct(
?array $options = null,
?string $message = null,
?array $groups = null,
mixed $payload = null,
) {
parent::__construct(
$options,
$message ?? 'The value {{ value }} is not a valid SIREN number.',
$groups,
$payload,
message: $message ?? 'The value {{ value }} is not a valid SIREN number.',
groups: $groups,
payload: $payload,
);
}
}
11 changes: 5 additions & 6 deletions src/Validator/Constraints/FrenchSiret.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace AssoConnect\ValidatorBundle\Validator\Constraints;

use Symfony\Component\Validator\Attribute\HasNamedArguments;
use Symfony\Component\Validator\Constraints\Luhn;

/**
Expand All @@ -15,20 +16,18 @@ class FrenchSiret extends Luhn
public const INVALID_FORMAT_ERROR = 'cbe06561-776e-45c2-b33c-a73141746d43';

/**
* @param array<string, mixed>|null $options
* @param array<string>|null $groups
*/
#[HasNamedArguments]
public function __construct(
?array $options = null,
?string $message = null,
?array $groups = null,
mixed $payload = null,
) {
parent::__construct(
$options,
$message ?? 'The value {{ value }} is not a valid SIRET number.',
$groups,
$payload,
message: $message ?? 'The value {{ value }} is not a valid SIRET number.',
groups: $groups,
payload: $payload,
);
}
}
5 changes: 5 additions & 0 deletions src/Validator/Constraints/Money.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace AssoConnect\ValidatorBundle\Validator\Constraints;

use Symfony\Component\Validator\Attribute\HasNamedArguments;
use Symfony\Component\Validator\Constraint;

/**
Expand All @@ -17,6 +18,10 @@ class Money extends Constraint
public float $min = 0.0;
public float $max = self::MAX;

/**
* @param array<string>|null $groups
*/
#[HasNamedArguments]
public function __construct(
float $min = 0.0,
float $max = self::MAX,
Expand Down
5 changes: 5 additions & 0 deletions src/Validator/Constraints/Postal.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace AssoConnect\ValidatorBundle\Validator\Constraints;

use Symfony\Component\Validator\Attribute\HasNamedArguments;
use Symfony\Component\Validator\Constraint;

#[\Attribute]
Expand All @@ -16,6 +17,10 @@ class Postal extends Constraint

public string $countryPropertyPath;

/**
* @param array<string>|null $groups
*/
#[HasNamedArguments]
public function __construct(
string $countryPropertyPath,
?array $groups = null,
Expand Down
Loading