[Issue] Typecast incrementId variables always to a string
Open
Nobody has claimed this yet.
Area: Catalog
Component: Sales
Issue: Confirmed
Priority: P2
Progress: PR in progress
Reported on 2.4.x
Reproduced on 2.4.x
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#39452: Typecast incrementId variables always to a string
Description (*)
Ensure our calls to the sales_order table for the increment_id field are called with a string type and not an int type. When a module passed through an int variable, a full table scan occurs since the increment_id index can not be utilized.
Manual testing scenarios (*)
Create a small module and call the loadByIncrementId with an integer and see that this query is not hitting any index without this change.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.