diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php
index f461b5251525..46080ab5c333 100644
--- a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php
+++ b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php
@@ -192,7 +192,14 @@ public function setCollection($collection)
$this->_collection->setPageSize($limit);
}
if ($this->getCurrentOrder()) {
- $this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
+ if (($this->getCurrentOrder()) == 'position') {
+ $this->_collection->addAttributeToSort(
+ $this->getCurrentOrder(),
+ $this->getCurrentDirection()
+ )->addAttributeToSort('entity_id', $this->getCurrentDirection());
+ } else {
+ $this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
+ }
}
return $this;
}
diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/UpdateHandler.php b/app/code/Magento/Catalog/Model/Product/Gallery/UpdateHandler.php
index d4f6bd2ca0d6..53083d7168b4 100644
--- a/app/code/Magento/Catalog/Model/Product/Gallery/UpdateHandler.php
+++ b/app/code/Magento/Catalog/Model/Product/Gallery/UpdateHandler.php
@@ -36,7 +36,7 @@ protected function processDeletedImages($product, array &$images)
$catalogPath = $this->mediaConfig->getBaseMediaPath();
$isFile = $this->mediaDirectory->isFile($catalogPath . $image['file']);
// only delete physical files if they are not used by any other products and if this file exist
- if (!($this->resourceModel->countImageUses($image['file']) > 1) && $isFile) {
+ if ($isFile && !($this->resourceModel->countImageUses($image['file']) > 1)) {
$filesToDelete[] = ltrim($image['file'], '/');
}
}
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/AddressSave.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/AddressSave.php
index a371d918ae02..dde2192c3b82 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order/AddressSave.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/AddressSave.php
@@ -14,7 +14,7 @@
use Magento\Sales\Api\OrderRepositoryInterface;
use Magento\Sales\Api\Data\OrderAddressInterface;
use Magento\Sales\Controller\Adminhtml\Order;
-use Magento\Sales\Model\Order\Address;
+use Magento\Sales\Model\Order\Address as AddressModel;
use Psr\Log\LoggerInterface;
use Magento\Framework\Registry;
use Magento\Framework\App\Response\Http\FileFactory;
@@ -97,7 +97,7 @@ public function __construct(
public function execute()
{
$addressId = $this->getRequest()->getParam('address_id');
- /** @var $address OrderAddressInterface|Address */
+ /** @var $address OrderAddressInterface|AddressModel */
$address = $this->_objectManager->create(
OrderAddressInterface::class
)->load($addressId);
diff --git a/app/code/Magento/Store/Api/Data/StoreInterface.php b/app/code/Magento/Store/Api/Data/StoreInterface.php
index 7d9070fdc496..0f724a23fc09 100644
--- a/app/code/Magento/Store/Api/Data/StoreInterface.php
+++ b/app/code/Magento/Store/Api/Data/StoreInterface.php
@@ -66,6 +66,17 @@ public function setWebsiteId($websiteId);
*/
public function getStoreGroupId();
+ /**
+ * @param int $isActive
+ * @return $this
+ */
+ public function setIsActive($isActive);
+
+ /**
+ * @return int
+ */
+ public function getIsActive();
+
/**
* @param int $storeGroupId
* @return $this
diff --git a/app/code/Magento/Store/Model/Store.php b/app/code/Magento/Store/Model/Store.php
index 06b04603d483..34d338b1b344 100644
--- a/app/code/Magento/Store/Model/Store.php
+++ b/app/code/Magento/Store/Model/Store.php
@@ -27,7 +27,6 @@
* @method int getSortOrder()
* @method int getStoreId()
* @method Store setSortOrder($value)
- * @method Store setIsActive($value)
*
* @SuppressWarnings(PHPMD.TooManyFields)
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
@@ -1088,6 +1087,22 @@ public function setStoreGroupId($storeGroupId)
return $this->setGroupId($storeGroupId);
}
+ /**
+ * @inheritdoc
+ */
+ public function getIsActive()
+ {
+ return $this->_getData('is_active');
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function setIsActive($isActive)
+ {
+ return $this->setData('is_active', $isActive);
+ }
+
/**
* Retrieve default group identifier
*
diff --git a/app/code/Magento/Store/etc/cache.xml b/app/code/Magento/Store/etc/cache.xml
index e01e1efe49a9..812547ea4191 100644
--- a/app/code/Magento/Store/etc/cache.xml
+++ b/app/code/Magento/Store/etc/cache.xml
@@ -30,4 +30,8 @@
Results of DDL queries, such as describing tables or indexes
+
+
+ Compliation configuration
+
diff --git a/app/code/Magento/Store/i18n/en_US.csv b/app/code/Magento/Store/i18n/en_US.csv
index 8eb1ea56dd67..bc7eb79da03f 100644
--- a/app/code/Magento/Store/i18n/en_US.csv
+++ b/app/code/Magento/Store/i18n/en_US.csv
@@ -41,3 +41,5 @@ Layouts,Layouts
"API interfaces reflection data","API interfaces reflection data"
"Database DDL operations","Database DDL operations"
"Results of DDL queries, such as describing tables or indexes","Results of DDL queries, such as describing tables or indexes"
+"Compiled Config","Compiled Config"
+"Compliation configuration","Compliation configuration"
diff --git a/app/code/Magento/Wishlist/Model/Config.php b/app/code/Magento/Wishlist/Model/Config.php
index 5dd7e0ef064f..1620c61d79da 100644
--- a/app/code/Magento/Wishlist/Model/Config.php
+++ b/app/code/Magento/Wishlist/Model/Config.php
@@ -22,19 +22,19 @@ class Config
/**
* @var \Magento\Catalog\Model\Config
*/
- private $_catalogConfig;
+ private $catalogConfig;
/**
* @var \Magento\Catalog\Model\Attribute\Config
*/
- private $_attributeConfig;
+ private $attributeConfig;
/**
* Number of emails allowed for sharing wishlist
*
* @var int
*/
- private $_sharingEmailLimit;
+ private $sharingEmailLimit;
/**
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
@@ -54,10 +54,10 @@ public function __construct(
self::XML_PATH_SHARING_TEXT_LIMIT,
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
);
- $this->_sharingEmailLimit = $emailLimitInConfig ?: self::SHARING_EMAIL_LIMIT;
+ $this->sharingEmailLimit = $emailLimitInConfig ?: self::SHARING_EMAIL_LIMIT;
$this->_sharignTextLimit = $textLimitInConfig ?: self::SHARING_TEXT_LIMIT;
- $this->_catalogConfig = $catalogConfig;
- $this->_attributeConfig = $attributeConfig;
+ $this->catalogConfig = $catalogConfig;
+ $this->attributeConfig = $attributeConfig;
}
/**
@@ -67,8 +67,8 @@ public function __construct(
*/
public function getProductAttributes()
{
- $catalogAttributes = $this->_catalogConfig->getProductAttributes();
- $wishlistAttributes = $this->_attributeConfig->getAttributeNames('wishlist_item');
+ $catalogAttributes = $this->catalogConfig->getProductAttributes();
+ $wishlistAttributes = $this->attributeConfig->getAttributeNames('wishlist_item');
return array_merge($catalogAttributes, $wishlistAttributes);
}
@@ -79,7 +79,7 @@ public function getProductAttributes()
*/
public function getSharingEmailLimit()
{
- return $this->_sharingEmailLimit;
+ return $this->sharingEmailLimit;
}
/**
diff --git a/dev/tests/api-functional/testsuite/Magento/Store/Api/StoreRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Store/Api/StoreRepositoryTest.php
index df1c53f0659d..7881c1660c5a 100644
--- a/dev/tests/api-functional/testsuite/Magento/Store/Api/StoreRepositoryTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Store/Api/StoreRepositoryTest.php
@@ -40,7 +40,7 @@ public function testGetList()
$storeViews = $this->_webApiCall($serviceInfo, $requestData);
$this->assertNotNull($storeViews);
$this->assertGreaterThan(1, count($storeViews));
- $keys = ['id', 'code', 'name', 'website_id', 'store_group_id'];
+ $keys = ['id', 'code', 'name', 'website_id', 'store_group_id', 'is_active'];
$this->assertEquals($keys, array_keys($storeViews[0]));
}
}
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerBackendEntity.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerBackendEntity.xml
index 5990157d6c5e..f0a0e092bbdc 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerBackendEntity.xml
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerBackendEntity.xml
@@ -9,6 +9,7 @@
default
+ MAGETWO-81744: [Jenkins] Random fail of Requisition List Test and CreateExistingCustomerBackendEntity
diff --git a/dev/tests/static/phpunit.xml.dist b/dev/tests/static/phpunit.xml.dist
index 45fe39211edb..0afaddb34cae 100644
--- a/dev/tests/static/phpunit.xml.dist
+++ b/dev/tests/static/phpunit.xml.dist
@@ -30,6 +30,7 @@
+
diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php
index f3dc7841d2df..5058ef402cbd 100644
--- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php
@@ -201,11 +201,14 @@ private function getFullWhitelist()
public function testCodeStyle()
{
+ $whiteList = defined('TESTCODESTYLE_IS_FULL_SCAN') && TESTCODESTYLE_IS_FULL_SCAN === '1'
+ ? $this->getFullWhitelist() : self::getWhitelist(['php', 'phtml']);
+
$reportFile = self::$reportDir . '/phpcs_report.txt';
$codeSniffer = new CodeSniffer('Magento', $reportFile, new Wrapper());
$this->assertEquals(
0,
- $result = $codeSniffer->run($this->getFullWhitelist()),
+ $result = $codeSniffer->run($whiteList),
"PHP Code Sniffer detected {$result} violation(s): " . PHP_EOL . file_get_contents($reportFile)
);
}