Skip to content

[Issue] Make method signature consistent with interface #38501

Open
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #31955: Make method signature consistent with interface


Description

The interface uses $entityTypeCode. This makes psalm fail without a solution if you are overwriting the method:

With $entityType:

ERROR: ParamNameMismatch - app/code/My/Module/Model/EavAttributeManagement.php:39:35 - Argument 1 of Yubico\Catalog\Model\EavAttributeManagement::getAttributes has wrong name $entityType, expecting $entityTypeCode as defined by Magento\Eav\Api\AttributeManagementInterface::getAttributes (see https://psalm.dev/230)
    public function getAttributes($entityType, $attributeSetId)

With $entityTypeCode:

ERROR: ParamNameMismatch - app/code/My/Module/Model/EavAttributeManagement.php:39:35 - Argument 1 of Yubico\Catalog\Model\EavAttributeManagement::getAttributes has wrong name $entityTypeCode, expecting $entityType as defined by Magento\Eav\Model\AttributeManagement::getAttributes (see https://psalm.dev/230)
    public function getAttributes($entityTypeCode, $attributeSetId)

Manual testing scenarios

  1. Create a class that overwrites \Magento\Eav\Model\AttributeManagement::getAttributes();
  2. Run psalm on your file;

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • 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)

Metadata

Metadata

Assignees

Labels

Area: FrameworkComponent: EavIssue: 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 progressReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S4Affects aesthetics, professional look and feel, “quality” or “usability”.Triage: 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