Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit b36dc04

Browse files
author
Janak Bhimani
authored
Merge pull request #7 from magento/2.3-develop
Update branch 2.3-develop
2 parents 927ca80 + 619f2db commit b36dc04

File tree

706 files changed

+16247
-5527
lines changed

Some content is hidden

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

706 files changed

+16247
-5527
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ atlassian*
3333
/.php_cs
3434
/.php_cs.cache
3535
/grunt-config.json
36-
/dev/tools/grunt/configs/local-themes.js
3736
/pub/media/*.*
3837
!/pub/media/.htaccess
3938
/pub/media/attribute/*

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ 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-
<h3>Labels applied by the Magento team</h3>
43-
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.
44-
Please review the <a href="https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#labels">Code Contributions guide</a> for detailed information on labels used in Magento 2 repositories.
42+
### Labels applied by the Magento team
43+
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.
44+
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-
<h2>Reporting security issues</h2>
46+
## Reporting security issues
4747

48-
To report security vulnerabilities in Magento software or web sites, please create a Bugcrowd researcher account <a href="https://bugcrowd.com/magento">there</a> to submit and follow-up your issue. Learn more about reporting security issues <a href="https://magento.com/security/reporting-magento-security-issue">here</a>.
48+
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

50-
Stay up-to-date on the latest security news and patches for Magento by signing up for <a href="https://magento.com/security/sign-up">Security Alert Notifications</a>.
50+
Stay up-to-date on the latest security news and patches for Magento by signing up for [Security Alert Notifications](https://magento.com/security/sign-up).
5151

52-
<h2>License</h2>
52+
## License
5353

5454
Each Magento source file included in this distribution is licensed under OSL 3.0 or the Magento Enterprise Edition (MEE) license.
5555

@@ -59,3 +59,13 @@ Please see [LICENSE.txt](https://github.com/magento/magento2/blob/2.3-develop/LI
5959
Subject to Licensee's payment of fees and compliance with the terms and conditions of the MEE License, the MEE License supersedes the OSL 3.0 license for each source file.
6060
Please see LICENSE_EE.txt for the full text of the MEE License or visit https://magento.com/legal/terms/enterprise.
6161

62+
## Community Engineering Slack
63+
64+
To connect with Magento and the Community, join us on the [Magento Community Engineering Slack](https://magentocommeng.slack.com). If you are interested in joining Slack, or a specific channel, send us request at [[email protected]](mailto:[email protected]) or [self signup](https://tinyurl.com/engcom-slack).
65+
66+
67+
We have channels for each project. These channels are recommended for new members:
68+
69+
- [general](https://magentocommeng.slack.com/messages/C4YS78WE6): Open chat for introductions and Magento 2 questions
70+
- [github](https://magentocommeng.slack.com/messages/C7KB93M32): Support for GitHub issues, pull requests, and processes
71+
- [public-backlog](https://magentocommeng.slack.com/messages/CCV3J3RV5): Discussions of the Magento 2 backlog

app/autoload.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
/* 'composer install' validation */
2929
if (file_exists($vendorAutoload)) {
3030
$composerAutoloader = include $vendorAutoload;
31+
} else if (file_exists("{$vendorDir}/autoload.php")) {
32+
$vendorAutoload = "{$vendorDir}/autoload.php";
33+
$composerAutoloader = include $vendorAutoload;
3134
} else {
3235
throw new \Exception(
3336
'Vendor autoload is not found. Please run \'composer install\' under application root directory.'

app/bootstrap.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
#ini_set('display_errors', 1);
1212

1313
/* PHP version validation */
14-
if (!defined('PHP_VERSION_ID') || !(PHP_VERSION_ID === 70002 || PHP_VERSION_ID === 70004 || PHP_VERSION_ID >= 70006)) {
14+
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 70103) {
1515
if (PHP_SAPI == 'cli') {
16-
echo 'Magento supports 7.0.2, 7.0.4, and 7.0.6 or later. ' .
17-
'Please read http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html';
16+
echo 'Magento supports PHP 7.1.3 or later. ' .
17+
'Please read https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html';
1818
} else {
1919
echo <<<HTML
2020
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
21-
<p>Magento supports PHP 7.0.2, 7.0.4, and 7.0.6 or later. Please read
22-
<a target="_blank" href="http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html">
21+
<p>Magento supports PHP 7.1.3 or later. Please read
22+
<a target="_blank" href="https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html">
2323
Magento System Requirements</a>.
2424
</div>
2525
HTML;

app/code/Magento/AdminNotification/Model/ResourceModel/Inbox.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
namespace Magento\AdminNotification\Model\ResourceModel;
77

88
/**
9+
* Inbox resource model
10+
*
911
* @api
1012
* @since 100.0.2
1113
*/
@@ -77,8 +79,7 @@ public function getNoticeStatus(\Magento\AdminNotification\Model\Inbox $object)
7779
'is_read=?',
7880
0
7981
);
80-
$return = $connection->fetchPairs($select);
81-
return $return;
82+
return $connection->fetchPairs($select);
8283
}
8384

8485
/**

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<severity value="MAJOR"/>
1818
<testCaseId value="MAGETWO-63898"/>
1919
<group value="analytics"/>
20-
<skip>
21-
<issueId value="MAGETWO-96223"/>
22-
</skip>
2320
</annotations>
2421

2522
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Authorizenet\Block\Adminhtml\Order\View\Info;
9+
10+
use Magento\Framework\Phrase;
11+
use Magento\Payment\Block\ConfigurableInfo;
12+
13+
/**
14+
* Payment information block for Authorize.net payment method
15+
*/
16+
class PaymentDetails extends ConfigurableInfo
17+
{
18+
/**
19+
* Returns localized label for payment info block
20+
*
21+
* @param string $field
22+
* @return string | Phrase
23+
*/
24+
protected function getLabel($field)
25+
{
26+
return __($field);
27+
}
28+
}

app/code/Magento/Authorizenet/Model/Directpost.php

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Directpost extends \Magento\Authorizenet\Model\Authorizenet implements Tra
2727
/**
2828
* @var string
2929
*/
30-
protected $_infoBlockType = \Magento\Payment\Block\Info::class;
30+
protected $_infoBlockType = \Magento\Authorizenet\Block\Adminhtml\Order\View\Info\PaymentDetails::class;
3131

3232
/**
3333
* Payment Method feature
@@ -371,8 +371,7 @@ public function void(\Magento\Payment\Model\InfoInterface $payment)
371371
}
372372

373373
/**
374-
* Refund the amount
375-
* Need to decode last 4 digits for request.
374+
* Refund the amount need to decode last 4 digits for request.
376375
*
377376
* @param \Magento\Framework\DataObject|\Magento\Payment\Model\InfoInterface $payment
378377
* @param float $amount
@@ -626,6 +625,14 @@ protected function fillPaymentByResponse(\Magento\Framework\DataObject $payment)
626625
$payment->setIsTransactionPending(true)
627626
->setIsFraudDetected(true);
628627
}
628+
629+
$additionalInformationKeys = explode(',', $this->getValue('paymentInfoKeys'));
630+
foreach ($additionalInformationKeys as $paymentInfoKey) {
631+
$paymentInfoValue = $response->getDataByKey($paymentInfoKey);
632+
if ($paymentInfoValue !== null) {
633+
$payment->setAdditionalInformation($paymentInfoKey, $paymentInfoValue);
634+
}
635+
}
629636
}
630637

631638
/**
@@ -682,6 +689,7 @@ protected function matchAmount($amount)
682689

683690
/**
684691
* Operate with order using information from Authorize.net.
692+
*
685693
* Authorize order or authorize and capture it.
686694
*
687695
* @param \Magento\Sales\Model\Order $order
@@ -858,7 +866,7 @@ public function getConfigInterface()
858866
* Getter for specified value according to set payment method code
859867
*
860868
* @param mixed $key
861-
* @param null $storeId
869+
* @param int|string|null|\Magento\Store\Model\Store $storeId
862870
* @return mixed
863871
*/
864872
public function getValue($key, $storeId = null)
@@ -918,10 +926,12 @@ public function fetchTransactionInfo(\Magento\Payment\Model\InfoInterface $payme
918926
$payment->setIsTransactionDenied(true);
919927
}
920928
$this->addStatusCommentOnUpdate($payment, $response, $transactionId);
921-
return [];
929+
return $response->getData();
922930
}
923931

924932
/**
933+
* Add statuc comment on update.
934+
*
925935
* @param \Magento\Sales\Model\Order\Payment $payment
926936
* @param \Magento\Framework\DataObject $response
927937
* @param string $transactionId
@@ -996,8 +1006,9 @@ protected function getTransactionResponse($transactionId)
9961006
}
9971007

9981008
/**
999-
* @return \Psr\Log\LoggerInterface
1009+
* Get psr logger.
10001010
*
1011+
* @return \Psr\Log\LoggerInterface
10011012
* @deprecated 100.1.0
10021013
*/
10031014
private function getPsrLogger()
@@ -1038,7 +1049,9 @@ private function getOrderIncrementId(): string
10381049
}
10391050

10401051
/**
1041-
* Checks if filter action is Report Only. Transactions that trigger this filter are processed as normal,
1052+
* Checks if filter action is Report Only.
1053+
*
1054+
* Transactions that trigger this filter are processed as normal,
10421055
* but are also reported in the Merchant Interface as triggering this filter.
10431056
*
10441057
* @param string $fdsFilterAction

app/code/Magento/Authorizenet/etc/config.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<cgi_url>https://secure.authorize.net/gateway/transact.dll</cgi_url>
3333
<cgi_url_td_test_mode>https://apitest.authorize.net/xml/v1/request.api</cgi_url_td_test_mode>
3434
<cgi_url_td>https://api2.authorize.net/xml/v1/request.api</cgi_url_td>
35+
<paymentInfoKeys>x_card_type,x_account_number,x_avs_code,x_auth_code,x_response_reason_text,x_cvv2_resp_code</paymentInfoKeys>
3536
</authorizenet_directpost>
3637
</payment>
3738
</default>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,9 @@
3535
</argument>
3636
</arguments>
3737
</type>
38+
<type name="Magento\Authorizenet\Block\Adminhtml\Order\View\Info\PaymentDetails">
39+
<arguments>
40+
<argument name="config" xsi:type="object">Magento\Authorizenet\Model\Directpost</argument>
41+
</arguments>
42+
</type>
3843
</config>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,9 @@ Debug,Debug
6767
"Minimum Order Total","Minimum Order Total"
6868
"Maximum Order Total","Maximum Order Total"
6969
"Sort Order","Sort Order"
70+
"x_card_type","Credit Card Type"
71+
"x_account_number", "Credit Card Number"
72+
"x_avs_code","AVS Response Code"
73+
"x_auth_code","Processor Authentication Code"
74+
"x_response_reason_text","Processor Response Text"
75+
"x_cvv2_resp_code","CVV2 Response Code"

app/code/Magento/Authorizenet/view/adminhtml/templates/order/view/info/fraud_details.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ $fraudDetails = $payment->getAdditionalInformation('fraud_details');
4444
<?php endif; ?>
4545

4646
<?php if(!empty($fraudDetails['fraud_filters'])): ?>
47-
<b><?= $block->escapeHtml(__('Fraud Filters')) ?>:
48-
</b></br>
47+
<strong><?= $block->escapeHtml(__('Fraud Filters')) ?>:
48+
</strong></br>
4949
<?php foreach($fraudDetails['fraud_filters'] as $filter): ?>
5050
<?= $block->escapeHtml($filter['name']) ?>:
5151
<?= $block->escapeHtml($filter['action']) ?>

app/code/Magento/Authorizenet/view/frontend/requirejs-config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
var config = {
77
map: {
88
'*': {
9-
transparent: 'Magento_Payment/js/transparent'
9+
transparent: 'Magento_Payment/js/transparent',
10+
'Magento_Payment/transparent': 'Magento_Payment/js/transparent'
1011
}
1112
}
1213
};

app/code/Magento/Backend/Block/Page/Footer.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(
4040
}
4141

4242
/**
43-
* @return void
43+
* @inheritdoc
4444
*/
4545
protected function _construct()
4646
{
@@ -57,4 +57,12 @@ public function getMagentoVersion()
5757
{
5858
return $this->productMetadata->getVersion();
5959
}
60+
61+
/**
62+
* @inheritdoc
63+
*/
64+
protected function getCacheLifetime()
65+
{
66+
return 3600 * 24 * 10;
67+
}
6068
}

app/code/Magento/Backend/Block/System/Store/Delete/Form.php

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,35 @@
55
*/
66
namespace Magento\Backend\Block\System\Store\Delete;
77

8+
use Magento\Backup\Helper\Data as BackupHelper;
9+
use Magento\Framework\App\ObjectManager;
10+
811
/**
912
* Adminhtml cms block edit form
1013
*
1114
* @author Magento Core Team <[email protected]>
1215
*/
1316
class Form extends \Magento\Backend\Block\Widget\Form\Generic
1417
{
18+
/**
19+
* @var BackupHelper
20+
*/
21+
private $backup;
22+
23+
/**
24+
* @inheritDoc
25+
*/
26+
public function __construct(
27+
\Magento\Backend\Block\Template\Context $context,
28+
\Magento\Framework\Registry $registry,
29+
\Magento\Framework\Data\FormFactory $formFactory,
30+
array $data = [],
31+
?BackupHelper $backup = null
32+
) {
33+
parent::__construct($context, $registry, $formFactory, $data);
34+
$this->backup = $backup ?? ObjectManager::getInstance()->get(BackupHelper::class);
35+
}
36+
1537
/**
1638
* Init form
1739
*
@@ -25,7 +47,7 @@ protected function _construct()
2547
}
2648

2749
/**
28-
* {@inheritdoc}
50+
* @inheritDoc
2951
*/
3052
protected function _prepareForm()
3153
{
@@ -45,15 +67,21 @@ protected function _prepareForm()
4567

4668
$fieldset->addField('item_id', 'hidden', ['name' => 'item_id', 'value' => $dataObject->getId()]);
4769

70+
$backupOptions = ['0' => __('No')];
71+
$backupSelected = '0';
72+
if ($this->backup->isEnabled()) {
73+
$backupOptions['1'] = __('Yes');
74+
$backupSelected = '1';
75+
}
4876
$fieldset->addField(
4977
'create_backup',
5078
'select',
5179
[
5280
'label' => __('Create DB Backup'),
5381
'title' => __('Create DB Backup'),
5482
'name' => 'create_backup',
55-
'options' => ['1' => __('Yes'), '0' => __('No')],
56-
'value' => '1'
83+
'options' => $backupOptions,
84+
'value' => $backupSelected
5785
]
5886
);
5987

app/code/Magento/Backend/Controller/Adminhtml/System/Store.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* Store controller
1515
*
1616
* @author Magento Core Team <[email protected]>
17+
* @SuppressWarnings(PHPMD.AllPurposeAction)
1718
*/
1819
abstract class Store extends Action
1920
{
@@ -86,6 +87,8 @@ protected function createPage()
8687
* Backup database
8788
*
8889
* @return bool
90+
*
91+
* @deprecated Backup module is to be removed.
8992
*/
9093
protected function _backupDatabase()
9194
{

app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginAsAdminActionGroup.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313
<argument name="adminUser" defaultValue="_ENV"/>
1414
</arguments>
1515
<amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/>
16-
<waitForPageLoad stepKey="waitForAdminLoginPageLoad"/>
1716
<fillField selector="{{AdminLoginFormSection.username}}" userInput="{{adminUser.MAGENTO_ADMIN_USERNAME}}" stepKey="fillUsername"/>
1817
<fillField selector="{{AdminLoginFormSection.password}}" userInput="{{adminUser.MAGENTO_ADMIN_PASSWORD}}" stepKey="fillPassword"/>
1918
<click selector="{{AdminLoginFormSection.signIn}}" stepKey="clickLogin"/>
2019
<closeAdminNotification stepKey="closeAdminNotification"/>
2120
</actionGroup>
22-
</actionGroups>
21+
</actionGroups>

0 commit comments

Comments
 (0)