Skip to content

CategoryLinkReposity does not list all possible exceptions #20037

Closed
@troendheim

Description

@troendheim

Summary (*)

The PHPDoc in https://github.com/magento/magento2/blob/2.3.0/app/code/Magento/Catalog/Api/CategoryLinkRepositoryInterface.php (delete and deleteByIds) does show the full list of exceptions that could be thrown.

I have checked and the issue exists in v2.2.7 and v2.3.0.

Examples (*)

https://github.com/magento/magento2/blob/2.3.0/app/code/Magento/Catalog/Model/CategoryLinkRepository.php#L81 throws InputException. Neither the method or the interface declares this through PHPDoc which can lead to surprises when using the repository.

Proposed solution

Add Magento\Framework\Exception to "throws" for the two methods

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CatalogFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions