mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-05 20:57:12 +00:00
[SF8] Use named arguments for Validator constraint constructor
This commit is contained in:
parent
55fef698fb
commit
bff3428026
3 changed files with 34 additions and 39 deletions
4
.github/workflows/ci_packages-sf8.yaml
vendored
4
.github/workflows/ci_packages-sf8.yaml
vendored
|
|
@ -103,5 +103,9 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: composer update --no-interaction --no-scripts --prefer-dist
|
||||
|
||||
- name: Create test database schema
|
||||
if: matrix.package == 'Bundle/ApiBundle'
|
||||
run: tests/Application/bin/console doctrine:schema:update --force
|
||||
|
||||
- name: Run tests
|
||||
run: vendor/bin/phpunit --colors=always
|
||||
|
|
|
|||
39
.github/workflows/matrix.json
vendored
39
.github/workflows/matrix.json
vendored
|
|
@ -2,10 +2,6 @@
|
|||
"minimal": {
|
||||
"static-checks": {
|
||||
"include": [
|
||||
{
|
||||
"php": "8.3",
|
||||
"symfony": "~6.4.0"
|
||||
},
|
||||
{
|
||||
"php": "8.4",
|
||||
"symfony": "~7.4.0"
|
||||
|
|
@ -18,13 +14,6 @@
|
|||
},
|
||||
"e2e-mariadb": {
|
||||
"include": [
|
||||
{
|
||||
"php": "8.4",
|
||||
"symfony": "~6.4.0",
|
||||
"mariadb": "10.11.13",
|
||||
"doctrine_bundle": "^2.0",
|
||||
"state_machine_adapter": "winzou_state_machine"
|
||||
},
|
||||
{
|
||||
"php": "8.5",
|
||||
"symfony": "~7.4.0",
|
||||
|
|
@ -36,13 +25,6 @@
|
|||
},
|
||||
"e2e-mysql": {
|
||||
"include": [
|
||||
{
|
||||
"php": "8.4",
|
||||
"symfony": "~6.4.0",
|
||||
"mysql": "8.0",
|
||||
"twig": "^3.3",
|
||||
"doctrine_bundle": "^2.0"
|
||||
},
|
||||
{
|
||||
"php": "8.5",
|
||||
"symfony": "~7.4.0",
|
||||
|
|
@ -102,12 +84,6 @@
|
|||
},
|
||||
"e2e-pgsql": {
|
||||
"include": [
|
||||
{
|
||||
"php": "8.4",
|
||||
"symfony": "~6.4.0",
|
||||
"postgres": "15.13",
|
||||
"doctrine_bundle": "^2.0"
|
||||
},
|
||||
{
|
||||
"php": "8.5",
|
||||
"symfony": "~7.4.0",
|
||||
|
|
@ -123,10 +99,6 @@
|
|||
},
|
||||
"packages": {
|
||||
"include": [
|
||||
{
|
||||
"php": "8.4",
|
||||
"symfony": "~6.4.0"
|
||||
},
|
||||
{
|
||||
"php": "8.5",
|
||||
"symfony": "~7.4.0"
|
||||
|
|
@ -142,7 +114,6 @@
|
|||
"8.5"
|
||||
],
|
||||
"symfony": [
|
||||
"~6.4.0",
|
||||
"~7.4.0"
|
||||
]
|
||||
},
|
||||
|
|
@ -153,7 +124,6 @@
|
|||
"8.5"
|
||||
],
|
||||
"symfony": [
|
||||
"~6.4.0",
|
||||
"~7.4.0"
|
||||
],
|
||||
"mariadb": [
|
||||
|
|
@ -182,7 +152,6 @@
|
|||
"8.4"
|
||||
],
|
||||
"symfony": [
|
||||
"~6.4.0",
|
||||
"~7.4.0"
|
||||
],
|
||||
"mysql": [
|
||||
|
|
@ -260,7 +229,6 @@
|
|||
"8.5"
|
||||
],
|
||||
"symfony": [
|
||||
"~6.4.0",
|
||||
"~7.4.0"
|
||||
],
|
||||
"postgres": [
|
||||
|
|
@ -269,12 +237,6 @@
|
|||
"17.5"
|
||||
],
|
||||
"include": [
|
||||
{
|
||||
"php": "8.4",
|
||||
"symfony": "~6.4.0",
|
||||
"postgres": "15.13",
|
||||
"doctrine_bundle": "^2.0"
|
||||
},
|
||||
{
|
||||
"php": "8.5",
|
||||
"symfony": "~7.4.0",
|
||||
|
|
@ -296,7 +258,6 @@
|
|||
"8.5"
|
||||
],
|
||||
"symfony": [
|
||||
"~6.4.0",
|
||||
"~7.4.0"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,36 @@ final class ChannelCodeCollection extends Constraint
|
|||
parent::__construct(groups: $groups, payload: $payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed>|null $options
|
||||
* @param array<Constraint>|null $constraints
|
||||
* @param array<string>|null $groups
|
||||
*/
|
||||
public function __construct(
|
||||
?array $options = null,
|
||||
?array $constraints = null,
|
||||
?bool $allowExtraFields = null,
|
||||
?bool $allowMissingFields = null,
|
||||
?string $channelAwarePropertyPath = null,
|
||||
?string $extraFieldsMessage = null,
|
||||
?string $missingFieldsMessage = null,
|
||||
?string $invalidChannelMessage = null,
|
||||
?bool $validateAgainstAllChannels = null,
|
||||
?array $groups = null,
|
||||
mixed $payload = null,
|
||||
) {
|
||||
parent::__construct($options, $groups, $payload);
|
||||
|
||||
$this->constraints = $constraints ?? $this->constraints;
|
||||
$this->allowExtraFields = $allowExtraFields ?? $this->allowExtraFields;
|
||||
$this->allowMissingFields = $allowMissingFields ?? $this->allowMissingFields;
|
||||
$this->channelAwarePropertyPath = $channelAwarePropertyPath ?? $this->channelAwarePropertyPath;
|
||||
$this->extraFieldsMessage = $extraFieldsMessage ?? $this->extraFieldsMessage;
|
||||
$this->missingFieldsMessage = $missingFieldsMessage ?? $this->missingFieldsMessage;
|
||||
$this->invalidChannelMessage = $invalidChannelMessage ?? $this->invalidChannelMessage;
|
||||
$this->validateAgainstAllChannels = $validateAgainstAllChannels ?? $this->validateAgainstAllChannels;
|
||||
}
|
||||
|
||||
public function validatedBy(): string
|
||||
{
|
||||
return 'sylius_channel_code_collection';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue