Skip to content

Commit e177801

Browse files
committed
Merge branch '2.3-develop' into feature/271-Customer-Attributes-Validation
Conflicts: dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerTest.php
2 parents 342675a + ab188bc commit e177801

File tree

901 files changed

+30013
-14829
lines changed

Some content is hidden

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

901 files changed

+30013
-14829
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ atlassian*
4848
/pub/media/import/*
4949
!/pub/media/import/.htaccess
5050
/pub/media/logo/*
51+
/pub/media/custom_options/*
52+
!/pub/media/custom_options/.htaccess
5153
/pub/media/theme/*
5254
/pub/media/theme_customization/*
5355
!/pub/media/theme_customization/.htaccess

.htaccess

+14
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
#AddType x-mapp-php5 .php
2828
#AddHandler x-mapp-php5 .php
2929

30+
############################################
31+
## enable usage of methods arguments in backtrace
32+
33+
SetEnv MAGE_DEBUG_SHOW_ARGS 1
34+
3035
############################################
3136
## default index file
3237

@@ -364,6 +369,15 @@
364369
Require all denied
365370
</IfVersion>
366371
</Files>
372+
<Files .user.ini>
373+
<IfVersion < 2.4>
374+
order allow,deny
375+
deny from all
376+
</IfVersion>
377+
<IfVersion >= 2.4>
378+
Require all denied
379+
</IfVersion>
380+
</Files>
367381

368382
# For 404s and 403s that aren't handled by the application, show plain 404 response
369383
ErrorDocument 404 /pub/errors/404.php

.htaccess.sample

+14
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
#AddType x-mapp-php5 .php
2828
#AddHandler x-mapp-php5 .php
2929

30+
############################################
31+
## enable usage of methods arguments in backtrace
32+
33+
SetEnv MAGE_DEBUG_SHOW_ARGS 1
34+
3035
############################################
3136
## default index file
3237

@@ -341,6 +346,15 @@
341346
Require all denied
342347
</IfVersion>
343348
</Files>
349+
<Files .user.ini>
350+
<IfVersion < 2.4>
351+
order allow,deny
352+
deny from all
353+
</IfVersion>
354+
<IfVersion >= 2.4>
355+
Require all denied
356+
</IfVersion>
357+
</Files>
344358

345359
# For 404s and 403s that aren't handled by the application, show plain 404 response
346360
ErrorDocument 404 /pub/errors/404.php

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ Tests:
626626
* Fixed an issue where filters were not shown on product reviews report grid
627627
* Fixed an issue where second customer address was not deleted from customer account
628628
* Fixed an issue where custom options pop-up was still displayed after submit
629-
* Fixed an issue where Second Product was not added to Shopping Cart from Wishlist at first atempt
629+
* Fixed an issue where Second Product was not added to Shopping Cart from Wishlist at first attempt
630630
* Fixed an issue where customer invalid email message was not displayed
631631
* Fixed an issue where All Access Tokens for Customer without Tokens could not be revoked
632632
* Fixed an issue where it was impossible to add Product to Shopping Cart from shared Wishlist
@@ -785,7 +785,7 @@ Tests:
785785
* Refactored controller actions in the Product area
786786
* Moved commands cache.php, indexer.php, log.php, test.php, compiler.php, singletenant\_compiler.php, generator.php, pack.php, deploy.php and file\_assembler.php to the new bin/magento CLI framework
787787
* Data Migration Tool
788-
* The Data Migraiton Tool is published in the separate [repository](https://github.com/magento/data-migration-tool-ce "Data Migration Tool repository")
788+
* The Data Migration Tool is published in the separate [repository](https://github.com/magento/data-migration-tool-ce "Data Migration Tool repository")
789789
* Fixed bugs
790790
* Fixed an issue where error appeared during placing order with virtual product
791791
* Fixed an issue where billing and shipping sections didn't contain address information on order print

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<h2>Welcome</h2>
66
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results.
77

8-
## Magento system requirements
9-
[Magento system requirements](https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements2.html).
8+
## Magento System Requirements
9+
[Magento System Requirements](https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements2.html).
1010

1111
## Install Magento
1212

13-
* [Installation guide](https://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html).
13+
* [Installation Guide](https://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html).
1414

15-
<h2>Contributing to the Magento 2 code base</h2>
15+
<h2>Contributing to the Magento 2 Code Base</h2>
1616
Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes, optimizations, or just good suggestions.
1717

1818
To learn about how to make a contribution, click [here][1].
@@ -39,11 +39,11 @@ Magento is thankful for any contribution that can improve our code base, documen
3939
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/contributors.png"/>
4040
</a>
4141

42-
### Labels applied by the Magento team
42+
### Labels Applied by the Magento Team
4343
We apply labels to public Pull Requests and Issues to help other participants retrieve additional information about current progress, component assignments, Magento release lines, and much more.
4444
Please review the [Code Contributions guide](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#labels) for detailed information on labels used in Magento 2 repositories.
4545

46-
## Reporting security issues
46+
## Reporting Security Issues
4747

4848
To report security vulnerabilities in Magento software or web sites, please create a Bugcrowd researcher account [there](https://bugcrowd.com/magento) to submit and follow-up your issue. Learn more about reporting security issues [here](https://magento.com/security/reporting-magento-security-issue).
4949

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/Block/Grid/Renderer/Actions.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
namespace Magento\AdminNotification\Block\Grid\Renderer;
1010

11+
/**
12+
* Renderer class for action in the admin notifications grid
13+
*
14+
* @package Magento\AdminNotification\Block\Grid\Renderer
15+
*/
1116
class Actions extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
1217
{
1318
/**
@@ -37,7 +42,9 @@ public function __construct(
3742
*/
3843
public function render(\Magento\Framework\DataObject $row)
3944
{
40-
$readDetailsHtml = $row->getUrl() ? '<a class="action-details" target="_blank" href="' . $row->getUrl() . '">' .
45+
$readDetailsHtml = $row->getUrl() ? '<a class="action-details" target="_blank" href="' .
46+
$this->escapeUrl($row->getUrl())
47+
. '">' .
4148
__('Read Details') . '</a>' : '';
4249

4350
$markAsReadHtml = !$row->getIsRead() ? '<a class="action-mark" href="' . $this->getUrl(

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php

+24-10
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ class AdvancedPricing extends \Magento\ImportExport\Model\Import\Entity\Abstract
185185
* @param AdvancedPricing\Validator\Website $websiteValidator
186186
* @param AdvancedPricing\Validator\TierPrice $tierPriceValidator
187187
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
188+
* @throws \Exception
188189
*/
189190
public function __construct(
190191
\Magento\Framework\Json\Helper\Data $jsonHelper,
@@ -255,6 +256,7 @@ public function getEntityTypeCode()
255256
* @param array $rowData
256257
* @param int $rowNum
257258
* @return bool
259+
* @throws \Zend_Validate_Exception
258260
*/
259261
public function validateRow(array $rowData, $rowNum)
260262
{
@@ -308,6 +310,7 @@ protected function _importData()
308310
* Save advanced pricing
309311
*
310312
* @return $this
313+
* @throws \Exception
311314
*/
312315
public function saveAdvancedPricing()
313316
{
@@ -319,6 +322,7 @@ public function saveAdvancedPricing()
319322
* Deletes Advanced price data from raw data.
320323
*
321324
* @return $this
325+
* @throws \Exception
322326
*/
323327
public function deleteAdvancedPricing()
324328
{
@@ -347,6 +351,7 @@ public function deleteAdvancedPricing()
347351
* Replace advanced pricing
348352
*
349353
* @return $this
354+
* @throws \Exception
350355
*/
351356
public function replaceAdvancedPricing()
352357
{
@@ -360,6 +365,7 @@ public function replaceAdvancedPricing()
360365
* @return $this
361366
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
362367
* @SuppressWarnings(PHPMD.NPathComplexity)
368+
* @throws \Exception
363369
*/
364370
protected function saveAndReplaceAdvancedPrices()
365371
{
@@ -368,8 +374,8 @@ protected function saveAndReplaceAdvancedPrices()
368374
$this->_cachedSkuToDelete = null;
369375
}
370376
$listSku = [];
377+
$tierPrices = [];
371378
while ($bunch = $this->_dataSourceModel->getNextBunch()) {
372-
$tierPrices = [];
373379
foreach ($bunch as $rowNum => $rowData) {
374380
if (!$this->validateRow($rowData, $rowNum)) {
375381
$this->addRowError(ValidatorInterface::ERROR_SKU_IS_EMPTY, $rowNum);
@@ -397,15 +403,8 @@ protected function saveAndReplaceAdvancedPrices()
397403
];
398404
}
399405
}
400-
if (\Magento\ImportExport\Model\Import::BEHAVIOR_REPLACE == $behavior) {
401-
if ($listSku) {
402-
$this->processCountNewPrices($tierPrices);
403-
if ($this->deleteProductTierPrices(array_unique($listSku), self::TABLE_TIER_PRICE)) {
404-
$this->saveProductPrices($tierPrices, self::TABLE_TIER_PRICE);
405-
$this->setUpdatedAt($listSku);
406-
}
407-
}
408-
} elseif (\Magento\ImportExport\Model\Import::BEHAVIOR_APPEND == $behavior) {
406+
407+
if (\Magento\ImportExport\Model\Import::BEHAVIOR_APPEND == $behavior) {
409408
$this->processCountExistingPrices($tierPrices, self::TABLE_TIER_PRICE)
410409
->processCountNewPrices($tierPrices);
411410

@@ -415,6 +414,17 @@ protected function saveAndReplaceAdvancedPrices()
415414
}
416415
}
417416
}
417+
418+
if (\Magento\ImportExport\Model\Import::BEHAVIOR_REPLACE == $behavior) {
419+
if ($listSku) {
420+
$this->processCountNewPrices($tierPrices);
421+
if ($this->deleteProductTierPrices(array_unique($listSku), self::TABLE_TIER_PRICE)) {
422+
$this->saveProductPrices($tierPrices, self::TABLE_TIER_PRICE);
423+
$this->setUpdatedAt($listSku);
424+
}
425+
}
426+
}
427+
418428
return $this;
419429
}
420430

@@ -424,6 +434,7 @@ protected function saveAndReplaceAdvancedPrices()
424434
* @param array $priceData
425435
* @param string $table
426436
* @return $this
437+
* @throws \Exception
427438
*/
428439
protected function saveProductPrices(array $priceData, $table)
429440
{
@@ -455,6 +466,7 @@ protected function saveProductPrices(array $priceData, $table)
455466
* @param array $listSku
456467
* @param string $table
457468
* @return boolean
469+
* @throws \Exception
458470
*/
459471
protected function deleteProductTierPrices(array $listSku, $table)
460472
{
@@ -532,6 +544,7 @@ protected function getCustomerGroupId($customerGroup)
532544
* Retrieve product skus
533545
*
534546
* @return array
547+
* @throws \Exception
535548
*/
536549
protected function retrieveOldSkus()
537550
{
@@ -552,6 +565,7 @@ protected function retrieveOldSkus()
552565
* @param array $prices
553566
* @param string $table
554567
* @return $this
568+
* @throws \Exception
555569
*/
556570
protected function processCountExistingPrices($prices, $table)
557571
{

app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingButtonTest.xml

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
<title value="AdvancedReportingButtonTest"/>
1414
<description value="Test log in to AdvancedReporting and tests AdvancedReportingButtonTest"/>
1515
<testCaseId value="MC-14800"/>
16+
<skip>
17+
<issueId value="MC-14800" />
18+
</skip>
1619
<severity value="CRITICAL"/>
1720
<group value="analytics"/>
1821
<group value="mtf_migrated"/>

app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/AdditionalCommentTest.php

+9
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ protected function setUp()
3939
->setMethods(['getComment', 'getLabel'])
4040
->disableOriginalConstructor()
4141
->getMock();
42+
43+
$objectManager = new ObjectManager($this);
44+
$escaper = $objectManager->getObject(\Magento\Framework\Escaper::class);
45+
$reflection = new \ReflectionClass($this->abstractElementMock);
46+
$reflection_property = $reflection->getProperty('_escaper');
47+
$reflection_property->setAccessible(true);
48+
$reflection_property->setValue($this->abstractElementMock, $escaper);
49+
50+
$this->abstractElementMock->setEscaper($escaper);
4251
$this->contextMock = $this->getMockBuilder(Context::class)
4352
->disableOriginalConstructor()
4453
->getMock();

app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php

+8
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ protected function setUp()
4646
->setMethods(['getComment'])
4747
->disableOriginalConstructor()
4848
->getMock();
49+
50+
$objectManager = new ObjectManager($this);
51+
$escaper = $objectManager->getObject(\Magento\Framework\Escaper::class);
52+
$reflection = new \ReflectionClass($this->abstractElementMock);
53+
$reflection_property = $reflection->getProperty('_escaper');
54+
$reflection_property->setAccessible(true);
55+
$reflection_property->setValue($this->abstractElementMock, $escaper);
56+
4957
$this->contextMock = $this->getMockBuilder(Context::class)
5058
->setMethods(['getLocaleDate'])
5159
->disableOriginalConstructor()

app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php

+8
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ protected function setUp()
5151
->setMethods(['getComment'])
5252
->disableOriginalConstructor()
5353
->getMock();
54+
55+
$objectManager = new ObjectManager($this);
56+
$escaper = $objectManager->getObject(\Magento\Framework\Escaper::class);
57+
$reflection = new \ReflectionClass($this->abstractElementMock);
58+
$reflection_property = $reflection->getProperty('_escaper');
59+
$reflection_property->setAccessible(true);
60+
$reflection_property->setValue($this->abstractElementMock, $escaper);
61+
5462
$this->formMock = $this->getMockBuilder(Form::class)
5563
->disableOriginalConstructor()
5664
->getMock();

app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php

+8
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ protected function setUp()
3939
->setMethods(['getComment', 'getLabel', 'getHint'])
4040
->disableOriginalConstructor()
4141
->getMock();
42+
43+
$objectManager = new ObjectManager($this);
44+
$escaper = $objectManager->getObject(\Magento\Framework\Escaper::class);
45+
$reflection = new \ReflectionClass($this->abstractElementMock);
46+
$reflection_property = $reflection->getProperty('_escaper');
47+
$reflection_property->setAccessible(true);
48+
$reflection_property->setValue($this->abstractElementMock, $escaper);
49+
4250
$this->contextMock = $this->getMockBuilder(Context::class)
4351
->disableOriginalConstructor()
4452
->getMock();

app/code/Magento/AsynchronousOperations/Model/MassConsumer.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Magento\Framework\MessageQueue\MessageLockException;
1515
use Magento\Framework\MessageQueue\ConnectionLostException;
1616
use Magento\Framework\Exception\NotFoundException;
17-
use Magento\Framework\MessageQueue\CallbackInvoker;
17+
use Magento\Framework\MessageQueue\CallbackInvokerInterface;
1818
use Magento\Framework\MessageQueue\ConsumerConfigurationInterface;
1919
use Magento\Framework\MessageQueue\EnvelopeInterface;
2020
use Magento\Framework\MessageQueue\QueueInterface;
@@ -30,7 +30,7 @@
3030
class MassConsumer implements ConsumerInterface
3131
{
3232
/**
33-
* @var \Magento\Framework\MessageQueue\CallbackInvoker
33+
* @var CallbackInvokerInterface
3434
*/
3535
private $invoker;
3636

@@ -67,7 +67,7 @@ class MassConsumer implements ConsumerInterface
6767
/**
6868
* Initialize dependencies.
6969
*
70-
* @param CallbackInvoker $invoker
70+
* @param CallbackInvokerInterface $invoker
7171
* @param ResourceConnection $resource
7272
* @param MessageController $messageController
7373
* @param ConsumerConfigurationInterface $configuration
@@ -76,7 +76,7 @@ class MassConsumer implements ConsumerInterface
7676
* @param Registry $registry
7777
*/
7878
public function __construct(
79-
CallbackInvoker $invoker,
79+
CallbackInvokerInterface $invoker,
8080
ResourceConnection $resource,
8181
MessageController $messageController,
8282
ConsumerConfigurationInterface $configuration,

0 commit comments

Comments
 (0)