magento / magento/magento2

[Issue] update return value for suggest qty as per stockstateprovider

Open
#30,786 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Framework Component: CatalogInventory Issue: Confirmed Priority: P4 Progress: PR in progress Reported on 2.4.x Reproduced on 2.4.x Severity: S4 Triage: Dev.Experience
Dominant language
PHP
Stars
12.2k
Forks
9.4k
PR merge metrics
No merged PRs in 30d

Description

This issue is automatically created based on existing pull request: magento/magento2#30737: update return value for suggest qty as per stockstateprovider

---------

Its update returns suggested qty that satisfies qty increments/minQty/maxQty/minSaleQty/maxSaleQty else returns original qty that should be either int or float value as per stockstateprovider interface.

### Description (*)

There's return value should be either int or float. stock state provider returns the value as int | float. so we have to change the return parameter to int | float.

### Related Pull Requests

### Fixed Issues (if relevant)

### Manual testing scenarios (*)

1. ...
2. ...

### Questions or comments

### Contribution checklist (*)
- [x] Pull request has a meaningful description of its purpose
- [x] All commits are accompanied by meaningful commit messages
- [ ] All new or changed code is covered with unit/integration tests (if applicable)
- [ ] All automated tests passed successfully (all builds are green)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the existing pull request magento/magento2#30737 and trace the stock state provider path that returns the suggested quantity. Confirm the return value accepts int or float and identify the relevant test coverage; done means the return behavior matches the stock state provider interface and tests cover it.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.