-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CategoryLinkReposity does not list all possible exceptions #20037
Comments
Hi @troendheim. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
where @troendheim do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @engcom-backlog-nazar. Thank you for working on this issue.
|
@engcom-backlog-nazar Thank you for verifying the issue. Based on the provided information internal tickets |
@troendheim instead of reporting in such cases it's better to propose a pull request ;) Thanks for collaboration! |
Hi @troendheim. Thank you for your report. The fix will be available with the upcoming 2.3.1 release. |
Summary (*)
The PHPDoc in https://github.com/magento/magento2/blob/2.3.0/app/code/Magento/Catalog/Api/CategoryLinkRepositoryInterface.php (
delete
anddeleteByIds
) 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
The text was updated successfully, but these errors were encountered: