-
Notifications
You must be signed in to change notification settings - Fork 18
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
Compare arrays recursively fix #234
Conversation
-Removed compare arrays recursively from WebApiAbstract and added it in a separate method
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.
@mslabko If we are using this code in one test only (even if it abstract). Why we need this code in framework? May be it's better to move it to class where it used?
|
||
/** | ||
* Class for comparing arrays recursively | ||
* TODO: This override can be removed once the same code is merged in magento core. |
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's not an override. It's just a new class. Could you please remove TODO string?
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.
By override I meant that its merged in magento core now. And when we have those changes we wont need it in catalog-storefront repo anymore. I changed the text in the todo to clarify this
@@ -8,12 +8,28 @@ | |||
namespace Magento\GraphQl\Bundle; | |||
|
|||
use Magento\TestFramework\TestCase\GraphQlAbstract; | |||
use Magento\TestFramework\Helper\Bootstrap; | |||
use \Magento\TestFramework\Helper\CompareArraysRecursively; |
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.
Remove first "" symbol in class path
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.
dome
private $compareArraysRecursively; | ||
|
||
/** | ||
* @inheritDoc |
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.
use @inheritdoc (without camel case) instead
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.
done
It was originally placed in GraphQlAbstract to compare deeply nested arrays. I wanted to use it outside GraphQl and it was useful for comparing two arrays where expected contains more keys/values than actual. In my case it was configurable product options. |
@magento run WebAPI Tests, Static Tests |
…ursively_fix # Conflicts: # dev/tests/api-functional/testsuite/Magento/GraphQl/Bundle/BundleProductMultipleOptionsTest.php
@magento run WebAPI Tests, Static Tests |
During sync with 24-develop, we make some mess and currently we have duplicates of compareArraysRecursively in 2.4-develop and broken functionality. Some findings:
Need to do:
Propose:
|
@magento run all tests |
Description (*)
This is a fix to our branch to match the changes in magento/magento2#29458
Original suggestion was to override WebApiAbstract.php , but a separate class for this functionality was suggested by core team. In order to avoid redundant code later, i added this pull request.
Once that pr is merged in core and then in catalog-storefront we can remove the override.
Related Pull Requests
magento/magento2#29733
https://github.com/magento/partners-magento2ee/pull/312
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)