Update validation group in checkout complete (#18371)

| Q               | A
|-----------------|-----
| Branch?         | 1.14
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Related tickets | https://github.com/Sylius/Sylius/issues/16151
| License         | MIT

- Removed validation group from route file;
- Added validation group to parameters.
This commit is contained in:
Rafał Jaskulski 2025-09-29 08:50:06 +02:00 committed by GitHub
commit dd8c81499c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 2 deletions

View file

@ -1,3 +1,24 @@
# UPGRADE FROM `v1.14.11` TO `v1.14.12`
## Configuration
1. Checkout Complete validation groups
The validation_groups for the `sylius_shop_checkout_complete` step are no longer defined in routing.
They are now configured via the `sylius.form.type.checkout_complete.validation_groups parameter`, consistent with other checkout steps.
When overriding this parameter in your application, keep in mind that it replaces the default list rather than merging with it.
To preserve the existing behaviour, make sure to include both `sylius` and `sylius_checkout_complete` in addition to any custom groups you need.
Example configuration:
```yaml
parameters:
sylius.form.type.checkout_complete.validation_groups:
- sylius
- sylius_checkout_complete
- my_custom_group
```
# UPGRADE FROM `v1.14.10` TO `v1.14.11`
## Classes and Interfaces Deprecations

View file

@ -34,6 +34,7 @@
</parameter>
<parameter key="sylius.form.type.checkout_complete.validation_groups" type="collection">
<parameter>sylius</parameter>
<parameter>sylius_checkout_complete</parameter>
</parameter>
</parameters>

View file

@ -87,5 +87,3 @@ sylius_shop_checkout_complete:
tokenValue: resource.tokenValue
form:
type: Sylius\Bundle\CoreBundle\Form\Type\Checkout\CompleteType
options:
validation_groups: 'sylius_checkout_complete'