Skip to content

Commit

Permalink
Merge branch '2.3-develop' into feature/readme-logo
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelstz committed Nov 16, 2019
2 parents 799b989 + 6da226d commit a96ee8d
Show file tree
Hide file tree
Showing 1,100 changed files with 37,856 additions and 7,088 deletions.
7 changes: 2 additions & 5 deletions README.md
Expand Up @@ -5,9 +5,6 @@
</p>
<p align="center">
<br /><br />
<a href="https://travis-ci.org/magento/magento2">
<img src="https://travis-ci.org/magento/magento2.svg?branch=2.3-develop" alt="Build Status" />
</a>
<a href="https://www.codetriage.com/magento/magento2">
<img src="https://www.codetriage.com/magento/magento2/badges/users.svg" alt="Open Source Helpers" />
</a>
Expand All @@ -19,7 +16,7 @@
</a>
</p>

<h2>Welcome</h2>
## Welcome
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results.

## Magento System Requirements
Expand Down Expand Up @@ -48,7 +45,7 @@ To suggest documentation improvements, click [here][4].
[4]: https://devdocs.magento.com

<h3>Community Maintainers</h3>
The members of this team have been recognized for their outstanding commitment to maintaining and improving Magento. Magento has granted them permission to accept, merge, and reject pull requests, as well as review issues, and thanks these Community Maintainers for their valuable contributions.
The members of this team have been recognized for their outstanding commitment to maintaining and improving Magento. Magento has granted them permission to accept, merge, and reject pull requests, as well as review issues, and thanks to these Community Maintainers for their valuable contributions.

<a href="https://magento.com/magento-contributors#maintainers">
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/maintainers.png"/>
Expand Down
Expand Up @@ -85,7 +85,7 @@
<item name="text" xsi:type="string" translate="true"><![CDATA[
<p>Help us improve Magento Admin by allowing us to collect usage data.</p>
<p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin and related products and services.</p>
<p>You can learn more and opt out at any time by following the instructions in <a href="https://docs.magento.com/m2/ce/user_guide/stores/admin.html" target="_blank">merchant documentation</a>.</p>
<p>You can learn more and opt out at any time by following the instructions in <a href="https://docs.magento.com/m2/ce/user_guide/stores/admin.html" target="_blank" tabindex="0">merchant documentation</a>.</p>
]]></item>
</item>
</argument>
Expand Down
Expand Up @@ -20,16 +20,7 @@ define([
enableLogAction: '${ $.provider }:data.enableLogAction',
disableLogAction: '${ $.provider }:data.disableLogAction'
},
options: {
keyEventHandlers: {
/**
* Prevents escape key from exiting out of modal
*/
escapeKey: function () {
return;
}
}
},
options: {},
notificationWindow: null
},

Expand All @@ -41,11 +32,32 @@ define([
this._super();
},

/**
* Configure ESC and TAB so user can't leave modal
* without selecting an option
*
* @returns {Object} Chainable.
*/
initModalEvents: function () {
this._super();
//Don't allow ESC key to close modal
this.options.keyEventHandlers.escapeKey = this.handleEscKey.bind(this);
//Restrict tab action to the modal
this.options.keyEventHandlers.tabKey = this.handleTabKey.bind(this);

return this;
},

/**
* Once the modal is opened it hides the X
*/
onOpened: function () {
$('.modal-header button.action-close').hide();
$('.modal-header button.action-close').attr('disabled', true).hide();

this.focusableElements = $(this.rootSelector).find('a[href], button:enabled');
this.firstFocusableElement = this.focusableElements[0];
this.lastFocusableElement = this.focusableElements[this.focusableElements.length - 1];
this.firstFocusableElement.focus();
},

/**
Expand Down Expand Up @@ -104,11 +116,70 @@ define([
* Allows admin usage popup to be shown first and then new release notification
*/
openReleasePopup: function () {
var notifiModal = registry.get('release_notification.release_notification.notification_modal_1');
var notificationModalSelector = 'release_notification.release_notification.notification_modal_1';

if (analyticsPopupConfig.releaseVisible) {
notifiModal.initializeContentAfterAnalytics();
registry.get(notificationModalSelector).initializeContentAfterAnalytics();
}
},

/**
* Handle Tab and Shift+Tab key event
*
* Keep the tab actions restricted to the popup modal
* so the user must select an option to dismiss the modal
*/
handleTabKey: function (event) {
var modal = this,
KEY_TAB = 9;

/**
* Handle Shift+Tab to tab backwards
*/
function handleBackwardTab() {
if (document.activeElement === modal.firstFocusableElement ||
document.activeElement === $(modal.rootSelector)[0]
) {
event.preventDefault();
modal.lastFocusableElement.focus();
}
}

/**
* Handle Tab forward
*/
function handleForwardTab() {
if (document.activeElement === modal.lastFocusableElement) {
event.preventDefault();
modal.firstFocusableElement.focus();
}
}

switch (event.keyCode) {
case KEY_TAB:
if (modal.focusableElements.length === 1) {
event.preventDefault();
break;
}

if (event.shiftKey) {
handleBackwardTab();
break;
}
handleForwardTab();
break;
default:
break;
}
},

/**
* Handle Esc key
*
* Esc key should not close modal
*/
handleEscKey: function (event) {
event.preventDefault();
}
}
);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Analytics/Model/ExportDataHandler.php
Expand Up @@ -89,7 +89,7 @@ public function __construct(
public function prepareExportData()
{
try {
$tmpDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
$tmpDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::SYS_TMP);

$this->prepareDirectory($tmpDirectory, $this->getTmpFilesDirRelativePath());
$this->reportWriter->write($tmpDirectory, $this->getTmpFilesDirRelativePath());
Expand Down
Expand Up @@ -13,7 +13,7 @@
use Magento\Framework\Archive;
use Magento\Framework\Filesystem;
use Magento\Framework\Filesystem\Directory\WriteInterface;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Filesystem\DirectoryList;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;

class ExportDataHandlerTest extends \PHPUnit\Framework\TestCase
Expand Down Expand Up @@ -137,7 +137,7 @@ public function testPrepareExportData($isArchiveSourceDirectory)
$this->filesystemMock
->expects($this->once())
->method('getDirectoryWrite')
->with(DirectoryList::VAR_DIR)
->with(DirectoryList::SYS_TMP)
->willReturn($this->directoryMock);
$this->directoryMock
->expects($this->exactly(4))
Expand Down Expand Up @@ -238,7 +238,7 @@ public function testPrepareExportDataWithLocalizedException()
$this->filesystemMock
->expects($this->once())
->method('getDirectoryWrite')
->with(DirectoryList::VAR_DIR)
->with(DirectoryList::SYS_TMP)
->willReturn($this->directoryMock);
$this->reportWriterMock
->expects($this->once())
Expand Down
6 changes: 0 additions & 6 deletions app/code/Magento/Authorization/Model/Role.php
Expand Up @@ -52,9 +52,6 @@ public function __construct( //phpcs:ignore Generic.CodeAnalysis.UselessOverridi

/**
* @inheritDoc
*
* @SuppressWarnings(PHPMD.SerializationAware)
* @deprecated Do not use PHP serialization.
*/
public function __sleep()
{
Expand All @@ -64,9 +61,6 @@ public function __sleep()

/**
* @inheritDoc
*
* @SuppressWarnings(PHPMD.SerializationAware)
* @deprecated Do not use PHP serialization.
*/
public function __wakeup()
{
Expand Down

This file was deleted.

2 changes: 2 additions & 0 deletions app/code/Magento/AuthorizenetAcceptjs/Block/Form.php
Expand Up @@ -18,6 +18,8 @@
* Block for representing the payment form
*
* @api
* @deprecated Starting from Magento 2.3.4 Authorize.net payment method core integration is deprecated in favor of
* official payment integration available on the marketplace
*/
class Form extends Cc
{
Expand Down
2 changes: 2 additions & 0 deletions app/code/Magento/AuthorizenetAcceptjs/Block/Info.php
Expand Up @@ -15,6 +15,8 @@
* Translates the labels for the info block
*
* @api
* @deprecated Starting from Magento 2.3.4 Authorize.net payment method core integration is deprecated in favor of
* official payment integration available on the marketplace
*/
class Info extends ConfigurableInfo
{
Expand Down
2 changes: 2 additions & 0 deletions app/code/Magento/AuthorizenetAcceptjs/Block/Payment.php
Expand Up @@ -18,6 +18,8 @@
* Represents the payment block for the admin checkout form
*
* @api
* @deprecated Starting from Magento 2.3.4 Authorize.net payment method core integration is deprecated in favor of
* official payment integration available on the marketplace
*/
class Payment extends Template
{
Expand Down
Expand Up @@ -14,6 +14,9 @@

/**
* Chooses the best method of accepting the payment based on the status of the transaction
*
* @deprecated Starting from Magento 2.3.4 Authorize.net payment method core integration is deprecated in favor of
* official payment integration available on the marketplace
*/
class AcceptPaymentStrategyCommand implements CommandInterface
{
Expand Down
Expand Up @@ -20,6 +20,9 @@

/**
* Chooses the best method of capture based on the context of the payment
*
* @deprecated Starting from Magento 2.3.4 Authorize.net payment method core integration is deprecated in favor of
* official payment integration available on the marketplace
*/
class CaptureStrategyCommand implements CommandInterface
{
Expand Down
Expand Up @@ -17,6 +17,9 @@

/**
* Syncs the transaction status with authorize.net
*
* @deprecated Starting from Magento 2.3.4 Authorize.net payment method core integration is deprecated in favor of
* official payment integration available on the marketplace
*/
class FetchTransactionInfoCommand implements CommandInterface
{
Expand Down
Expand Up @@ -20,6 +20,9 @@

/**
* Makes a request to the gateway and returns results
*
* @deprecated Starting from Magento 2.3.4 Authorize.net payment method core integration is deprecated in favor of
* official payment integration available on the marketplace
*/
class GatewayQueryCommand implements CommandInterface
{
Expand Down
Expand Up @@ -14,6 +14,9 @@

/**
* Chooses the best method of returning the payment based on the status of the transaction
*
* @deprecated Starting from Magento 2.3.4 Authorize.net payment method core integration is deprecated in favor of
* official payment integration available on the marketplace
*/
class RefundTransactionStrategyCommand implements CommandInterface
{
Expand Down
16 changes: 3 additions & 13 deletions app/code/Magento/AuthorizenetAcceptjs/Gateway/Config.php
Expand Up @@ -13,6 +13,9 @@

/**
* Houses configuration for this gateway
*
* @deprecated Starting from Magento 2.3.4 Authorize.net payment method core integration is deprecated in favor of
* official payment integration available on the marketplace
*/
class Config extends \Magento\Payment\Gateway\Config\Config
{
Expand All @@ -33,19 +36,6 @@ class Config extends \Magento\Payment\Gateway\Config\Config
private const SOLUTION_ID_SANDBOX = 'AAA102993';
private const SOLUTION_ID_PRODUCTION = 'AAA175350';

/**
* @param ScopeConfigInterface $scopeConfig
* @param null|string $methodCode
* @param string $pathPattern
*/
public function __construct(
ScopeConfigInterface $scopeConfig,
$methodCode = null,
$pathPattern = self::DEFAULT_PATH_PATTERN
) {
parent::__construct($scopeConfig, $methodCode, $pathPattern);
}

/**
* Gets the login id
*
Expand Down
5 changes: 5 additions & 0 deletions app/code/Magento/AuthorizenetAcceptjs/Gateway/Http/Client.php
Expand Up @@ -21,6 +21,9 @@

/**
* A client that can communicate with the Authorize.net API
*
* @deprecated Starting from Magento 2.3.4 Authorize.net payment method core integration is deprecated in favor of
* official payment integration available on the marketplace
*/
class Client implements ClientInterface
{
Expand Down Expand Up @@ -109,10 +112,12 @@ public function placeRequest(TransferInterface $transferObject)
try {
$data = $this->json->unserialize($responseBody);
} catch (InvalidArgumentException $e) {
// phpcs:ignore Magento2.Exceptions.DirectThrow
throw new \Exception('Invalid JSON was returned by the gateway');
}

return $data;
// phpcs:ignore Magento2.Exceptions.ThrowCatch
} catch (\Exception $e) {
$this->logger->critical($e);

Expand Down

0 comments on commit a96ee8d

Please sign in to comment.