Skip to content

Commit cb93fe5

Browse files
author
Oleksii Korshenko
authored
Merge pull request #1586 from magento-engcom/develop-prs
Public Pull Requests: #11362 #11296 #11234 #11206 #11153 #10923
2 parents 45d1d93 + f21a58e commit cb93fe5

File tree

12 files changed

+60
-16
lines changed

12 files changed

+60
-16
lines changed

app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,14 @@ public function setCollection($collection)
192192
$this->_collection->setPageSize($limit);
193193
}
194194
if ($this->getCurrentOrder()) {
195-
$this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
195+
if (($this->getCurrentOrder()) == 'position') {
196+
$this->_collection->addAttributeToSort(
197+
$this->getCurrentOrder(),
198+
$this->getCurrentDirection()
199+
)->addAttributeToSort('entity_id', $this->getCurrentDirection());
200+
} else {
201+
$this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
202+
}
196203
}
197204
return $this;
198205
}

app/code/Magento/Catalog/Model/Product/Gallery/UpdateHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected function processDeletedImages($product, array &$images)
3636
$catalogPath = $this->mediaConfig->getBaseMediaPath();
3737
$isFile = $this->mediaDirectory->isFile($catalogPath . $image['file']);
3838
// only delete physical files if they are not used by any other products and if this file exist
39-
if (!($this->resourceModel->countImageUses($image['file']) > 1) && $isFile) {
39+
if ($isFile && !($this->resourceModel->countImageUses($image['file']) > 1)) {
4040
$filesToDelete[] = ltrim($image['file'], '/');
4141
}
4242
}

app/code/Magento/Sales/Controller/Adminhtml/Order/AddressSave.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Magento\Sales\Api\OrderRepositoryInterface;
1515
use Magento\Sales\Api\Data\OrderAddressInterface;
1616
use Magento\Sales\Controller\Adminhtml\Order;
17-
use Magento\Sales\Model\Order\Address;
17+
use Magento\Sales\Model\Order\Address as AddressModel;
1818
use Psr\Log\LoggerInterface;
1919
use Magento\Framework\Registry;
2020
use Magento\Framework\App\Response\Http\FileFactory;
@@ -97,7 +97,7 @@ public function __construct(
9797
public function execute()
9898
{
9999
$addressId = $this->getRequest()->getParam('address_id');
100-
/** @var $address OrderAddressInterface|Address */
100+
/** @var $address OrderAddressInterface|AddressModel */
101101
$address = $this->_objectManager->create(
102102
OrderAddressInterface::class
103103
)->load($addressId);

app/code/Magento/Store/Api/Data/StoreInterface.php

+11
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,17 @@ public function setWebsiteId($websiteId);
6666
*/
6767
public function getStoreGroupId();
6868

69+
/**
70+
* @param int $isActive
71+
* @return $this
72+
*/
73+
public function setIsActive($isActive);
74+
75+
/**
76+
* @return int
77+
*/
78+
public function getIsActive();
79+
6980
/**
7081
* @param int $storeGroupId
7182
* @return $this

app/code/Magento/Store/Model/Store.php

+16-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
* @method int getSortOrder()
2828
* @method int getStoreId()
2929
* @method Store setSortOrder($value)
30-
* @method Store setIsActive($value)
3130
*
3231
* @SuppressWarnings(PHPMD.TooManyFields)
3332
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
@@ -1088,6 +1087,22 @@ public function setStoreGroupId($storeGroupId)
10881087
return $this->setGroupId($storeGroupId);
10891088
}
10901089

1090+
/**
1091+
* @inheritdoc
1092+
*/
1093+
public function getIsActive()
1094+
{
1095+
return $this->_getData('is_active');
1096+
}
1097+
1098+
/**
1099+
* @inheritdoc
1100+
*/
1101+
public function setIsActive($isActive)
1102+
{
1103+
return $this->setData('is_active', $isActive);
1104+
}
1105+
10911106
/**
10921107
* Retrieve default group identifier
10931108
*

app/code/Magento/Store/etc/cache.xml

+4
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,8 @@
3030
<label>Database DDL operations</label>
3131
<description>Results of DDL queries, such as describing tables or indexes</description>
3232
</type>
33+
<type name="compiled_config" translate="label,description" instance="Magento\Framework\App\Interception\Cache\CompiledConfig">
34+
<label>Compiled Config</label>
35+
<description>Compliation configuration</description>
36+
</type>
3337
</config>

app/code/Magento/Store/i18n/en_US.csv

+2
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ Layouts,Layouts
4141
"API interfaces reflection data","API interfaces reflection data"
4242
"Database DDL operations","Database DDL operations"
4343
"Results of DDL queries, such as describing tables or indexes","Results of DDL queries, such as describing tables or indexes"
44+
"Compiled Config","Compiled Config"
45+
"Compliation configuration","Compliation configuration"

app/code/Magento/Wishlist/Model/Config.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ class Config
2222
/**
2323
* @var \Magento\Catalog\Model\Config
2424
*/
25-
private $_catalogConfig;
25+
private $catalogConfig;
2626

2727
/**
2828
* @var \Magento\Catalog\Model\Attribute\Config
2929
*/
30-
private $_attributeConfig;
30+
private $attributeConfig;
3131

3232
/**
3333
* Number of emails allowed for sharing wishlist
3434
*
3535
* @var int
3636
*/
37-
private $_sharingEmailLimit;
37+
private $sharingEmailLimit;
3838

3939
/**
4040
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
@@ -54,10 +54,10 @@ public function __construct(
5454
self::XML_PATH_SHARING_TEXT_LIMIT,
5555
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
5656
);
57-
$this->_sharingEmailLimit = $emailLimitInConfig ?: self::SHARING_EMAIL_LIMIT;
57+
$this->sharingEmailLimit = $emailLimitInConfig ?: self::SHARING_EMAIL_LIMIT;
5858
$this->_sharignTextLimit = $textLimitInConfig ?: self::SHARING_TEXT_LIMIT;
59-
$this->_catalogConfig = $catalogConfig;
60-
$this->_attributeConfig = $attributeConfig;
59+
$this->catalogConfig = $catalogConfig;
60+
$this->attributeConfig = $attributeConfig;
6161
}
6262

6363
/**
@@ -67,8 +67,8 @@ public function __construct(
6767
*/
6868
public function getProductAttributes()
6969
{
70-
$catalogAttributes = $this->_catalogConfig->getProductAttributes();
71-
$wishlistAttributes = $this->_attributeConfig->getAttributeNames('wishlist_item');
70+
$catalogAttributes = $this->catalogConfig->getProductAttributes();
71+
$wishlistAttributes = $this->attributeConfig->getAttributeNames('wishlist_item');
7272
return array_merge($catalogAttributes, $wishlistAttributes);
7373
}
7474

@@ -79,7 +79,7 @@ public function getProductAttributes()
7979
*/
8080
public function getSharingEmailLimit()
8181
{
82-
return $this->_sharingEmailLimit;
82+
return $this->sharingEmailLimit;
8383
}
8484

8585
/**

dev/tests/api-functional/testsuite/Magento/Store/Api/StoreRepositoryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testGetList()
4040
$storeViews = $this->_webApiCall($serviceInfo, $requestData);
4141
$this->assertNotNull($storeViews);
4242
$this->assertGreaterThan(1, count($storeViews));
43-
$keys = ['id', 'code', 'name', 'website_id', 'store_group_id'];
43+
$keys = ['id', 'code', 'name', 'website_id', 'store_group_id', 'is_active'];
4444
$this->assertEquals($keys, array_keys($storeViews[0]));
4545
}
4646
}

dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerBackendEntity.xml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<testCase name="Magento\Customer\Test\TestCase\CreateExistingCustomerBackendEntity" summary="Create Existing Customer from Backend" ticketId="MAGETWO-43685">
1010
<variation name="CreateExistingCustomerBackendEntity1" summary="Create existing customer on Backend.">
1111
<data name="customer/dataset" xsi:type="string">default</data>
12+
<data name="issue" xsi:type="string">MAGETWO-81744: [Jenkins] Random fail of Requisition List Test and CreateExistingCustomerBackendEntity</data>
1213
<constraint name="Magento\Customer\Test\Constraint\AssertCustomerBackendDuplicateErrorMessage" />
1314
</variation>
1415
</testCase>

dev/tests/static/phpunit.xml.dist

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
</testsuites>
3131
<php>
3232
<ini name="date.timezone" value="America/Los_Angeles"/>
33+
<const name="TESTCODESTYLE_IS_FULL_SCAN" value="1"/>
3334
<!-- TESTS_COMPOSER_PATH - specify the path to composer binary, if a relative reference cannot be resolved -->
3435
<!--<const name="TESTS_COMPOSER_PATH" value="/usr/local/bin/composer"/>-->
3536
</php>

dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,14 @@ private function getFullWhitelist()
201201

202202
public function testCodeStyle()
203203
{
204+
$whiteList = defined('TESTCODESTYLE_IS_FULL_SCAN') && TESTCODESTYLE_IS_FULL_SCAN === '1'
205+
? $this->getFullWhitelist() : self::getWhitelist(['php', 'phtml']);
206+
204207
$reportFile = self::$reportDir . '/phpcs_report.txt';
205208
$codeSniffer = new CodeSniffer('Magento', $reportFile, new Wrapper());
206209
$this->assertEquals(
207210
0,
208-
$result = $codeSniffer->run($this->getFullWhitelist()),
211+
$result = $codeSniffer->run($whiteList),
209212
"PHP Code Sniffer detected {$result} violation(s): " . PHP_EOL . file_get_contents($reportFile)
210213
);
211214
}

0 commit comments

Comments
 (0)