Skip to content

Magento\SalesGraphQl\Model\OrderItem\DataProvider uses non-contract methods on OrderItemInterface #35612

Open
@j0um

Description

@j0um

Preconditions and environment

  • Magento version : 2.4.3-p1
  • Open vendor/magento/module-sales-graph-ql/Model/OrderItem/DataProvider.php and goto line 150. Here a implementation specific method (getStatus) is called on an interface. This method does not exists in the interface.

Steps to reproduce

  • Open vendor/magento/module-sales-graph-ql/Model/OrderItem/DataProvider.php
  • Go to function fetch()::112
  • At line 126 $orderItem represents an OrderItemInterface
  • At line 150 $orderItem->getStatus() is called but this method doesn't exists in the service contract. It is a method specific to Magento\Sales\Model\Order\Item which implements the service contract.

Expected result

If a status should be provided, it should either be done using extension attributes or a resolver class.

Actual result

Function fetch()::112 will use an implementation specific method at line 140 : $orderItem->getStatus() when this method does not exists in the service contract.

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: FrameworkIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Progress: PR in progressReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions