Skip to content
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

Improve Order get endpoints #16321

Merged
merged 6 commits into from
Jun 6, 2024

Conversation

TheMilek
Copy link
Member

Q A
Branch? 1.12
Bug fix? yes
New feature? no
BC breaks? no
License MIT

@TheMilek TheMilek added Shop ShopBundle related issues and PRs. API APIs related issues and PRs. labels May 29, 2024
@TheMilek TheMilek requested review from a team as code owners May 29, 2024 06:26
@TheMilek TheMilek changed the title Improve Order items get endpoints Improve Order get endpoints May 29, 2024
Copy link

github-actions bot commented May 29, 2024

Bunnyshell Preview Environment deleted

Available commands:

  • /bns:deploy to redeploy the environment

@TheMilek TheMilek force-pushed the SYL-3542-improve-order-get-endpoints branch from 801d39a to bb3cc9d Compare June 5, 2024 09:07
@TheMilek TheMilek force-pushed the SYL-3542-improve-order-get-endpoints branch 2 times, most recently from ca27091 to 3d42fd4 Compare June 5, 2024 11:23
tests/Api/Shop/OrdersTest.php Outdated Show resolved Hide resolved
tests/Api/Shop/OrdersTest.php Outdated Show resolved Hide resolved
tests/Api/Shop/OrdersTest.php Outdated Show resolved Hide resolved
tests/Api/Shop/OrdersTest.php Outdated Show resolved Hide resolved
}

/** @test */
public function it_gets_order_item_adjustments(): void
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we already have a split in the actions between the user/visitor, maybe we should also duplicate all the other tests in this file per case.

@TheMilek TheMilek force-pushed the SYL-3542-improve-order-get-endpoints branch from 3d42fd4 to fe653b7 Compare June 5, 2024 23:35
@TheMilek TheMilek force-pushed the SYL-3542-improve-order-get-endpoints branch from fe653b7 to 5bba8f0 Compare June 5, 2024 23:47
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<service id="sylius_api.security.voter.order" class="Sylius\Bundle\ApiBundle\Security\OrderAdjustmentsVoter">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<service id="sylius_api.security.voter.order" class="Sylius\Bundle\ApiBundle\Security\OrderAdjustmentsVoter">
<service id="sylius_api.security.voter.order_adjustments" class="Sylius\Bundle\ApiBundle\Security\OrderAdjustmentsVoter">

Comment on lines +51 to +53
if ($this->adjustmentOrderProvider->provide($subjectItem)) {
/** @var OrderInterface $order */
$order = $this->adjustmentOrderProvider->provide($subjectItem);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ($this->adjustmentOrderProvider->provide($subjectItem)) {
/** @var OrderInterface $order */
$order = $this->adjustmentOrderProvider->provide($subjectItem);
$order = $this->adjustmentOrderProvider->provide($subjectItem);
if ($order !== null) {

@GSadee GSadee merged commit d3aa277 into Sylius:1.12 Jun 6, 2024
27 checks passed
@GSadee
Copy link
Member

GSadee commented Jun 6, 2024

Thank you, Kamil! 🥇

@TheMilek TheMilek deleted the SYL-3542-improve-order-get-endpoints branch June 6, 2024 06:30
NoResponseMate added a commit that referenced this pull request Jun 7, 2024
…Sadee)

This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A
|-----------------|-----
| Branch?         | 1.13
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no<!-- don't forget to update the UPGRADE-*.md file -->
| Related tickets | after upmerge of #16321 
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.12 or 1.13 branches
 - Features and deprecations must be submitted against the 1.14 branch
 - Features, removing deprecations and BC breaks must be submitted against the 2.0 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
-------
  [API] Adjust adjustments contract tests after upmerge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API APIs related issues and PRs. Shop ShopBundle related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants