This commit is contained in:
TheMilek 2026-02-18 15:01:45 +01:00 committed by Grzegorz Sadowski
parent 177c03f63a
commit ae536c34cf
No known key found for this signature in database
GPG key ID: EF87FF4E6E3BD364
2 changed files with 20 additions and 15 deletions

View file

@ -107,5 +107,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

View file

@ -62,30 +62,31 @@ final class ChannelCodeCollection extends Constraint
}
/**
* @param array<Constraint> $constraints
* @param array<Constraint>|null $constraints
*/
public function __construct(
array $constraints = [],
bool $allowExtraFields = false,
bool $allowMissingFields = false,
?array $options = null,
?array $constraints = null,
?bool $allowExtraFields = null,
?bool $allowMissingFields = null,
?string $channelAwarePropertyPath = null,
?string $extraFieldsMessage = null,
?string $missingFieldsMessage = null,
string $invalidChannelMessage = 'sylius.channel_code_collection.invalid_channel',
bool $validateAgainstAllChannels = false,
?string $invalidChannelMessage = null,
?bool $validateAgainstAllChannels = null,
?array $groups = null,
mixed $payload = null,
) {
parent::__construct(groups: $groups, payload: $payload);
parent::__construct($options, $groups, $payload);
$this->constraints = $constraints;
$this->allowExtraFields = $allowExtraFields;
$this->allowMissingFields = $allowMissingFields;
$this->channelAwarePropertyPath = $channelAwarePropertyPath;
$this->extraFieldsMessage = $extraFieldsMessage;
$this->missingFieldsMessage = $missingFieldsMessage;
$this->invalidChannelMessage = $invalidChannelMessage;
$this->validateAgainstAllChannels = $validateAgainstAllChannels;
$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