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

Fix bool scope config and update throws and update use clases #18065

Merged

Conversation

hryvinskyi
Copy link
Member

Description

Fix bool scope config
Update throws
Update use class

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)

@magento-engcom-team
Copy link
Contributor

Hi @hryvinskyi. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me {$VERSION} instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@ihor-sviziev
Copy link
Contributor

Hi @hryvinskyi,
Please look at failed tests and adjust tests or your code.

@hryvinskyi
Copy link
Member Author

@magento-engcom-team give me test instance

@magento-engcom-team
Copy link
Contributor

Hi @hryvinskyi. Thank you for your request. I'm working on Magento instance for you

@magento-engcom-team
Copy link
Contributor

Hi @hryvinskyi, here is your new Magento instance.
Admin access: https://pr-18065.engcom.dev.magento.com/admin
Login: admin Password: 123123q

Copy link
Member

@slavvka slavvka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the comments and other similar places

self::CONFIG_RESULTS_COUNT_ENABLED,
ScopeInterface::SCOPE_STORE
);
}

/**
* {@inheritdoc}
* Get Items
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

@@ -149,7 +152,9 @@ public function __construct(
}

/**
* {@inheritdoc}
* Default Scope Id
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

@@ -90,11 +95,15 @@ public function __construct(
}

/**
* {@inheritdoc}
* Get Items
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

@@ -118,19 +127,25 @@ public function getItems(QueryInterface $query, $limit = null, $additionalFilter
}

/**
* {@inheritdoc}
* Is Results Count Enabled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably missed that

@@ -87,28 +95,31 @@ public function __construct(
}

/**
* {@inheritdoc}
* Get Config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

@@ -41,11 +43,13 @@ public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $
}

/**
* {@inheritdoc}
* Whether the header should be attached to the response
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

@@ -114,23 +117,29 @@ public function __construct(
}

/**
* {@inheritdoc}
* Set current default store
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

*/
public function setCurrentStore($store)
{
$this->currentStoreId = $store;
}

/**
* {@inheritdoc}
* Allow or disallow single store mode
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same

@@ -272,7 +283,9 @@ public function getFeeds()
}

/**
* {@inheritdoc}
* Is Auth Required
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

@@ -169,7 +176,7 @@ public function getUseSessionInUrl()
if ($this->_useSessionInUrl === null) {
//Using config value by default, can be overridden by using the
//setter.
$this->_useSessionInUrl = (bool)$this->scopeConfig->getValue(
$this->_useSessionInUrl = $this->scopeConfig->getValue(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same. You removed type casting and left the method intact

@hryvinskyi
Copy link
Member Author

@slavvka done

Copy link
Member

@slavvka slavvka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably missed some of my comments. Also there are the same changes that should be fixed. Please look through all your changes thoroughly and fix all them. Thank you!

@@ -93,7 +94,12 @@ public function __construct(
}

/**
* @inheritdoc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

@@ -93,7 +94,12 @@ public function __construct(
}

/**
* @inheritdoc
* Get Custom Attribute
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably missed that

@@ -118,19 +127,25 @@ public function getItems(QueryInterface $query, $limit = null, $additionalFilter
}

/**
* {@inheritdoc}
* Is Results Count Enabled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably missed that

*/
public function setIsSingleStoreModeAllowed($value)
{
$this->isSingleStoreAllowed = $value;
}

/**
* {@inheritdoc}
* Check if store has only one store view
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

@@ -139,15 +144,21 @@ public function hasSingleStore()
}

/**
* {@inheritdoc}
* Check if system is run in the single store mode
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

@@ -229,7 +252,9 @@ public function getWebsites($withDefault = false, $codeKey = false)
}

/**
* {@inheritdoc}
* Reinitialize store list
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

@@ -242,7 +267,10 @@ public function reinitStores()
}

/**
* {@inheritdoc}
* Retrieve default store for default group and website
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

@@ -252,7 +280,12 @@ public function getDefaultStoreView()
}

/**
* {@inheritdoc}
* Retrieve application store group object
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

@@ -267,7 +300,10 @@ public function getGroup($groupId = null)
}

/**
* {@inheritdoc}
* Prepare array of store groups
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

@@ -307,7 +345,11 @@ private function getStoreWebsiteRelation()
}

/**
* @inheritdoc
* Get assigned to website store
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the comment and just remove curly braces {}. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc

@hryvinskyi
Copy link
Member Author

@slavvka done

@slavvka
Copy link
Member

slavvka commented Oct 3, 2018

@hryvinskyi Thank you! Let's wait for the tests

@slavvka
Copy link
Member

slavvka commented Oct 9, 2018

hey @hryvinskyi you still have failing tests. Also please merge the latest mainline code and resolve the conflict.

@magento-engcom-team
Copy link
Contributor

Hi @slavvka, thank you for the review.
ENGCOM-3164 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

Hi @hryvinskyi. Thank you for your contribution.
We will aim to release these changes as part of 2.3.1.
Please check the release notes for final confirmation.

@slavvka
Copy link
Member

slavvka commented Oct 16, 2018

@hryvinskyi thank you. Could you please consider porting this PR to 2.2? Yuo can use the automatic tool https://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#porting-tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants