Skip to content

Commit cfc04a4

Browse files
[EngCom] Public Pull Requests - 2.3-develop
- merged latest code from mainline branch
2 parents e4ad133 + 2b27bc0 commit cfc04a4

File tree

251 files changed

+7341
-739
lines changed

Some content is hidden

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

251 files changed

+7341
-739
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ script:
6464

6565
# The scripts for grunt/phpunit type tests
6666
- if [ $TEST_SUITE == "functional" ]; then dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
67-
- if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js"] && [ $TEST_SUITE != "graphql-api-functional" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
67+
- if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js" ] && [ $TEST_SUITE != "graphql-api-functional" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
6868
- if [ $TEST_SUITE == "js" ]; then grunt $GRUNT_COMMAND; fi
6969
- if [ $TEST_SUITE == "graphql-api-functional" ]; then phpunit -c dev/tests/api-functional; fi

app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Error.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
namespace Magento\AdminNotification\Model\System\Message\Media\Synchronization;
88

99
/**
10+
* Media synchronization error message class.
11+
*
1012
* @api
1113
* @since 100.0.2
1214
*/
@@ -27,7 +29,7 @@ class Error extends \Magento\AdminNotification\Model\System\Message\Media\Abstra
2729
protected function _shouldBeDisplayed()
2830
{
2931
$data = $this->_syncFlag->getFlagData();
30-
return isset($data['has_errors']) && true == $data['has_errors'];
32+
return !empty($data['has_errors']);
3133
}
3234

3335
/**

app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Success.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
namespace Magento\AdminNotification\Model\System\Message\Media\Synchronization;
77

88
/**
9+
* Media synchronization success message class.
10+
*
911
* @api
1012
* @since 100.0.2
1113
*/
@@ -27,8 +29,8 @@ protected function _shouldBeDisplayed()
2729
{
2830
$state = $this->_syncFlag->getState();
2931
$data = $this->_syncFlag->getFlagData();
30-
$hasErrors = isset($data['has_errors']) && true == $data['has_errors'] ? true : false;
31-
return false == $hasErrors && \Magento\MediaStorage\Model\File\Storage\Flag::STATE_FINISHED == $state;
32+
$hasErrors = !empty($data['has_errors']);
33+
return !$hasErrors && \Magento\MediaStorage\Model\File\Storage\Flag::STATE_FINISHED == $state;
3234
}
3335

3436
/**

app/code/Magento/Analytics/Model/Cryptographer.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,12 @@ private function getInitializationVector()
129129
*/
130130
private function validateCipherMethod($cipherMethod)
131131
{
132-
$methods = openssl_get_cipher_methods();
132+
$methods = array_map(
133+
'strtolower',
134+
openssl_get_cipher_methods()
135+
);
136+
$cipherMethod = strtolower($cipherMethod);
137+
133138
return (false !== array_search($cipherMethod, $methods));
134139
}
135140
}

app/code/Magento/Analytics/ReportXml/DB/ColumnsResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function getColumns(SelectBuilder $selectBuilder, $entityConfig)
7676
$columnName = $this->nameResolver->getName($attributeData);
7777
if (isset($attributeData['function'])) {
7878
$prefix = '';
79-
if (isset($attributeData['distinct']) && $attributeData['distinct'] == true) {
79+
if (!empty($attributeData['distinct'])) {
8080
$prefix = ' DISTINCT ';
8181
}
8282
$expression = new ColumnValueExpression(

app/code/Magento/Analytics/Test/Unit/Model/ExportDataHandlerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function testPrepareExportData($isArchiveSourceDirectory)
191191
->with(
192192
$archiveSource,
193193
$archiveAbsolutePath,
194-
$isArchiveSourceDirectory ? true : false
194+
$isArchiveSourceDirectory
195195
);
196196

197197
$fileContent = 'Some text';
@@ -222,7 +222,7 @@ public function prepareExportDataDataProvider()
222222
{
223223
return [
224224
'Data source for archive is directory' => [true],
225-
'Data source for archive doesn\'t directory' => [false],
225+
'Data source for archive isn\'t directory' => [false],
226226
];
227227
}
228228

app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
namespace Magento\Backend\Block\Widget\Form\Element;
8+
79
/**
810
* Form element dependencies mapper
911
* Assumes that one element may depend on other element values.
1012
* Will toggle as "enabled" only if all elements it depends from toggle as true.
11-
*/
12-
namespace Magento\Backend\Block\Widget\Form\Element;
13-
14-
/**
13+
*
1514
* @api
1615
* @since 100.0.2
1716
*/
@@ -117,6 +116,7 @@ public function addConfigOptions(array $options)
117116

118117
/**
119118
* HTML output getter
119+
*
120120
* @return string
121121
*/
122122
protected function _toHtml()
@@ -139,7 +139,8 @@ protected function _toHtml()
139139
}
140140

141141
/**
142-
* Field dependences JSON map generator
142+
* Field dependencies JSON map generator
143+
*
143144
* @return string
144145
*/
145146
protected function _getDependsJson()

app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
namespace Magento\Backend\Block\Widget\Grid\Massaction;
88

99
use Magento\Backend\Block\Widget\Grid\Massaction\VisibilityCheckerInterface as VisibilityChecker;
10+
use Magento\Framework\Data\Collection\AbstractDb;
1011
use Magento\Framework\DataObject;
1112

1213
/**
@@ -52,7 +53,7 @@ public function __construct(
5253
}
5354

5455
/**
55-
* @return void
56+
* @inheritdoc
5657
*/
5758
protected function _construct()
5859
{
@@ -217,6 +218,7 @@ public function getGridJsObjectName()
217218
* Retrieve JSON string of selected checkboxes
218219
*
219220
* @return string
221+
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
220222
*/
221223
public function getSelectedJson()
222224
{
@@ -231,6 +233,7 @@ public function getSelectedJson()
231233
* Retrieve array of selected checkboxes
232234
*
233235
* @return string[]
236+
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
234237
*/
235238
public function getSelected()
236239
{
@@ -252,6 +255,8 @@ public function getApplyButtonHtml()
252255
}
253256

254257
/**
258+
* Get mass action javascript code.
259+
*
255260
* @return string
256261
*/
257262
public function getJavaScript()
@@ -268,6 +273,8 @@ public function getJavaScript()
268273
}
269274

270275
/**
276+
* Get grid ids in JSON format.
277+
*
271278
* @return string
272279
*/
273280
public function getGridIdsJson()
@@ -284,6 +291,11 @@ public function getGridIdsJson()
284291
$massActionIdField = $this->getParentBlock()->getMassactionIdField();
285292
}
286293

294+
if ($allIdsCollection instanceof AbstractDb) {
295+
$allIdsCollection->getSelect()->limit();
296+
$allIdsCollection->clear();
297+
}
298+
287299
$gridIds = $allIdsCollection->setPageSize(0)->getColumnValues($massActionIdField);
288300
if (!empty($gridIds)) {
289301
return join(",", $gridIds);
@@ -292,6 +304,8 @@ public function getGridIdsJson()
292304
}
293305

294306
/**
307+
* Get Html id.
308+
*
295309
* @return string
296310
*/
297311
public function getHtmlId()

app/code/Magento/Braintree/Test/Mftf/ActionGroup/AdminOrderBraintreeFillActionGroup.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@
1111
<actionGroup name="AdminOrderBraintreeFillActionGroup">
1212
<!--Select Braintree Payment method on Admin Order Create Page-->
1313
<click stepKey="chooseBraintree" selector="{{NewOrderSection.creditCardBraintree}}"/>
14-
<waitForPageLoad stepKey="waitForBraintreeConfigs" time="5"/>
14+
<waitForPageLoad stepKey="waitForBraintreeConfigs"/>
1515
<click stepKey="openCardTypes" selector="{{NewOrderSection.openCardTypes}}"/>
16-
<waitForPageLoad stepKey="waitForCardTypes" time="3"/>
16+
<waitForPageLoad stepKey="waitForCardTypes"/>
1717
<click stepKey="chooseCardType" selector="{{NewOrderSection.masterCard}}"/>
18-
<waitForPageLoad stepKey="waitForCardSelected" time="3"/>
18+
<waitForPageLoad stepKey="waitForCardSelected"/>
1919

2020
<!--Choose Master Card from drop-down list-->
2121
<switchToIFrame stepKey="switchToCardNumber" selector="{{NewOrderSection.cardFrame}}"/>
2222
<fillField stepKey="fillCardNumber" selector="{{NewOrderSection.creditCardNumber}}" userInput="{{PaymentAndShippingInfo.cardNumber}}"/>
23-
<waitForPageLoad stepKey="waitForFillCardNumber" time="1"/>
23+
<waitForPageLoad stepKey="waitForFillCardNumber"/>
2424
<switchToIFrame stepKey="switchBackFromCard"/>
2525

2626
<!--Fill expire date-->
2727
<switchToIFrame stepKey="switchToExpirationMonth" selector="{{NewOrderSection.monthFrame}}"/>
2828
<fillField stepKey="fillMonth" selector="{{NewOrderSection.expirationMonth}}" userInput="{{PaymentAndShippingInfo.month}}"/>
29-
<waitForPageLoad stepKey="waitForFillMonth" time="1"/>
29+
<waitForPageLoad stepKey="waitForFillMonth"/>
3030
<switchToIFrame stepKey="switchBackFromMonth"/>
3131
<switchToIFrame stepKey="switchToExpirationYear" selector="{{NewOrderSection.yearFrame}}"/>
3232
<fillField stepKey="fillYear" selector="{{NewOrderSection.expirationYear}}" userInput="{{PaymentAndShippingInfo.year}}"/>
33-
<waitForPageLoad stepKey="waitForFillYear" time="1"/>
33+
<waitForPageLoad stepKey="waitForFillYear"/>
3434
<switchToIFrame stepKey="switchBackFromYear"/>
3535

3636
<!--Fill CVW code-->

app/code/Magento/Braintree/Test/Mftf/Test/BraintreeCreditCardOnCheckoutTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<actionGroup ref="StorefrontFillCartDataActionGroup" stepKey="StorefrontFillCartDataActionGroup"/>
6666
<waitForPageLoad stepKey="waitForPageLoad4"/>
6767
<!--Place order-->
68-
<click selector="{{CheckoutPaymentSection.placeOrder}}"
68+
<click selector="{{BraintreeConfigurationPaymentSection.paymentMethodContainer}}{{CheckoutPaymentSection.placeOrder}}"
6969
stepKey="PlaceOrder"/>
7070
<waitForPageLoad stepKey="waitForPageLoad5"/>
7171

0 commit comments

Comments
 (0)