Skip to content

Commit 9ed7081

Browse files
author
Oleksii Korshenko
authored
Merge pull request #1622 from magento-engcom/develop-prs
Public Pull Requests #11371 Magento UI - Cleanup of undefined mixins parameters and usage of "leaking" variables scope by @Igloczek #11679 MAGETWO-77673: in system.xml translate phrase not work, if comment starts from new line[port from 2.2-develop] by @nmalevanec #11652 [TASK] Moved Customer Groups Menu Item from Other settings to Customers by @lewisvoncken #11665 Fix app/code/Magento/Backend/Block/Media/Uploader.php getConfigJson() method by @adrian-martinez-interactiv4 #11663 Clean unreachable code in creditmemo model by @adrian-martinez-interactiv4 #11666 testGetIgnoresFirstSlash method in ObjectManagerTest has lost its purpose (dummy test) by @adrian-martinez-interactiv4 #11667 Travis: surround variable TRAVIS_BRANCH with double-quotes instead of single-quotes by @adrian-martinez-interactiv4 #11452 #11328 : app:config:dump adds extra space every time in multiline array value by @adrian-martinez-interactiv4 Fixed Public Issues #7767 in system.xml translate phrase not work #11328 app:config:dump adds extra space every time in multiline array value
2 parents 641d68f + f46c576 commit 9ed7081

File tree

19 files changed

+101
-96
lines changed

19 files changed

+101
-96
lines changed

app/code/Magento/Backend/Block/Media/Uploader.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Backend\Block\Media;
77

8+
use Magento\Framework\App\ObjectManager;
9+
810
/**
911
* Adminhtml media library uploader
1012
* @api
@@ -27,16 +29,25 @@ class Uploader extends \Magento\Backend\Block\Widget
2729
*/
2830
protected $_fileSizeService;
2931

32+
/**
33+
* @var \Magento\Framework\Json\EncoderInterface
34+
*/
35+
protected $_jsonEncoder;
36+
3037
/**
3138
* @param \Magento\Backend\Block\Template\Context $context
3239
* @param \Magento\Framework\File\Size $fileSize
3340
* @param array $data
41+
* @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
3442
*/
3543
public function __construct(
3644
\Magento\Backend\Block\Template\Context $context,
3745
\Magento\Framework\File\Size $fileSize,
38-
array $data = []
46+
array $data = [],
47+
\Magento\Framework\Json\EncoderInterface $jsonEncoder = null
3948
) {
49+
$this->_jsonEncoder = $jsonEncoder ?:
50+
ObjectManager::getInstance()->get(\Magento\Framework\Json\EncoderInterface::class);
4051
$this->_fileSizeService = $fileSize;
4152
parent::__construct($context, $data);
4253
}
@@ -107,7 +118,7 @@ public function getJsObjectName()
107118
*/
108119
public function getConfigJson()
109120
{
110-
return $this->_coreData->jsonEncode($this->getConfig()->getData());
121+
return $this->_jsonEncoder->encode($this->getConfig()->getData());
111122
}
112123

113124
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
<add id="Magento_Customer::customer" title="Customers" translate="title" module="Magento_Customer" sortOrder="30" resource="Magento_Customer::customer"/>
1111
<add id="Magento_Customer::customer_manage" title="All Customers" translate="title" module="Magento_Customer" sortOrder="10" parent="Magento_Customer::customer" action="customer/index/" resource="Magento_Customer::manage"/>
1212
<add id="Magento_Customer::customer_online" title="Now Online" translate="title" module="Magento_Customer" sortOrder="30" parent="Magento_Customer::customer" action="customer/online/" resource="Magento_Customer::online"/>
13-
<add id="Magento_Customer::customer_group" title="Customer Groups" translate="title" module="Magento_Customer" sortOrder="50" parent="Magento_Backend::other_settings" action="customer/group" resource="Magento_Customer::group"/>
13+
<add id="Magento_Customer::customer_group" title="Customer Groups" translate="title" module="Magento_Customer" sortOrder="50" parent="Magento_Customer::customer" action="customer/group" resource="Magento_Customer::group"/>
1414
</menu>
1515
</config>

app/code/Magento/Sales/Model/Order/Creditmemo.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -412,23 +412,6 @@ public function canCancel()
412412
public function canVoid()
413413
{
414414
return false;
415-
$canVoid = false;
416-
if ($this->getState() == self::STATE_REFUNDED) {
417-
$canVoid = $this->getCanVoidFlag();
418-
/**
419-
* If we not retrieve negative answer from payment yet
420-
*/
421-
if (is_null($canVoid)) {
422-
$canVoid = $this->getOrder()->getPayment()->canVoid();
423-
if ($canVoid === false) {
424-
$this->setCanVoidFlag(false);
425-
$this->_saveBeforeDestruct = true;
426-
}
427-
} else {
428-
$canVoid = (bool)$canVoid;
429-
}
430-
}
431-
return $canVoid;
432415
}
433416

434417
/**

dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerGroupEntityTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* Test Flow:
1818
* 1.Log in to backend as admin user.
19-
* 2.Navigate to Stores>Other Settings>Customer Groups.
19+
* 2.Navigate to Customers > Customer Groups.
2020
* 3.Start to create new Customer Group.
2121
* 4.Fill in all data according to data set.
2222
* 5.Click "Save Customer Group" button.

dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerGroupEntityTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* 2. Customer is created and assigned to this group.
1919
* Steps:
2020
* 1. Log in to backend as admin user.
21-
* 2. Navigate to Stores > Other Settings > Customer Groups.
21+
* 2. Navigate to Customers > Customer Groups.
2222
* 3. Click on Customer Group from grid.
2323
* 4. Click on Delete "Customer Group".
2424
* 5. Confirm in pop-up.

dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteSystemCustomerGroupTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Steps:
1515
* 1. Login to backend as admin user.
16-
* 2. Navigate to Stores > Other Settings > Customer Groups.
16+
* 2. Navigate to Customers > Customer Groups.
1717
* 3. Select system Customer Group specified in data set from grid.
1818
* 4. Perform all assertions.
1919
*

dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/NavigateMenuTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<constraint name="Magento\Backend\Test\Constraint\AssertBackendPageIsAvailable"/>
1919
</variation>
2020
<variation name="NavigateMenuTest24">
21-
<data name="menuItem" xsi:type="string">Stores > Customer Groups</data>
21+
<data name="menuItem" xsi:type="string">Customers > Customer Groups</data>
2222
<data name="pageTitle" xsi:type="string">Customer Groups</data>
2323
<constraint name="Magento\Backend\Test\Constraint\AssertBackendPageIsAvailable"/>
2424
</variation>

dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerGroupEntityTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* 1. Customer Group is created
2020
* Steps:
2121
* 1. Log in to backend as admin user
22-
* 2. Navigate to Stores > Other Settings > Customer Groups
22+
* 2. Navigate to Customers > Customer Groups
2323
* 3. Click on Customer Group from grid
2424
* 4. Update data according to data set
2525
* 5. Click "Save Customer Group" button

dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/VerifyDisabledCustomerGroupFieldTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Steps:
1515
* 1. Login to backend as admin user.
16-
* 2. Navigate to Stores > Other Settings > Customer Groups.
16+
* 2. Navigate to Customers > Customer Groups.
1717
* 3. Select system Customer Group specified in data set from grid.
1818
* 4. Perform all assertions.
1919
*

dev/travis/before_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ case $TEST_SUITE in
7171
--output-file="$changed_files_ce" \
7272
--base-path="$TRAVIS_BUILD_DIR" \
7373
--repo='https://github.com/magento/magento2.git' \
74-
--branch='$TRAVIS_BRANCH'
74+
--branch="$TRAVIS_BRANCH"
7575
cat "$changed_files_ce" | sed 's/^/ + including /'
7676

7777
cd ../../..

lib/internal/Magento/Framework/App/DeploymentConfig/Writer/PhpFormatter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@ class PhpFormatter implements FormatterInterface
2121
public function format($data, array $comments = [])
2222
{
2323
if (!empty($comments) && is_array($data)) {
24-
return "<?php\nreturn array (\n" . $this->formatData($data, $comments, ' ') . "\n);\n";
24+
return "<?php\nreturn array (\n" . $this->formatData($data, $comments) . "\n);\n";
2525
}
2626
return "<?php\nreturn " . var_export($data, true) . ";\n";
2727
}
2828

2929
/**
3030
* Format supplied data
3131
*
32-
* @param $data
33-
* @param $comments
32+
* @param string[] $data
33+
* @param string[] $comments
3434
* @param string $prefix
3535
* @return string
3636
*/
37-
protected function formatData($data, $comments, $prefix = '')
37+
private function formatData($data, $comments = [], $prefix = ' ')
3838
{
3939
$elements = [];
4040

lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfig/Writer/PhpFormatterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class PhpFormatterTest extends \PHPUnit\Framework\TestCase
1111
{
1212
/**
1313
* @dataProvider formatWithCommentDataProvider
14-
* @param string|array $data
15-
* @param array $comments
14+
* @param string[] $data
15+
* @param string[] $comments
1616
* @param string $expectedResult
1717
*/
1818
public function testFormat($data, $comments, $expectedResult)

lib/internal/Magento/Framework/ObjectManager/Test/Unit/ObjectManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ public function testGetIgnoresFirstSlash()
400400
{
401401
$this->assertSame(
402402
$this->_object->get(\Magento\Test\Di\Child::class),
403-
$this->_object->get(\Magento\Test\Di\Child::class)
403+
$this->_object->get('\\' . \Magento\Test\Di\Child::class)
404404
);
405405
}
406406
}

lib/web/css/source/lib/_icons.less

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@
285285
.lib-icon-text-hide();
286286
}
287287

288+
._lib-icon-image-url(@_path) when not (@_path = false) {
289+
.lib-css(background-image, url(@_path));
290+
}
291+
288292
._lib-icon-image(
289293
@_icon-image,
290294
@_icon-image-width,
@@ -294,9 +298,7 @@
294298
@_icon-image-position-x,
295299
@_icon-image-position-y
296300
) {
297-
.lib-url-check(@_icon-image);
298-
299-
.lib-css(background-image, @lib-url-check-output); // @lib-url-check-output is a returned variable of .lib-url-check() mixin
301+
._lib-icon-image-url(@_icon-image);
300302
.lib-css(background-position-x, @_icon-image-position-x);
301303
.lib-css(background-position-y, @_icon-image-position-y);
302304
.lib-css(line-height, @_icon-image-height);

0 commit comments

Comments
 (0)