New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Orders][API] Validate endpoints #15064
[Orders][API] Validate endpoints #15064
Conversation
src/Sylius/Bundle/ApiBundle/Validator/Constraints/OrderStateValidator.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/spec/Validator/CheckoutCompletion/CartStateValidatorSpec.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/spec/Validator/CheckoutCompletion/CartStateValidatorSpec.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/spec/Validator/CheckoutCompletion/CartStateValidatorSpec.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/spec/Validator/CheckoutCompletion/CartStateValidatorSpec.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Validator/CheckoutCompletion/AddressedStateValidator.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Validator/CheckoutCompletion/AddressedStateValidator.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Controller/DeleteOrderItemAction.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Controller/DeleteOrderItemAction.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Controller/Payment/GetPaymentConfiguration.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Resources/translations/validators.en.yaml
Outdated
Show resolved
Hide resolved
@@ -68,6 +68,7 @@ sylius: | |||
order: | |||
currency_code: | |||
not_valid: The currency code you entered is invalid. | |||
invalid_state_transition: 'Cannot complete as order is in a wrong state. Current: %currentState%. Possible transitions: %possibleTransitions%.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is shown to the customer, then it needs some rewording to make it less technical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is intended for developers, the question is whether I should put it in ApiBundle, since this message is API-oriented
…gn shipping method
{ | ||
Assert::isInstanceOf($value, OrderTokenValueAwareInterface::class); | ||
|
||
/** @var CheckoutCompletion $constraint */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be needed as there is an assertion below
/** @var CheckoutCompletion $constraint */ |
Thank you, Rafał! 🥇 |
This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 <!-- see the comment below --> | | Bug fix? | no | | New feature? | no | | BC breaks? | no | | Deprecations? | no <!-- don't forget to update the UPGRADE-*.md file --> | | Related tickets | #15064 | License | MIT | <!-- - Bug fixes must be submitted against the 1.12 branch - Features and deprecations must be submitted against the 1.13 branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Commits ------- [PHPStan] Add missing @param annotations [ECS] Apply ecs fixes [Units] Adjust checkout completion responses
We are missing validation of the order checkout process and some URI parameters across order endpoints