Skip to content

[5.x] Error when marking inventory transfer as pending#4272

Open
nfourtythree wants to merge 4 commits into5.xfrom
nathaniel/com-548-5x-error-thrown-when-marking-inventory-transfer-as-pending
Open

[5.x] Error when marking inventory transfer as pending#4272
nfourtythree wants to merge 4 commits into5.xfrom
nathaniel/com-548-5x-error-thrown-when-marking-inventory-transfer-as-pending

Conversation

@nfourtythree
Copy link
Copy Markdown
Contributor

Related issues

#4267

@nfourtythree nfourtythree requested a review from Copilot April 7, 2026 12:59
@nfourtythree nfourtythree self-assigned this Apr 7, 2026
@nfourtythree nfourtythree requested a review from a team as a code owner April 7, 2026 12:59
@linear
Copy link
Copy Markdown

linear bot commented Apr 7, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a type mismatch that triggers a PHP TypeError when an Inventory Transfer is moved from Draft → Pending by ensuring the inventory update model used during transfers is compatible with the UpdateInventoryLevelEvent payload type.

Changes:

  • Updated UpdateInventoryLevelInTransfer to inherit from UpdateInventoryLevel (so it can be assigned to UpdateInventoryLevelEvent::$updateInventoryLevel).
  • Attempted to narrow UpdateInventoryLevelInTransfer validation rules to only allow incoming/onHand transaction types.
  • Added an Unreleased changelog entry referencing the fix and issue.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/models/inventory/UpdateInventoryLevelInTransfer.php Makes transfer inventory updates extend the base update model and customizes validation rules.
CHANGELOG.md Documents the fix in the Unreleased section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

nfourtythree and others added 3 commits April 7, 2026 14:02
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants