-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
#10922 add is_active to Magento\Store\Api\Data\StoreInterface #10923
Conversation
…to show the flag in the rest endpoint
* @param int $isActive | ||
* @return $this | ||
*/ | ||
public function setIsActive($isActive); |
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.
Unfortunately, introduction of any new methods to the @api
interfaces is not possible due to backwards compatibility policy. This change can potentially break any third-party customization which used this class as SPI (providing their own implementation for existing interface).
Possible workaround would be implementing an extension attribute for this class which would contain the required field. This would not break any existing customization but as a tradeoff would look not as good.
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.
this change was accepted by Anton even though it gave backward compliance issue. I am happy to give a go with the extension attribute but I'd say any developer would see this change as more beneficial as it is now.
--> what I mean is Magento 2 is complex enough to avoid making minor issue to become a big problem?
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.
Please consider updating integration or api-functional for this fix
@Zefiryn now this change can be accepted because it is to the develop branch which will be released as 2.3. This is a MINOR change in API |
OK, I will prepare update for tests as requested and add this to this PR. |
@hatimeria-artur-jewula just updated api-functional test for this (were failing on or end), so it is good to go |
Minor breaking change approved by Anton.
…terface #10923 - fix WebAPI test
add is_active to Magento\Store\Api\Data\StoreInterface to show it in the rest endpoint
Description
Magento\Store\Api\Data\StoreInterface had no get and set method defined for is_active flag and thus the value did not appear in the V1/store/storeViews endpoint with the store view data
Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist