Skip to content

Commit ca1bd70

Browse files
committed
Merge remote-tracking branch 'origin/MC-20684' into 2.3-develop-com-pr6
2 parents 0bff893 + 0f007c4 commit ca1bd70

File tree

110 files changed

+4602
-630
lines changed

Some content is hidden

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

110 files changed

+4602
-630
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[![Open Source Helpers](https://www.codetriage.com/magento/magento2/badges/users.svg)](https://www.codetriage.com/magento/magento2)
22
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/magento/magento2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
33
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/magento-2/localized.svg)](https://crowdin.com/project/magento-2)
4-
<h2>Welcome</h2>
4+
5+
## Welcome
56
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results.
67

78
## Magento System Requirements
@@ -30,7 +31,7 @@ To suggest documentation improvements, click [here][4].
3031
[4]: https://devdocs.magento.com
3132

3233
<h3>Community Maintainers</h3>
33-
The members of this team have been recognized for their outstanding commitment to maintaining and improving Magento. Magento has granted them permission to accept, merge, and reject pull requests, as well as review issues, and thanks these Community Maintainers for their valuable contributions.
34+
The members of this team have been recognized for their outstanding commitment to maintaining and improving Magento. Magento has granted them permission to accept, merge, and reject pull requests, as well as review issues, and thanks to these Community Maintainers for their valuable contributions.
3435

3536
<a href="https://magento.com/magento-contributors#maintainers">
3637
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/maintainers.png"/>

app/code/Magento/Backup/etc/adminhtml/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<label>Backup Settings</label>
1313
<field id="functionality_enabled" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="0" showInStore="0">
1414
<label>Enable Backup</label>
15-
<comment>Disabled by default for security reasons</comment>
15+
<comment>Disabled by default for security reasons.</comment>
1616
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
1717
</field>
1818
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">

app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
<!-- Delete the simple product -->
3333
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
3434

35+
<!-- Delete a Website -->
36+
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
37+
<argument name="websiteName" value="Second Website"/>
38+
</actionGroup>
39+
3540
<!-- Log out -->
3641
<actionGroup ref="logout" stepKey="logout"/>
3742
</after>
@@ -135,11 +140,6 @@
135140
<actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteProduct">
136141
<argument name="product" value="BundleProduct"/>
137142
</actionGroup>
138-
139-
<!-- Delete created Website -->
140-
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
141-
<argument name="websiteName" value="$createWebsite.website[name]$"/>
142-
</actionGroup>
143143
</test>
144144
<test name="AdminCreateAndEditBundleProductOptionsNegativeTest">
145145
<annotations>

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,12 @@ private function getWatermark(string $type, int $scopeId = null): array
130130
);
131131

132132
if ($file) {
133-
$size = $this->scopeConfig->getValue(
134-
"design/watermark/{$type}_size",
135-
ScopeInterface::SCOPE_STORE,
136-
$scopeId
133+
$size = explode(
134+
'x',
135+
$this->scopeConfig->getValue(
136+
"design/watermark/{$type}_size",
137+
ScopeInterface::SCOPE_STORE
138+
)
137139
);
138140
$opacity = $this->scopeConfig->getValue(
139141
"design/watermark/{$type}_imageOpacity",
@@ -145,8 +147,8 @@ private function getWatermark(string $type, int $scopeId = null): array
145147
ScopeInterface::SCOPE_STORE,
146148
$scopeId
147149
);
148-
$width = !empty($size['width']) ? $size['width'] : null;
149-
$height = !empty($size['height']) ? $size['height'] : null;
150+
$width = !empty($size['0']) ? $size['0'] : null;
151+
$height = !empty($size['1']) ? $size['1'] : null;
150152

151153
return [
152154
'watermark_file' => $file,

app/code/Magento/Catalog/etc/adminhtml/system.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
</field>
6666
<field id="grid_per_page" translate="label comment" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
6767
<label>Products per Page on Grid Default Value</label>
68-
<comment>Must be in the allowed values list</comment>
68+
<comment>Must be in the allowed values list.</comment>
6969
<validate>validate-per-page-value</validate>
7070
</field>
7171
<field id="list_per_page_values" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
@@ -75,7 +75,7 @@
7575
</field>
7676
<field id="list_per_page" translate="label comment" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
7777
<label>Products per Page on List Default Value</label>
78-
<comment>Must be in the allowed values list</comment>
78+
<comment>Must be in the allowed values list.</comment>
7979
<validate>validate-per-page-value</validate>
8080
</field>
8181
<field id="flat_catalog_category" translate="label" type="select" sortOrder="100" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
@@ -90,12 +90,12 @@
9090
</field>
9191
<field id="default_sort_by" translate="label comment" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
9292
<label>Product Listing Sort by</label>
93-
<comment>Applies to category pages</comment>
93+
<comment>Applies to category pages.</comment>
9494
<source_model>Magento\Catalog\Model\Config\Source\ListSort</source_model>
9595
</field>
9696
<field id="list_allow_all" translate="label comment" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1">
9797
<label>Allow All Products per Page</label>
98-
<comment>Whether to show "All" option in the "Show X Per Page" dropdown</comment>
98+
<comment>Whether to show "All" option in the "Show X Per Page" dropdown.</comment>
9999
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
100100
</field>
101101
<field id="remember_pagination" translate="label comment" type="select" sortOrder="7" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">

app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ protected function _prepareIndexTable($entityIds = null)
292292
*/
293293
protected function _updateIndex($entityIds)
294294
{
295+
$this->deleteOldRecords($entityIds);
295296
$connection = $this->getConnection();
296297
$select = $this->_getStockStatusSelect($entityIds, true);
297298
$select = $this->getQueryProcessorComposite()->processQuery($select, $entityIds, true);
@@ -314,7 +315,6 @@ protected function _updateIndex($entityIds)
314315
}
315316
}
316317

317-
$this->deleteOldRecords($entityIds);
318318
$this->_updateIndexTable($data);
319319

320320
return $this;

app/code/Magento/CustomerGraphQl/Model/Customer/Address/CreateCustomerAddress.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
use Magento\Customer\Api\AddressRepositoryInterface;
1111
use Magento\Customer\Api\Data\AddressInterface;
1212
use Magento\Customer\Api\Data\AddressInterfaceFactory;
13+
use Magento\Directory\Helper\Data as DirectoryData;
14+
use Magento\Framework\Api\DataObjectHelper;
1315
use Magento\Framework\Exception\LocalizedException;
1416
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
15-
use Magento\Framework\Api\DataObjectHelper;
1617

1718
/**
1819
* Create customer address
@@ -38,23 +39,30 @@ class CreateCustomerAddress
3839
* @var DataObjectHelper
3940
*/
4041
private $dataObjectHelper;
42+
/**
43+
* @var DirectoryData
44+
*/
45+
private $directoryData;
4146

4247
/**
4348
* @param GetAllowedAddressAttributes $getAllowedAddressAttributes
4449
* @param AddressInterfaceFactory $addressFactory
4550
* @param AddressRepositoryInterface $addressRepository
4651
* @param DataObjectHelper $dataObjectHelper
52+
* @param DirectoryData $directoryData
4753
*/
4854
public function __construct(
4955
GetAllowedAddressAttributes $getAllowedAddressAttributes,
5056
AddressInterfaceFactory $addressFactory,
5157
AddressRepositoryInterface $addressRepository,
52-
DataObjectHelper $dataObjectHelper
58+
DataObjectHelper $dataObjectHelper,
59+
DirectoryData $directoryData
5360
) {
5461
$this->getAllowedAddressAttributes = $getAllowedAddressAttributes;
5562
$this->addressFactory = $addressFactory;
5663
$this->addressRepository = $addressRepository;
5764
$this->dataObjectHelper = $dataObjectHelper;
65+
$this->directoryData = $directoryData;
5866
}
5967

6068
/**
@@ -102,6 +110,13 @@ public function validateData(array $addressData): void
102110
$attributes = $this->getAllowedAddressAttributes->execute();
103111
$errorInput = [];
104112

113+
//Add error for empty postcode with country with no optional ZIP
114+
if (!$this->directoryData->isZipCodeOptional($addressData['country_id'])
115+
&& (!isset($addressData['postcode']) || empty($addressData['postcode']))
116+
) {
117+
$errorInput[] = 'postcode';
118+
}
119+
105120
foreach ($attributes as $attributeName => $attributeInfo) {
106121
if ($attributeInfo->getIsRequired()
107122
&& (!isset($addressData[$attributeName]) || empty($addressData[$attributeName]))

app/code/Magento/CustomerGraphQl/Model/Resolver/DeleteCustomerAddress.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ public function resolve(
5858
throw new GraphQlAuthorizationException(__('The current customer isn\'t authorized.'));
5959
}
6060

61-
if (empty($args['id'])) {
62-
throw new GraphQlInputException(__('Address "id" value should be specified'));
63-
}
64-
6561
$address = $this->getCustomerAddress->execute((int)$args['id'], $context->getUserId());
6662
$this->deleteCustomerAddress->execute($address);
6763
return true;

app/code/Magento/CustomerGraphQl/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"type": "magento2-module",
55
"require": {
66
"php": "~7.1.3||~7.2.0||~7.3.0",
7-
"magento/module-customer": "*",
87
"magento/module-authorization": "*",
98
"magento/module-customer": "*",
109
"magento/module-eav": "*",
1110
"magento/module-graph-ql": "*",
1211
"magento/module-newsletter": "*",
1312
"magento/module-integration": "*",
1413
"magento/module-store": "*",
15-
"magento/framework": "*"
14+
"magento/framework": "*",
15+
"magento/module-directory": "*"
1616
},
1717
"license": [
1818
"OSL-3.0",

app/code/Magento/Developer/Console/Command/TablesWhitelistGenerateCommand.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Developer\Model\Setup\Declaration\Schema\WhitelistGenerator;
1111
use Magento\Framework\Config\FileResolverByModule;
1212
use Magento\Framework\Exception\ConfigurationMismatchException;
13+
use Magento\Framework\Console\Cli;
1314
use Symfony\Component\Console\Command\Command;
1415
use Symfony\Component\Console\Input\InputInterface;
1516
use Symfony\Component\Console\Input\InputOption;
@@ -80,11 +81,12 @@ protected function execute(InputInterface $input, OutputInterface $output) : int
8081
$this->whitelistGenerator->generate($moduleName);
8182
} catch (ConfigurationMismatchException $e) {
8283
$output->writeln($e->getMessage());
83-
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
84+
return Cli::RETURN_FAILURE;
8485
} catch (\Exception $e) {
85-
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
86+
$output->writeln($e->getMessage());
87+
return Cli::RETURN_FAILURE;
8688
}
8789

88-
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
90+
return Cli::RETURN_SUCCESS;
8991
}
9092
}

0 commit comments

Comments
 (0)