Skip to content

Commit 7648220

Browse files
authored
Merge pull request #1681 from magento-helix/MAGETWO-80568
[Helix] Prepare codebase for 2.2.2
2 parents 29a1a27 + 18b0e57 commit 7648220

File tree

84 files changed

+1880
-511
lines changed

Some content is hidden

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

84 files changed

+1880
-511
lines changed

CHANGELOG.md

Lines changed: 690 additions & 0 deletions
Large diffs are not rendered by default.

app/code/Magento/AdvancedPricingImportExport/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"magento/framework": "101.0.*"
1414
},
1515
"type": "magento2-module",
16-
"version": "100.2.0",
16+
"version": "100.2.1",
1717
"license": [
1818
"OSL-3.0",
1919
"AFL-3.0"

app/code/Magento/Analytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"magento/framework": "100.2.*"
1111
},
1212
"type": "magento2-module",
13-
"version": "100.2.0-dev",
13+
"version": "100.2.0",
1414
"license": [
1515
"OSL-3.0",
1616
"AFL-3.0"

app/code/Magento/Backend/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"magento/module-theme": "100.2.*"
2525
},
2626
"type": "magento2-module",
27-
"version": "100.2.0",
27+
"version": "100.2.1",
2828
"license": [
2929
"OSL-3.0",
3030
"AFL-3.0"

app/code/Magento/Braintree/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"magento/module-theme": "100.2.*"
2626
},
2727
"type": "magento2-module",
28-
"version": "100.2.0",
28+
"version": "100.2.1",
2929
"license": [
3030
"proprietary"
3131
],

app/code/Magento/Bundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"magento/module-bundle-sample-data": "Sample Data version:100.2.*"
2626
},
2727
"type": "magento2-module",
28-
"version": "100.2.0",
28+
"version": "100.2.1",
2929
"license": [
3030
"OSL-3.0",
3131
"AFL-3.0"

app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Full.php

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class Full extends \Magento\Catalog\Model\Indexer\Category\Product\AbstractActio
5252
* @param \Magento\Framework\Indexer\BatchSizeManagementInterface|null $batchSizeManagement
5353
* @param \Magento\Framework\Indexer\BatchProviderInterface|null $batchProvider
5454
* @param \Magento\Framework\EntityManager\MetadataPool|null $metadataPool
55-
* @param \Magento\Indexer\Model\Indexer\StateFactory|null $stateFactory
5655
* @param int|null $batchRowsCount
5756
* @param ActiveTableSwitcher|null $activeTableSwitcher
5857
*/
@@ -87,13 +86,28 @@ public function __construct(
8786
$this->activeTableSwitcher = $activeTableSwitcher ?: $objectManager->get(ActiveTableSwitcher::class);
8887
}
8988

89+
/**
90+
* Clear the table we'll be writing de-normalized data into
91+
* to prevent archived data getting in the way of actual data.
92+
*
93+
* @return void
94+
*/
95+
private function clearCurrentTable()
96+
{
97+
$this->connection->delete(
98+
$this->activeTableSwitcher
99+
->getAdditionalTableName($this->getMainTable())
100+
);
101+
}
102+
90103
/**
91104
* Refresh entities index
92105
*
93106
* @return $this
94107
*/
95108
public function execute()
96109
{
110+
$this->clearCurrentTable();
97111
$this->reindex();
98112
$this->activeTableSwitcher->switchTable($this->connection, [$this->getMainTable()]);
99113
return $this;
@@ -103,6 +117,7 @@ public function execute()
103117
* Return select for remove unnecessary data
104118
*
105119
* @return \Magento\Framework\DB\Select
120+
* @deprecated 102.0.1 Not needed anymore.
106121
*/
107122
protected function getSelectUnnecessaryData()
108123
{
@@ -127,12 +142,15 @@ protected function getSelectUnnecessaryData()
127142
* Remove unnecessary data
128143
*
129144
* @return void
145+
*
146+
* @deprecated 102.0.1 Not needed anymore.
130147
*/
131148
protected function removeUnnecessaryData()
132149
{
133-
$this->connection->query(
134-
$this->connection->deleteFromSelect($this->getSelectUnnecessaryData(), $this->getMainTable())
135-
);
150+
//Called for backwards compatibility.
151+
$this->getSelectUnnecessaryData();
152+
//This method is useless,
153+
//left it here just in case somebody's using it in child classes.
136154
}
137155

138156
/**

app/code/Magento/Catalog/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"magento/module-catalog-sample-data": "Sample Data version:100.2.*"
3535
},
3636
"type": "magento2-module",
37-
"version": "102.0.0",
37+
"version": "102.0.1",
3838
"license": [
3939
"OSL-3.0",
4040
"AFL-3.0"

app/code/Magento/CatalogAnalytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"magento/module-catalog": "101.1.*"
88
},
99
"type": "magento2-module",
10-
"version": "100.2.0-dev",
10+
"version": "100.2.0",
1111
"license": [
1212
"OSL-3.0",
1313
"AFL-3.0"

app/code/Magento/CatalogImportExport/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"ext-ctype": "*"
1717
},
1818
"type": "magento2-module",
19-
"version": "100.2.0",
19+
"version": "100.2.1",
2020
"license": [
2121
"OSL-3.0",
2222
"AFL-3.0"

app/code/Magento/CatalogInventory/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"magento/module-ui": "101.0.*"
1414
},
1515
"type": "magento2-module",
16-
"version": "100.2.0",
16+
"version": "100.2.1",
1717
"license": [
1818
"OSL-3.0",
1919
"AFL-3.0"

app/code/Magento/CatalogRule/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"magento/module-catalog-rule-sample-data": "Sample Data version:100.2.*"
1818
},
1919
"type": "magento2-module",
20-
"version": "101.0.0",
20+
"version": "101.0.1",
2121
"license": [
2222
"OSL-3.0",
2323
"AFL-3.0"

app/code/Magento/CatalogSearch/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"magento/framework": "101.0.*"
1616
},
1717
"type": "magento2-module",
18-
"version": "100.2.0",
18+
"version": "100.2.1",
1919
"license": [
2020
"OSL-3.0",
2121
"AFL-3.0"

app/code/Magento/CatalogUrlRewrite/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"magento/module-ui": "101.0.*"
1515
},
1616
"type": "magento2-module",
17-
"version": "100.2.0",
17+
"version": "100.2.1",
1818
"license": [
1919
"OSL-3.0",
2020
"AFL-3.0"

app/code/Magento/Checkout/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"magento/module-cookie": "100.2.*"
2828
},
2929
"type": "magento2-module",
30-
"version": "100.2.0",
30+
"version": "100.2.1",
3131
"license": [
3232
"OSL-3.0",
3333
"AFL-3.0"

app/code/Magento/Cms/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"magento/module-cms-sample-data": "Sample Data version:100.2.*"
1919
},
2020
"type": "magento2-module",
21-
"version": "102.0.0",
21+
"version": "102.0.1",
2222
"license": [
2323
"OSL-3.0",
2424
"AFL-3.0"

app/code/Magento/Config/Block/System/Config/Form.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Magento\Config\App\Config\Type\System;
99
use Magento\Config\Model\Config\Reader\Source\Deployed\SettingChecker;
1010
use Magento\Config\Model\Config\Structure\ElementVisibilityInterface;
11+
use Magento\Framework\App\Config\Data\ProcessorInterface;
1112
use Magento\Framework\App\Config\ScopeConfigInterface;
1213
use Magento\Framework\App\DeploymentConfig;
1314
use Magento\Framework\App\ObjectManager;
@@ -429,6 +430,18 @@ private function getFieldData(\Magento\Config\Model\Config\Structure\Element\Fie
429430
if ($data === null) {
430431
$path = $field->getConfigPath() !== null ? $field->getConfigPath() : $path;
431432
$data = $this->getConfigValue($path);
433+
if ($field->hasBackendModel()) {
434+
$backendModel = $field->getBackendModel();
435+
// Backend models which implement ProcessorInterface are processed by ScopeConfigInterface
436+
if (!$backendModel instanceof ProcessorInterface) {
437+
$backendModel->setPath($path)
438+
->setValue($data)
439+
->setWebsite($this->getWebsiteCode())
440+
->setStore($this->getStoreCode())
441+
->afterLoad();
442+
$data = $backendModel->getValue();
443+
}
444+
}
432445
}
433446

434447
return $data;

app/code/Magento/Config/Model/Config/Backend/Serialized.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
*/
66
namespace Magento\Config\Model\Config\Backend;
77

8-
use Magento\Framework\App\Config\Data\ProcessorInterface;
98
use Magento\Framework\App\ObjectManager;
109
use Magento\Framework\Serialize\Serializer\Json;
1110

1211
/**
1312
* @api
1413
* @since 100.0.2
1514
*/
16-
class Serialized extends \Magento\Framework\App\Config\Value implements ProcessorInterface
15+
class Serialized extends \Magento\Framework\App\Config\Value
1716
{
1817
/**
1918
* @var Json
@@ -68,12 +67,4 @@ public function beforeSave()
6867
parent::beforeSave();
6968
return $this;
7069
}
71-
72-
/**
73-
* @inheritdoc
74-
*/
75-
public function processValue($value)
76-
{
77-
return empty($value) ? '' : $this->serializer->unserialize($value);
78-
}
7970
}

app/code/Magento/Config/Test/Unit/Block/System/Config/FormTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ public function initFieldsDataProvider()
548548
false,
549549
'some_value',
550550
null,
551-
0,
551+
1,
552552
false,
553553
false,
554554
false
@@ -560,7 +560,7 @@ public function initFieldsDataProvider()
560560
true,
561561
'Config Value',
562562
null,
563-
0,
563+
1,
564564
true,
565565
false,
566566
true

app/code/Magento/Config/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"magento/module-deploy": "100.2.*"
1414
},
1515
"type": "magento2-module",
16-
"version": "101.0.0",
16+
"version": "101.0.1",
1717
"license": [
1818
"OSL-3.0",
1919
"AFL-3.0"

app/code/Magento/ConfigurableProduct/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"magento/module-product-links-sample-data": "Sample Data version:100.2.*"
2525
},
2626
"type": "magento2-module",
27-
"version": "100.2.0",
27+
"version": "100.2.1",
2828
"license": [
2929
"OSL-3.0",
3030
"AFL-3.0"

app/code/Magento/Customer/Block/Address/Edit.php

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
*/
66
namespace Magento\Customer\Block\Address;
77

8+
use Magento\Customer\Model\AttributeChecker;
89
use Magento\Framework\Exception\NoSuchEntityException;
10+
use Magento\Framework\App\ObjectManager;
911

1012
/**
1113
* Customer address edit block
@@ -46,6 +48,11 @@ class Edit extends \Magento\Directory\Block\Data
4648
*/
4749
protected $dataObjectHelper;
4850

51+
/**
52+
* @var AttributeChecker
53+
*/
54+
private $attributeChecker;
55+
4956
/**
5057
* Constructor
5158
*
@@ -61,7 +68,7 @@ class Edit extends \Magento\Directory\Block\Data
6168
* @param \Magento\Customer\Helper\Session\CurrentCustomer $currentCustomer
6269
* @param \Magento\Framework\Api\DataObjectHelper $dataObjectHelper
6370
* @param array $data
64-
*
71+
* @param AttributeChecker $attributeChecker
6572
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
6673
*/
6774
public function __construct(
@@ -76,13 +83,16 @@ public function __construct(
7683
\Magento\Customer\Api\Data\AddressInterfaceFactory $addressDataFactory,
7784
\Magento\Customer\Helper\Session\CurrentCustomer $currentCustomer,
7885
\Magento\Framework\Api\DataObjectHelper $dataObjectHelper,
79-
array $data = []
86+
array $data = [],
87+
AttributeChecker $attributeChecker = null
8088
) {
8189
$this->_customerSession = $customerSession;
8290
$this->_addressRepository = $addressRepository;
8391
$this->addressDataFactory = $addressDataFactory;
8492
$this->currentCustomer = $currentCustomer;
8593
$this->dataObjectHelper = $dataObjectHelper;
94+
$this->attributeChecker = $attributeChecker ?: ObjectManager::getInstance()->get(AttributeChecker::class);
95+
8696
parent::__construct(
8797
$context,
8898
$directoryHelper,
@@ -352,4 +362,16 @@ public function getConfig($path)
352362
{
353363
return $this->_scopeConfig->getValue($path, \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
354364
}
365+
366+
/**
367+
* Checks whether it is allowed to show an attribute on the form.
368+
*
369+
* @param string $attributeCode
370+
* @param string $formName
371+
* @return bool
372+
*/
373+
public function isAttributeAllowedOnForm($attributeCode, $formName)
374+
{
375+
return $this->attributeChecker->isAttributeAllowedOnForm($attributeCode, $formName);
376+
}
355377
}

0 commit comments

Comments
 (0)