Skip to content

Commit b771a6b

Browse files
authored
Merge pull request #4071 from magento-obsessive-owls/owls-delivery
2 parents b9e1434 + 8becdc7 commit b771a6b

File tree

37 files changed

+143
-75
lines changed

37 files changed

+143
-75
lines changed

app/code/Magento/Braintree/view/frontend/templates/paypal/button.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @var \Magento\Braintree\Block\Paypal\Button $block
99
*/
1010

11-
$id = $block->getContainerId() . mt_rand();
11+
$id = $block->getContainerId() . random_int(0, PHP_INT_MAX);
1212

1313
$config = [
1414
'Magento_Braintree/js/paypal/button' => [

app/code/Magento/Paypal/etc/frontend/di.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<arguments>
4141
<argument name="secureUrlList" xsi:type="array">
4242
<item name="paypal_billing" xsi:type="string">/paypal/billing/</item>
43+
<item name="paypal_billing_agreement" xsi:type="string">/paypal/billing_agreement/</item>
4344
<item name="paypal_bml" xsi:type="string">/paypal/bml/</item>
4445
<item name="paypal_hostedpro" xsi:type="string">/paypal/hostedpro/</item>
4546
<item name="paypal_ipn" xsi:type="string">/paypal/ipn/</item>

app/code/Magento/SalesRule/Model/Coupon/Codegenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function generateCode()
3838
$length = $this->getActualLength();
3939
$code = '';
4040
for ($i = 0, $indexMax = strlen($alphabet) - 1; $i < $length; ++$i) {
41-
$code .= substr($alphabet, mt_rand(0, $indexMax), 1);
41+
$code .= substr($alphabet, random_int(0, $indexMax), 1);
4242
}
4343

4444
return $code;
@@ -54,7 +54,7 @@ protected function getActualLength()
5454
$lengthMin = $this->getLengthMin() ? $this->getLengthMin() : static::DEFAULT_LENGTH_MIN;
5555
$lengthMax = $this->getLengthMax() ? $this->getLengthMax() : static::DEFAULT_LENGTH_MAX;
5656

57-
return $this->getLength() ? $this->getLength() : mt_rand($lengthMin, $lengthMax);
57+
return $this->getLength() ? $this->getLength() : random_int($lengthMin, $lengthMax);
5858
}
5959

6060
/**

app/code/Magento/Search/Model/ResourceModel/SynonymReader.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,10 @@ protected function _construct()
8585
*/
8686
private function queryByPhrase($phrase)
8787
{
88-
$phrase = $this->fullTextSelect->removeSpecialCharacters($phrase);
8988
$matchQuery = $this->fullTextSelect->getMatchQuery(
9089
['synonyms' => 'synonyms'],
9190
$phrase,
92-
Fulltext::FULLTEXT_MODE_BOOLEAN
91+
Fulltext::FULLTEXT_MODE_NATURAL
9392
);
9493
$query = $this->getConnection()->select()->from(
9594
$this->getMainTable()

app/code/Magento/Vault/etc/frontend/di.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,11 @@
2323
<plugin name="ProcessPaymentVaultConfiguration" type="Magento\Vault\Plugin\PaymentVaultConfigurationProcess"/>
2424
<plugin name="ProcessPaymentConfiguration" disabled="true"/>
2525
</type>
26+
<type name="Magento\Framework\Url\SecurityInfo">
27+
<arguments>
28+
<argument name="secureUrlList" xsi:type="array">
29+
<item name="vault" xsi:type="string">/vault/</item>
30+
</argument>
31+
</arguments>
32+
</type>
2633
</config>

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
"ext-mbstring": "*",
6565
"ext-openssl": "*",
6666
"ext-zip": "*",
67-
"sjparkinson/static-review": "~4.1"
67+
"sjparkinson/static-review": "~4.1",
68+
"paragonie/random_compat": ">=1 <9.99"
6869
},
6970
"require-dev": {
7071
"phpunit/phpunit": "4.1.0",

composer.lock

Lines changed: 50 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/api-functional/testsuite/Magento/Customer/Api/GroupRepositoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ public function testSearchGroupsDataProvider()
867867
return [
868868
['tax_class_id', 3, []],
869869
['tax_class_id', 0, null],
870-
['code', md5(mt_rand(0, 10000000000) . time()), null],
870+
['code', md5(random_int(0, 10000000000) . time()), null],
871871
[
872872
'id',
873873
0,

dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/CustomOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(
4545

4646
if (isset($data['dataset']) && isset($this->params['repository'])) {
4747
$this->data = $repositoryFactory->get($this->params['repository'])->get($data['dataset']);
48-
$this->data = $this->replaceData($this->data, mt_rand());
48+
$this->data = $this->replaceData($this->data, random_int(0, PHP_INT_MAX));
4949
$this->customOptions = $this->data;
5050
}
5151
if (isset($data['import_products'])) {

dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct/ConfigurableAttributesData.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ protected function addVariationMatrix(array $variationsMatrix, array $attribute,
325325

326326
/* If empty matrix add one empty row */
327327
if (empty($variationsMatrix)) {
328-
$variationIsolation = mt_rand(10000, 70000);
328+
$variationIsolation = random_int(10000, 70000);
329329
$variationsMatrix = [
330330
[
331331
'name' => "In configurable product {$variationIsolation}",
@@ -335,7 +335,7 @@ protected function addVariationMatrix(array $variationsMatrix, array $attribute,
335335
}
336336

337337
foreach ($variationsMatrix as $rowKey => $row) {
338-
$randIsolation = mt_rand(1, 100);
338+
$randIsolation = random_int(1, 100);
339339
$rowName = $row['name'];
340340
$rowSku = $row['sku'];
341341
$index = 1;

0 commit comments

Comments
 (0)