Skip to content

More robust fix to https://github.com/magento-engcom/msi/issues/1524 #1545

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

Closed
wants to merge 2 commits into from

Conversation

phoenix128
Copy link
Contributor

This is a more robust fix for issue #1524 .
Also see: #1537 .

Description

Other than fixing #1524 and #1537 , this commit also provides a Magento2 support for non-FQN classes in interfaces.

Before this commit you were not able to import class names in interfaces used for web-API.

For example, the following interface was not working with the non-FQN name MyClass imported through the use alias definition.

namespace ...;

use My\Module\MyClass;

interface SomeInterface
{
...
/**
 * @param MyClass $param
 * ...
 */
 public function getMyMethod()
 ...
...
}

Fixed Issues (if relevant)

  1. Provide robust fix for nested object instantiation via Web API #1537: Provide robust fix for nested object instantiation via Web API
  2. POST V1/inventory/source-selection-algorithm-result throws exception #1524: POST V1/inventory/source-selection-algorithm-result throws exception

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 on Travis CI are green)

This commit also fixes another old Magento2 problem related to imported class names.
Before this commit was not possible to use a short and non-FQN in interfaces param doctypes. Now a resolver method was added providing this feature in a backward compatible way.
@phoenix128 phoenix128 closed this Aug 6, 2018
@phoenix128 phoenix128 deleted the msi-1524-dto-fix branch August 6, 2018 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant