Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit 302a1c9

Browse files
Merge branch '2.3-qwerty' into MC-13741
2 parents 475adc0 + cc4fb4c commit 302a1c9

File tree

235 files changed

+4577
-2929
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

235 files changed

+4577
-2929
lines changed

.htaccess

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
############################################
3131
## default index file
32+
## Specifies option, to use methods arguments in backtrace or not
33+
SetEnv MAGE_DEBUG_SHOW_ARGS 1
3234

3335
DirectoryIndex index.php
3436

.htaccess.sample

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
############################################
3131
## default index file
32+
## Specifies option, to use methods arguments in backtrace or not
33+
SetEnv MAGE_DEBUG_SHOW_ARGS 1
3234

3335
DirectoryIndex index.php
3436

app/bootstrap.php

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* Environment initialization
99
*/
1010
error_reporting(E_ALL);
11+
stream_wrapper_unregister('phar');
1112
#ini_set('display_errors', 1);
1213

1314
/* PHP version validation */

app/code/Magento/AdminNotification/view/adminhtml/layout/default.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
99
<body>
1010
<referenceContainer name="notifications">
11-
<uiComponent name="notification_area"/>
11+
<uiComponent name="notification_area" aclResource="Magento_AdminNotification::show_list"/>
1212
<block class="Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup"
1313
name="unread_system_messages"
1414
as="unread_system_messages"

app/code/Magento/Backend/Controller/Adminhtml/Dashboard/RefreshStatistics.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66

77
namespace Magento\Backend\Controller\Adminhtml\Dashboard;
88

9-
class RefreshStatistics extends \Magento\Reports\Controller\Adminhtml\Report\Statistics
9+
use Magento\Framework\App\Action\HttpPostActionInterface;
10+
use Magento\Reports\Controller\Adminhtml\Report\Statistics;
11+
12+
/**
13+
* Refresh Dashboard statistics action.
14+
*/
15+
class RefreshStatistics extends Statistics implements HttpPostActionInterface
1016
{
1117
/**
1218
* @param \Magento\Backend\App\Action\Context $context
@@ -25,6 +31,8 @@ public function __construct(
2531
}
2632

2733
/**
34+
* Refresh statistics.
35+
*
2836
* @return \Magento\Backend\Model\View\Result\Redirect
2937
*/
3038
public function execute()

app/code/Magento/Braintree/Test/Mftf/ActionGroup/AdminOrderBraintreeFillActionGroup.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,24 @@
1919

2020
<!--Choose Master Card from drop-down list-->
2121
<switchToIFrame stepKey="switchToCardNumber" selector="{{NewOrderSection.cardFrame}}"/>
22+
<waitForElementVisible selector="{{NewOrderSection.creditCardNumber}}" stepKey="waitForFillCardNumber"/>
2223
<fillField stepKey="fillCardNumber" selector="{{NewOrderSection.creditCardNumber}}" userInput="{{PaymentAndShippingInfo.cardNumber}}"/>
23-
<waitForPageLoad stepKey="waitForFillCardNumber"/>
2424
<switchToIFrame stepKey="switchBackFromCard"/>
2525

2626
<!--Fill expire date-->
2727
<switchToIFrame stepKey="switchToExpirationMonth" selector="{{NewOrderSection.monthFrame}}"/>
28+
<waitForElementVisible selector="{{NewOrderSection.expirationMonth}}" stepKey="waitForFillMonth"/>
2829
<fillField stepKey="fillMonth" selector="{{NewOrderSection.expirationMonth}}" userInput="{{PaymentAndShippingInfo.month}}"/>
29-
<waitForPageLoad stepKey="waitForFillMonth"/>
3030
<switchToIFrame stepKey="switchBackFromMonth"/>
3131
<switchToIFrame stepKey="switchToExpirationYear" selector="{{NewOrderSection.yearFrame}}"/>
32+
<waitForElementVisible selector="{{NewOrderSection.expirationYear}}" stepKey="waitForFillYear"/>
3233
<fillField stepKey="fillYear" selector="{{NewOrderSection.expirationYear}}" userInput="{{PaymentAndShippingInfo.year}}"/>
33-
<waitForPageLoad stepKey="waitForFillYear"/>
3434
<switchToIFrame stepKey="switchBackFromYear"/>
3535

3636
<!--Fill CVW code-->
3737
<switchToIFrame stepKey="switchToCVV" selector="{{NewOrderSection.cvvFrame}}"/>
38+
<waitForElementVisible selector="{{NewOrderSection.cvv}}" stepKey="waitForFillCVV"/>
3839
<fillField stepKey="fillCVV" selector="{{NewOrderSection.cvv}}" userInput="{{PaymentAndShippingInfo.cvv}}"/>
39-
<wait stepKey="waitForFillCVV" time="1"/>
4040
<switchToIFrame stepKey="switchBackFromCVV"/>
4141
</actionGroup>
4242
</actionGroups>

app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest1.xml

+5-4
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-93677"/>
1919
<group value="braintree"/>
20-
<skip>
21-
<issueId value="MC-13779"/>
22-
</skip>
2320
</annotations>
2421

2522

@@ -63,21 +60,25 @@
6360
<argument name="customer" value="Simple_US_Customer"/>
6461
</actionGroup>
6562

63+
<!--Add Product to Order-->
6664
<actionGroup ref="addSimpleProductToOrder" stepKey="addProduct">
6765
<argument name="product" value="_defaultProduct"/>
6866
</actionGroup>
6967

68+
<!--Fill Order Customer Information-->
7069
<actionGroup ref="fillOrderCustomerInformation" stepKey="fillCustomerAddress">
7170
<argument name="customer" value="Simple_US_Customer"/>
7271
<argument name="address" value="US_Address_TX"/>
7372
</actionGroup>
7473

74+
<!--Select Shipping-->
7575
<actionGroup ref="orderSelectFlatRateShipping" stepKey="selectFlatRateShipping"/>
76-
7776
<waitForPageLoad stepKey="waitForShippingToFinish"/>
7877

78+
<!--Pay with Braintree -->
7979
<actionGroup ref="useBraintreeForMasterCard" stepKey="selectCardWithBraintree"/>
8080

81+
<!--Submit Order-->
8182
<click stepKey="submitOrder" selector="{{NewOrderSection.submitOrder}}"/>
8283
<waitForPageLoad stepKey="waitForSaveConfig"/>
8384
<waitForElementVisible selector="{{NewOrderSection.successMessage}}" stepKey="waitForSuccessMessage"/>

app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Fieldset/Element.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
namespace Magento\Catalog\Block\Adminhtml\Form\Renderer\Fieldset;
8+
79
/**
810
* Catalog fieldset element renderer
911
*
1012
* @author Magento Core Team <[email protected]>
1113
*/
12-
namespace Magento\Catalog\Block\Adminhtml\Form\Renderer\Fieldset;
13-
1414
class Element extends \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Element
1515
{
1616
/**
@@ -29,7 +29,7 @@ public function getDataObject()
2929
}
3030

3131
/**
32-
* Retireve associated with element attribute object
32+
* Retrieve associated with element attribute object
3333
*
3434
* @return \Magento\Catalog\Model\ResourceModel\Eav\Attribute
3535
*/

app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Inventory.php

+2-31
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*/
66
namespace Magento\Catalog\Block\Adminhtml\Product\Edit\Action\Attribute\Tab;
77

8-
use Magento\Customer\Api\Data\GroupInterface;
9-
108
/**
119
* Products mass update inventory tab
1210
*
@@ -31,29 +29,20 @@ class Inventory extends \Magento\Backend\Block\Widget implements \Magento\Backen
3129
*/
3230
protected $disabledFields = [];
3331

34-
/**
35-
* @var \Magento\Framework\Serialize\SerializerInterface
36-
*/
37-
private $serializer;
38-
3932
/**
4033
* @param \Magento\Backend\Block\Template\Context $context
4134
* @param \Magento\CatalogInventory\Model\Source\Backorders $backorders
4235
* @param \Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration
4336
* @param array $data
44-
* @param \Magento\Framework\Serialize\SerializerInterface|null $serializer
4537
*/
4638
public function __construct(
4739
\Magento\Backend\Block\Template\Context $context,
4840
\Magento\CatalogInventory\Model\Source\Backorders $backorders,
4941
\Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration,
50-
array $data = [],
51-
\Magento\Framework\Serialize\SerializerInterface $serializer = null
42+
array $data = []
5243
) {
5344
$this->_backorders = $backorders;
5445
$this->stockConfiguration = $stockConfiguration;
55-
$this->serializer = $serializer ?? \Magento\Framework\App\ObjectManager::getInstance()
56-
->get(\Magento\Framework\Serialize\SerializerInterface::class);
5746
parent::__construct($context, $data);
5847
}
5948

@@ -85,9 +74,7 @@ public function getFieldSuffix()
8574
*/
8675
public function getStoreId()
8776
{
88-
$storeId = (int)$this->getRequest()->getParam('store');
89-
90-
return $storeId;
77+
return (int)$this->getRequest()->getParam('store');
9178
}
9279

9380
/**
@@ -101,22 +88,6 @@ public function getDefaultConfigValue($field)
10188
return $this->stockConfiguration->getDefaultConfigValue($field);
10289
}
10390

104-
/**
105-
* Returns min_sale_qty configuration for the ALL Customer Group
106-
*
107-
* @return float
108-
*/
109-
public function getDefaultMinSaleQty()
110-
{
111-
$default = $this->stockConfiguration->getDefaultConfigValue('min_sale_qty');
112-
if (!is_numeric($default)) {
113-
$default = $this->serializer->unserialize($default);
114-
$default = $default[GroupInterface::CUST_GROUP_ALL] ?? 1;
115-
}
116-
117-
return (float) $default;
118-
}
119-
12091
/**
12192
* Tab settings
12293
*

app/code/Magento/Catalog/Model/Category.php

+20-12
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements
7272

7373
const CACHE_TAG = 'cat_c';
7474

75-
/**
76-
* Category Store Id
77-
*/
78-
const STORE_ID = 'store_id';
79-
8075
/**#@-*/
8176
protected $_eventPrefix = 'catalog_category';
8277

@@ -573,8 +568,8 @@ public function getStoreIds()
573568
*/
574569
public function getStoreId()
575570
{
576-
if ($this->hasData(self::STORE_ID)) {
577-
return (int)$this->_getData(self::STORE_ID);
571+
if ($this->hasData('store_id')) {
572+
return (int)$this->_getData('store_id');
578573
}
579574
return (int)$this->_storeManager->getStore()->getId();
580575
}
@@ -590,7 +585,7 @@ public function setStoreId($storeId)
590585
if (!is_numeric($storeId)) {
591586
$storeId = $this->_storeManager->getStore($storeId)->getId();
592587
}
593-
$this->setData(self::STORE_ID, $storeId);
588+
$this->setData('store_id', $storeId);
594589
$this->getResource()->setStoreId($storeId);
595590
return $this;
596591
}
@@ -1124,10 +1119,15 @@ public function reindex()
11241119
}
11251120
}
11261121
$productIndexer = $this->indexerRegistry->get(Indexer\Category\Product::INDEXER_ID);
1127-
if (!$productIndexer->isScheduled()
1128-
&& (!empty($this->getAffectedProductIds()) || $this->dataHasChangedFor('is_anchor'))
1129-
) {
1130-
$productIndexer->reindexList($this->getPathIds());
1122+
1123+
if (!empty($this->getAffectedProductIds())
1124+
|| $this->dataHasChangedFor('is_anchor')
1125+
|| $this->dataHasChangedFor('is_active')) {
1126+
if (!$productIndexer->isScheduled()) {
1127+
$productIndexer->reindexList($this->getPathIds());
1128+
} else {
1129+
$productIndexer->invalidate();
1130+
}
11311131
}
11321132
}
11331133

@@ -1152,9 +1152,17 @@ public function getIdentities()
11521152
$identities = [
11531153
self::CACHE_TAG . '_' . $this->getId(),
11541154
];
1155+
11551156
if ($this->hasDataChanges()) {
11561157
$identities[] = Product::CACHE_PRODUCT_CATEGORY_TAG . '_' . $this->getId();
11571158
}
1159+
1160+
if ($this->dataHasChangedFor('is_anchor') || $this->dataHasChangedFor('is_active')) {
1161+
foreach ($this->getPathIds() as $id) {
1162+
$identities[] = Product::CACHE_PRODUCT_CATEGORY_TAG . '_' . $id;
1163+
}
1164+
}
1165+
11581166
if (!$this->getId() || $this->isDeleted() || $this->dataHasChangedFor(self::KEY_INCLUDE_IN_MENU)) {
11591167
$identities[] = self::CACHE_TAG;
11601168
$identities[] = Product::CACHE_PRODUCT_CATEGORY_TAG . '_' . $this->getId();

app/code/Magento/Catalog/Model/ImageExtractor.php

+7
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class ImageExtractor implements TypeDataExtractorInterface
2020
* @param \DOMElement $mediaNode
2121
* @param string $mediaParentTag
2222
* @return array
23+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
2324
*/
2425
public function process(\DOMElement $mediaNode, $mediaParentTag)
2526
{
@@ -40,6 +41,12 @@ public function process(\DOMElement $mediaNode, $mediaParentTag)
4041
$nodeValue = $this->processImageBackground($attribute->nodeValue);
4142
} elseif ($attributeTagName === 'width' || $attributeTagName === 'height') {
4243
$nodeValue = (int) $attribute->nodeValue;
44+
} elseif ($attributeTagName === 'constrain'
45+
|| $attributeTagName === 'aspect_ratio'
46+
|| $attributeTagName === 'frame'
47+
|| $attributeTagName === 'transparency'
48+
) {
49+
$nodeValue = in_array($attribute->nodeValue, [true, 1, 'true', '1'], true) ?? false;
4350
} else {
4451
$nodeValue = $attribute->nodeValue;
4552
}

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

-5
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements
7171
*/
7272
const STORE_ID = 'store_id';
7373

74-
/**
75-
* Product Url path.
76-
*/
77-
const URL_PATH = 'url_path';
78-
7974
/**
8075
* @var string
8176
*/

app/code/Magento/Catalog/Model/Product/Copier.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function copy(Product $product)
8383
? $matches[1] . '-' . ($matches[2] + 1)
8484
: $urlKey . '-1';
8585
$duplicate->setUrlKey($urlKey);
86-
$duplicate->setData(Product::URL_PATH, null);
86+
$duplicate->setData('url_path', null);
8787
try {
8888
$duplicate->save();
8989
$isDuplicateSaved = true;

app/code/Magento/Catalog/Model/Product/Image/ParamsBuilder.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,7 @@ private function getWatermark(string $type): array
161161
*/
162162
private function hasDefaultFrame(): bool
163163
{
164-
return (bool) $this->viewConfig->getViewConfig()->getVarValue(
165-
'Magento_Catalog',
166-
'product_image_white_borders'
167-
);
164+
return (bool) $this->viewConfig->getViewConfig(['area' => \Magento\Framework\App\Area::AREA_FRONTEND])
165+
->getVarValue('Magento_Catalog', 'product_image_white_borders');
168166
}
169167
}

0 commit comments

Comments
 (0)