-
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
FIX for apparently random API failures while using array types #16137
FIX for apparently random API failures while using array types #16137
Conversation
If the webapi Interface class was using CR+LF end-of-line, TypeProcessor class was not able to determine the class name when an array was used.
Hi @phoenix128. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @phoenix128
I was triggered by this notice, so I started digging somewhat, and found this PR: #12324 which completely removes those regexes. It seems this was only applied to the 2.2-develop branch and not to the 2.3-develop branch. Maybe it would be better if that PR is forward ported to 2.3? (I have no idea what all the code in these PR's is about, so if what I say makes no sense, then ignore me ;)) |
Hello @hostep , |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It fixes magento/inventory#1377
Hi @larsroettig, thank you for the review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phoenix128 please provide scenario for a supported operating system when this situation may happen. Note that absence of Windows line-endings is enforced by phpcs
.
Looks like affected developer forgot to configure git properly with core.autocrlf
= input
(see https://help.github.com/articles/dealing-with-line-endings/#global-settings-for-line-endings).
Hi @phoenix128. Thank you for your contribution. |
Description
Magento2 web-api is based on the Interface doctype, but if the developer is using CR+LF end-of-line, the
\Magento\Framework\Reflection\TypeProcessor
class is not able to determine the class name on array types.This was caused by a wrong regex non including
\r
in\Magento\Framework\Reflection\TypeProcessor::getParamType
.Additional note: Magento 2.2-develop seems to be not affected by this.
Contribution checklist