Skip to content
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

Merged
merged 1 commit into from
Oct 12, 2017

Conversation

Zefiryn
Copy link
Contributor

@Zefiryn Zefiryn commented Sep 17, 2017

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)

  1. REST endpoint /V1/store/storeViews is missing is_active value in store data #10922: REST endpoint /V1/store/storeViews is missing is_active value in store data

Manual testing scenarios

  1. Perform a rest call to http://store.domain/rest/[store-view-code]/V1/store/storeViews

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)

* @param int $isActive
* @return $this
*/
public function setIsActive($isActive);
Copy link
Contributor

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.

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?

Copy link
Contributor

@ishakhsuvarov ishakhsuvarov left a 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

@vrann
Copy link
Contributor

vrann commented Oct 11, 2017

@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

@hatimeria-artur-jewula
Copy link
Contributor

OK, I will prepare update for tests as requested and add this to this PR.

@vrann
Copy link
Contributor

vrann commented Oct 12, 2017

@hatimeria-artur-jewula just updated api-functional test for this (were failing on or end), so it is good to go

@orlangur orlangur dismissed ishakhsuvarov’s stale review October 12, 2017 10:51

Minor breaking change approved by Anton.

@magento-team magento-team merged commit f164cbc into magento:develop Oct 12, 2017
magento-team pushed a commit that referenced this pull request Oct 12, 2017
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.

8 participants