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

Fix wrong calculation of available stock during completing a payment #16307

Conversation

GSadee
Copy link
Member

@GSadee GSadee commented May 24, 2024

Q A
Branch? 1.12
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets caused by #15280, fixes #16160, replaces #15688, closes #16258
License MIT

@GSadee GSadee added Admin AdminBundle related issues and PRs. API APIs related issues and PRs. Bug Confirmed bugs or bugfixes. labels May 24, 2024
@GSadee GSadee requested review from a team as code owners May 24, 2024 11:22
Copy link

github-actions bot commented May 24, 2024

Bunnyshell Preview Environment deleted

Available commands:

  • /bns:deploy to redeploy the environment

@GSadee GSadee force-pushed the SYL-3503-fix-wrong-calculation-of-available-stock branch from 3c5c15a to b584bc8 Compare May 24, 2024 11:43
mpysiak
mpysiak previously approved these changes May 27, 2024
@GSadee GSadee dismissed stale reviews from Wojdylak and mpysiak via 12455fd May 28, 2024 05:46
@NoResponseMate NoResponseMate merged commit 570a83f into Sylius:1.12 Jun 3, 2024
27 checks passed
@NoResponseMate
Copy link
Contributor

Thank you, @GSadee!

@GSadee GSadee deleted the SYL-3503-fix-wrong-calculation-of-available-stock branch June 3, 2024 07:52
NoResponseMate added a commit that referenced this pull request Jun 3, 2024
…tions changes (GSadee)

This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A
|-----------------|-----
| Branch?         | 1.12
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | after #16307
| 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
-------
  [Inventory] Adjust OrderInventoryOperator spec for exceptions changes
NoResponseMate added a commit that referenced this pull request Jun 3, 2024
…n by inventory exceptions (GSadee)

This PR was merged into the 1.14 branch.

Discussion
----------

| Q               | A
|-----------------|-----
| Branch?         | 1.14
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | yes
| Related tickets | after #16307
| 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
-------
  [Inventory] Deprecate extending \InvalidArgumentException by NotEnoughUnitsOnHandException and NotEnoughUnitsOnHoldException exceptions
NoResponseMate added a commit that referenced this pull request Jun 3, 2024
…ions (GSadee)

This PR was merged into the 2.0 branch.

Discussion
----------

| Q               | A
|-----------------|-----
| Branch?         | 2.0
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no<!-- don't forget to update the UPGRADE-*.md file -->
| Related tickets | after #16307, related to #16333
| 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
-------
  [Inventory] Extend \RuntimeException by NotEnoughUnitsOnHandException and NotEnoughUnitsOnHoldException exceptions
  [Inventory] Adjust OrderInventoryOperator spec for exceptions changes
Wojdylak added a commit that referenced this pull request Jun 5, 2024
… availability for given order item (GSadee)

This PR was merged into the 1.12 branch.

Discussion
----------

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

In order to make it easier to customise the logic for checking the available stock, I would like to extract it from the listener into a separate service.

<!--
 - 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
-------
  [Inventory] Extract service for checking reserved stock availability for given order item
  Add a note to UPGRADE file about changing PaymentPreCompleteListener's constructor
  [Inventory] Add a BC layer for refactored PaymentPreCompleteListener
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin AdminBundle related issues and PRs. API APIs related issues and PRs. Bug Confirmed bugs or bugfixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants