Skip to content

Commit 57067de

Browse files
Merge pull request #6691 from magento-cia/2.3.7-develop-2.3-develop-sync-030921
Sync of 2.3.7-develop with 2.3-develop
2 parents 45bf71a + 7e9592b commit 57067de

File tree

3,611 files changed

+1426
-249483
lines changed

Some content is hidden

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

3,611 files changed

+1426
-249483
lines changed

.php_cs.dist

-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
$finder = PhpCsFixer\Finder::create()
1212
->name('*.phtml')
13-
->exclude('dev/tests/functional/generated')
14-
->exclude('dev/tests/functional/var')
15-
->exclude('dev/tests/functional/vendor')
1613
->exclude('dev/tests/integration/tmp')
1714
->exclude('dev/tests/integration/var')
1815
->exclude('lib/internal/Cm')

app/code/Magento/Analytics/Test/Mftf/Data/UserRoleData.xml

-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@
149149
<item>Magento_Backend::custom</item>
150150
<item>Magento_Backend::tools</item>
151151
<item>Magento_Backend::cache</item>
152-
<item>Magento_Backend::setup_wizard</item>
153152
<item>Magento_Backup::backup</item>
154153
<item>Magento_Backup::rollback</item>
155154
<item>Magento_Indexer::index</item>

app/code/Magento/Backend/etc/acl.xml

-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
<resource id="Magento_Backend::flush_static_files" title="Flush Static Files" translate="title" sortOrder="30" />
5454
</resource>
5555
</resource>
56-
<resource id="Magento_Backend::setup_wizard" title="Web Setup Wizard (Deprecated)" translate="title" sortOrder="20" />
5756
</resource>
5857
<resource id="Magento_Backend::system_other_settings" title="Other Settings" translate="title" sortOrder="80" />
5958
</resource>

app/code/Magento/Backend/etc/adminhtml/menu.xml

-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@
2727
<add id="Magento_Backend::stores_attributes" title="Attributes" translate="title" module="Magento_Backend" sortOrder="40" parent="Magento_Backend::stores" resource="Magento_Backend::stores_attributes"/>
2828
<add id="Magento_Backend::other_settings" title="Other Settings" translate="title" module="Magento_Backend" sortOrder="50" parent="Magento_Backend::stores" resource="Magento_Backend::stores_other_settings"/>
2929
<add id="Magento_Backend::system_other_settings" title="Other Settings" translate="title" module="Magento_Backend" sortOrder="80" parent="Magento_Backend::system" resource="Magento_Backend::system_other_settings"/>
30-
<add id="Magento_Backend::setup_wizard" action="adminhtml/backendapp/redirect/app/setup" title="Web Setup Wizard (Deprecated)" translate="title" module="Magento_Backend" sortOrder="80" parent="Magento_Backend::system_tools" resource="Magento_Backend::setup_wizard"/>
3130
</menu>
3231
</config>

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

-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ Attributes,Attributes
312312
"Connect Manager","Connect Manager"
313313
"Package Extensions","Package Extensions"
314314
Tools,Tools
315-
"Web Setup Wizard (Deprecated)","Web Setup Wizard (Deprecated)"
316315
Currency,Currency
317316
Communications,Communications
318317
Services,Services

app/code/Magento/Captcha/Test/Unit/Model/Filter/QuoteDataConfigFilterTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class QuoteDataConfigFilterTest extends TestCase
3030
/**
3131
* Initialize Class Dependencies
3232
*/
33-
protected function setUp()
33+
protected function setUp(): void
3434
{
3535
$this->objectManager = new ObjectManager($this);
3636

app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php

+13-7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
use Magento\Cms\Model\Wysiwyg\Images\Storage\Collection as StorageCollection;
99
use Magento\Framework\App\Filesystem\DirectoryList;
10+
use Magento\Framework\DataObject;
1011

1112
/**
1213
* @SuppressWarnings(PHPMD.LongVariable)
@@ -166,11 +167,9 @@ protected function setUp(): void
166167
)->method(
167168
'getPathInfo'
168169
)->willReturnCallback(
169-
170-
function ($path) {
171-
return pathinfo($path);
172-
}
173-
170+
function ($path) {
171+
return pathinfo($path);
172+
}
174173
);
175174

176175
$this->adapterFactoryMock = $this->createMock(\Magento\Framework\Image\AdapterFactory::class);
@@ -359,7 +358,10 @@ public function testGetDirsCollection($exclude, $include, $fileNames, $expectedR
359358
$collection = [];
360359
foreach ($fileNames as $filename) {
361360
/** @var \Magento\Framework\DataObject|\PHPUnit\Framework\MockObject\MockObject $objectMock */
362-
$objectMock = $this->createPartialMock(\Magento\Framework\DataObject::class, ['getFilename']);
361+
$objectMock = $this->getMockBuilder(DataObject::class)
362+
->addMethods(['getFilename'])
363+
->disableOriginalConstructor()
364+
->getMock();
363365
$objectMock->expects($this->any())
364366
->method('getFilename')
365367
->willReturn(self::STORAGE_ROOT_DIR . $filename);
@@ -539,10 +541,14 @@ public function testUploadFile()
539541
}
540542

541543
/**
542-
* @expectedException \Magento\Framework\Exception\LocalizedException
544+
*
543545
*/
544546
public function testUploadFileWithExcessivePath()
545547
{
548+
$this->expectException(
549+
\Magento\Framework\Exception\LocalizedException::class
550+
);
551+
546552
$path = 'target/path';
547553
$targetPath = self::STORAGE_ROOT_DIR .str_repeat('a', 255) . $path;
548554
$type = 'image';

app/code/Magento/Cron/etc/di.xml

-8
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@
6868
<item name="command" xsi:type="string">{magentoRoot}bin/magento cron:run | grep -v "Ran jobs by schedule" >> {magentoLog}magento.cron.log</item>
6969
<item name="optional" xsi:type="boolean">false</item>
7070
</item>
71-
<item name="cronUpdate" xsi:type="array">
72-
<item name="command" xsi:type="string">{magentoRoot}update/cron.php >> {magentoLog}update.cron.log</item>
73-
<item name="optional" xsi:type="boolean">true</item>
74-
</item>
75-
<item name="cronSetup" xsi:type="array">
76-
<item name="command" xsi:type="string">{magentoRoot}bin/magento setup:cron:run >> {magentoLog}setup.cron.log</item>
77-
<item name="optional" xsi:type="boolean">true</item>
78-
</item>
7971
</argument>
8072
</arguments>
8173
</type>

app/code/Magento/Customer/Api/Data/CustomerInterface.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
namespace Magento\Customer\Api\Data;
77

88
/**
9-
* Customer interface.
9+
* Customer entity interface for API handling.
10+
*
1011
* @api
1112
* @since 100.0.2
1213
*/
@@ -161,7 +162,10 @@ public function setCreatedIn($createdIn);
161162
/**
162163
* Get date of birth
163164
*
164-
* @return string|null
165+
* @return string|null In keeping with current security and privacy best practices, be sure you are aware of any
166+
* potential legal and security risks associated with the storage of customers’ full date of birth
167+
* (month, day, year) along with other personal identifiers (e.g., full name) before collecting or processing
168+
* such data.
165169
*/
166170
public function getDob();
167171

app/code/Magento/Customer/Test/Mftf/Section/AdminDeleteUserSection.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<section name="AdminDeleteUserSection">
1212
<element name="theUser" selector="//td[contains(text(), 'John')]" type="button"/>
1313
<element name="password" selector="#user_current_password" type="input"/>
14-
<element name="delete" selector="//button/span[contains(text(), 'Delete User')]" type="button"/>
14+
<element name="delete" selector=".page-actions-buttons #delete" type="button"/>
1515
<element name="confirm" selector="//*[@class='action-primary action-accept']" type="button"/>
1616
</section>
1717
</sections>

app/code/Magento/Customer/Test/Unit/Model/Address/Validator/CustomerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class CustomerTest extends TestCase
2929
/**
3030
* @inheritDoc
3131
*/
32-
protected function setUp()
32+
protected function setUp(): void
3333
{
3434
$this->addressFactoryMock = $this->createMock(AddressFactory::class);
3535
$objectManager = new ObjectManager($this);

app/code/Magento/Customer/Test/Unit/Model/FileProcessorTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ public function testSaveTemporaryFileWithError()
324324
public function testMoveTemporaryFileUnableToCreateDirectory()
325325
{
326326
$this->expectException(\Magento\Framework\Exception\LocalizedException::class);
327-
$this->expectExceptionMessage('Unable to create directory customer/f/i');
327+
$this->expectExceptionMessage('Unable to create directory /f/i');
328328

329329
$filePath = '/filename.ext1';
330330

app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php

+37-5
Original file line numberDiff line numberDiff line change
@@ -76,27 +76,27 @@ class ImageTest extends AbstractFormTestCase
7676
private $fileProcessorFactoryMock;
7777

7878
/**
79-
* @var File|PHPUnit_Framework_MockObject_MockObject
79+
* @var File|\PHPUnit\Framework\MockObject\MockObject
8080
*/
8181
private $ioFileSystemMock;
8282

8383
/**
84-
* @var DirectoryList|PHPUnit_Framework_MockObject_MockObject
84+
* @var DirectoryList|\PHPUnit\Framework\MockObject\MockObject
8585
*/
8686
private $directoryListMock;
8787

8888
/**
89-
* @var WriteFactory|PHPUnit_Framework_MockObject_MockObject
89+
* @var WriteFactory|\PHPUnit\Framework\MockObject\MockObject
9090
*/
9191
private $writeFactoryMock;
9292

9393
/**
94-
* @var Write|PHPUnit_Framework_MockObject_MockObject
94+
* @var Write|\PHPUnit\Framework\MockObject\MockObject
9595
*/
9696
private $mediaEntityTmpDirectoryMock;
9797

9898
/**
99-
* @var Driver|PHPUnit_Framework_MockObject_MockObject
99+
* @var Driver|\PHPUnit\Framework\MockObject\MockObject
100100
*/
101101
private $driverMock;
102102

@@ -251,6 +251,14 @@ public function testValidate()
251251
->with(FileProcessor::TMP_DIR . '/' . $value['name'])
252252
->willReturn(true);
253253

254+
$this->ioFileSystemMock->expects($this->any())
255+
->method('getPathInfo')
256+
->with($value['name'])
257+
->willReturn([
258+
'extension' => 'gif',
259+
'filename' => 'logo'
260+
]);
261+
254262
$model = $this->initialize([
255263
'value' => $value,
256264
'isAjax' => false,
@@ -304,6 +312,14 @@ public function testValidateMaxFileSize()
304312
->with(FileProcessor::TMP_DIR . '/' . $value['name'])
305313
->willReturn(true);
306314

315+
$this->ioFileSystemMock->expects($this->any())
316+
->method('getPathInfo')
317+
->with($value['name'])
318+
->willReturn([
319+
'extension' => 'gif',
320+
'filename' => 'logo'
321+
]);
322+
307323
$model = $this->initialize([
308324
'value' => $value,
309325
'isAjax' => false,
@@ -356,6 +372,14 @@ public function testValidateMaxImageWidth()
356372
->with(FileProcessor::TMP_DIR . '/' . $value['name'])
357373
->willReturn(true);
358374

375+
$this->ioFileSystemMock->expects($this->any())
376+
->method('getPathInfo')
377+
->with($value['name'])
378+
->willReturn([
379+
'extension' => 'gif',
380+
'filename' => 'logo'
381+
]);
382+
359383
$model = $this->initialize([
360384
'value' => $value,
361385
'isAjax' => false,
@@ -408,6 +432,14 @@ public function testValidateMaxImageHeight()
408432
->with(FileProcessor::TMP_DIR . '/' . $value['name'])
409433
->willReturn(true);
410434

435+
$this->ioFileSystemMock->expects($this->any())
436+
->method('getPathInfo')
437+
->with($value['name'])
438+
->willReturn([
439+
'extension' => 'gif',
440+
'filename' => 'logo'
441+
]);
442+
411443
$model = $this->initialize([
412444
'value' => $value,
413445
'isAjax' => false,

app/code/Magento/Customer/Test/Unit/Model/Webapi/ParamOverriderCustomerGroupIdTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ParamOverriderCustomerGroupIdTest extends TestCase
3838
/**
3939
* @inheritDoc
4040
*/
41-
protected function setUp()
41+
protected function setUp(): void
4242
{
4343
$this->userContextMock = $this->createMock(UserContextInterface::class);
4444
$this->customerRepositoryMock = $this->createMock(CustomerRepositoryInterface::class);

app/code/Magento/Customer/Test/Unit/Model/Webapi/ParamOverriderCustomerStoreIdTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ParamOverriderCustomerStoreIdTest extends TestCase
3838
/**
3939
* @inheritDoc
4040
*/
41-
protected function setUp()
41+
protected function setUp(): void
4242
{
4343
$this->userContextMock = $this->createMock(UserContextInterface::class);
4444
$this->customerRepositoryMock = $this->createMock(CustomerRepositoryInterface::class);

app/code/Magento/Customer/Test/Unit/Model/Webapi/ParamOverriderCustomerWebsiteIdTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ParamOverriderCustomerWebsiteIdTest extends TestCase
3838
/**
3939
* @inheritDoc
4040
*/
41-
protected function setUp()
41+
protected function setUp(): void
4242
{
4343
$this->userContextMock = $this->createMock(UserContextInterface::class);
4444
$this->customerRepositoryMock = $this->createMock(CustomerRepositoryInterface::class);

app/code/Magento/Sales/Api/Data/OrderInterface.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,10 @@ public function setCreatedAt($createdAt);
913913
/**
914914
* Gets the customer date-of-birth (DOB) for the order.
915915
*
916-
* @return string|null Customer date-of-birth (DOB).
916+
* @return string|null In keeping with current security and privacy best practices, be sure you are aware of any
917+
* potential legal and security risks associated with the storage of customers’ full date of birth
918+
* (month, day, year) along with other personal identifiers (e.g., full name) before collecting or processing
919+
* such data.
917920
*/
918921
public function getCustomerDob();
919922

app/code/Magento/SampleData/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ To deploy sample data from the GitHub repository:
5151

5252
## Install Sample Data
5353

54-
Once the sample data is deployed, it will be installed automatically when you install or upgrade your Magento instance either by using the Magento Setup Wizard or from the command line.
54+
Once the sample data is deployed, it will be installed automatically when you install or upgrade your Magento instance by using the command line.
5555

5656
## Uninstall Sample Data
5757

app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php

+6-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
namespace Magento\Theme\Test\Unit\Model\Design\Backend;
1010

11+
use Magento\Framework\Exception\LocalizedException;
1112
use Magento\Framework\Filesystem\Io\File as IoFile;
1213
use Magento\Theme\Model\Design\Backend\Image;
1314
use Magento\Framework\Filesystem\Directory\ReadFactory;
@@ -32,7 +33,7 @@ class ImageTest extends \PHPUnit\Framework\TestCase
3233
/**
3334
* @inheritdoc
3435
*/
35-
public function setUp()
36+
public function setUp(): void
3637
{
3738
$this->ioFileSystem = $this->getMockObject(IoFile::class);
3839
$this->tmpDirectory = $this->getMockObject(ReadFactory::class);
@@ -46,7 +47,7 @@ public function setUp()
4647
/**
4748
* @inheritdoc
4849
*/
49-
public function tearDown()
50+
public function tearDown(): void
5051
{
5152
unset($this->imageBackend);
5253
}
@@ -68,12 +69,12 @@ protected function getMockObject($class, $methods = [])
6869

6970
/**
7071
* Test for beforeSave method with invalid file extension.
71-
*
72-
* @expectedException \Magento\Framework\Exception\LocalizedException
73-
* @expectedExceptionMessage Invalid file provided.
7472
*/
7573
public function testBeforeSaveWithInvalidExtensionFile()
7674
{
75+
$this->expectException(LocalizedException::class);
76+
$this->expectExceptionMessage('Invalid file provided.');
77+
7778
$invalidFileName = 'fileName.invalidExtension';
7879
$this->imageBackend->setData(
7980
[

0 commit comments

Comments
 (0)