magento / magento/magento2

[Issue] Typecast incrementId variables always to a string

Open
#39,458 4 comments 0 reactions 1 assignee View on GitHub

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

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.