Skip to content

Commit

Permalink
Merge branch '2.3-develop' of github.com:magento/magento2 into 2.3-de…
Browse files Browse the repository at this point in the history
…velop#911
  • Loading branch information
XxXgeoXxX committed Sep 27, 2019
2 parents 2c4adbf + ea71192 commit d167013
Show file tree
Hide file tree
Showing 685 changed files with 24,982 additions and 5,395 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a

* [Installation Guide](https://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html).

## Learn More About GraphQL in Magento 2

* [GraphQL Developer Guide](https://devdocs.magento.com/guides/v2.3/graphql/index.html)

<h2>Contributing to the Magento 2 Code Base</h2>
Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes, optimizations, or just good suggestions.

Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/AdminNotification/etc/db_schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
<table name="adminnotification_inbox" resource="default" engine="innodb" comment="Adminnotification Inbox">
<column xsi:type="int" name="notification_id" padding="10" unsigned="true" nullable="false" identity="true"
comment="Notification id"/>
comment="Notification ID"/>
<column xsi:type="smallint" name="severity" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Problem type"/>
<column xsi:type="timestamp" name="date_added" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
Expand All @@ -35,7 +35,7 @@
</index>
</table>
<table name="admin_system_messages" resource="default" engine="innodb" comment="Admin System Messages">
<column xsi:type="varchar" name="identity" nullable="false" length="100" comment="Message id"/>
<column xsi:type="varchar" name="identity" nullable="false" length="100" comment="Message ID"/>
<column xsi:type="smallint" name="severity" padding="5" unsigned="true" nullable="false" identity="false"
default="0" comment="Problem type"/>
<column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*/
namespace Magento\AdvancedPricingImportExport\Model\Export;

use Magento\ImportExport\Model\Export;
use Magento\Store\Model\Store;
use Magento\CatalogImportExport\Model\Import\Product as ImportProduct;
use Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing as ImportAdvancedPricing;
use Magento\Catalog\Model\Product as CatalogProduct;
use Magento\CatalogImportExport\Model\Import\Product as ImportProduct;
use Magento\ImportExport\Model\Export;
use Magento\Store\Model\Store;

/**
* Export Advanced Pricing
Expand Down Expand Up @@ -150,6 +150,8 @@ public function __construct(
}

/**
* Init type models
*
* @return $this
* @throws \Magento\Framework\Exception\LocalizedException
*/
Expand All @@ -172,7 +174,9 @@ protected function initTypeModels()
}
if ($model->isSuitable()) {
$this->_productTypeModels[$productTypeName] = $model;
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
$this->_disabledAttrs = array_merge($this->_disabledAttrs, $model->getDisabledAttrs());
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
$this->_indexValueAttributes = array_merge(
$this->_indexValueAttributes,
$model->getIndexValueAttributes()
Expand All @@ -197,6 +201,7 @@ protected function initTypeModels()
public function export()
{
//Execution time may be very long
// phpcs:ignore Magento2.Functions.DiscouragedFunction
set_time_limit(0);

$writer = $this->getWriter();
Expand Down Expand Up @@ -234,16 +239,6 @@ public function filterAttributeCollection(\Magento\Eav\Model\ResourceModel\Entit

foreach ($collection as $attribute) {
if (in_array($attribute->getAttributeCode(), $this->_disabledAttrs)) {
if (isset($this->_parameters[\Magento\ImportExport\Model\Export::FILTER_ELEMENT_SKIP])) {
if ($attribute->getAttributeCode() == ImportAdvancedPricing::COL_TIER_PRICE
&& in_array(
$attribute->getId(),
$this->_parameters[\Magento\ImportExport\Model\Export::FILTER_ELEMENT_SKIP]
)
) {
$this->_passTierPrice = 1;
}
}
$collection->removeItemByKey($attribute->getId());
}
}
Expand Down Expand Up @@ -363,6 +358,7 @@ private function prepareExportData(
$linkedTierPricesData = [];
foreach ($tierPricesData as $tierPriceData) {
$sku = $productLinkIdToSkuMap[$tierPriceData['product_link_id']];
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
$linkedTierPricesData[] = array_merge(
$tierPriceData,
[ImportAdvancedPricing::COL_SKU => $sku]
Expand Down Expand Up @@ -471,7 +467,7 @@ private function fetchTierPrices(array $productIds): array
ImportAdvancedPricing::COL_TIER_PRICE_QTY => 'ap.qty',
ImportAdvancedPricing::COL_TIER_PRICE => 'ap.value',
ImportAdvancedPricing::COL_TIER_PRICE_PERCENTAGE_VALUE => 'ap.percentage_value',
'product_link_id' => 'ap.' .$productEntityLinkField,
'product_link_id' => 'ap.' . $productEntityLinkField,
];
if ($exportFilter && array_key_exists('tier_price', $exportFilter)) {
if (!empty($exportFilter['tier_price'][0])) {
Expand All @@ -488,7 +484,7 @@ private function fetchTierPrices(array $productIds): array
$selectFields
)
->where(
'ap.'.$productEntityLinkField.' IN (?)',
'ap.' . $productEntityLinkField . ' IN (?)',
$productIds
);

Expand Down Expand Up @@ -602,7 +598,7 @@ protected function _getWebsiteCode(int $websiteId): string
}

if ($storeName && $currencyCode) {
$code = $storeName.' ['.$currencyCode.']';
$code = $storeName . ' [' . $currencyCode . ']';
} else {
$code = $storeName;
}
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/AdvancedSearch/etc/db_schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
<table name="catalogsearch_recommendations" resource="default" engine="innodb"
comment="Advanced Search Recommendations">
<column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
<column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="ID"/>
<column xsi:type="int" name="query_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Query Id"/>
default="0" comment="Query ID"/>
<column xsi:type="int" name="relation_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Relation Id"/>
default="0" comment="Relation ID"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="id"/>
</constraint>
Expand Down
41 changes: 25 additions & 16 deletions app/code/Magento/Analytics/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
# Magento_Analytics Module
# Magento_Analytics module

The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://magento.com/products/business-intelligence) to use [Advanced Reporting](https://devdocs.magento.com/guides/v2.3/advanced-reporting/modules.html) functionality.

The module implements the following functionality:

* enabling subscription to the MBI and automatic re-subscription
* changing the base URL with the same MBI account remained
* declaring the configuration schemas for report data collection
* collecting the Magento instance data as reports for the MBI
* introducing API that provides the collected data
* extending Magento configuration with the module parameters:
* subscription status (enabled/disabled)
* industry (a business area in which the instance website works)
* time of data collection (time of the day when the module collects data)
- Enabling subscription to Magento Business Intelligence (MBI) and automatic re-subscription
- Declaring the configuration schemas for report data collection
- Collecting the Magento instance data as reports for MBI
- Introducing API that provides the collected data
- Extending Magento configuration with the module parameters:
- Subscription status (enabled/disabled)
- Industry (a business area in which the instance website works)
- Time of data collection (time of the day when the module collects data)

## Installation details

Before disabling or uninstalling this module, note that the following modules depends on this module:
- Magento_CatalogAnalytics
- Magento_CustomerAnalytics
- Magento_QuoteAnalytics
- Magento_ReviewAnalytics
- Magento_SalesAnalytics
- Magento_WishlistAnalytics

## Structure

Expand All @@ -29,12 +38,12 @@ The subscription to the MBI service is enabled during the installation process o
Configuration settings for the Analytics module can be modified in the Admin Panel on the Stores > Configuration page under the General > Advanced Reporting tab.

The following options can be adjusted:
* Advanced Reporting Service (Enabled/Disabled)
* Alters the status of the Advanced Reporting subscription
* Time of day to send data (Hour/Minute/Second in the store's time zone)
* Defines when the data collection process for the Advanced Reporting service occurs
* Industry
* Defines the industry of the store in order to create a personalized Advanced Reporting experience
- Advanced Reporting Service (Enabled/Disabled)
- Alters the status of the Advanced Reporting subscription
- Time of day to send data (Hour/Minute/Second in the store's time zone)
- Defines when the data collection process for the Advanced Reporting service occurs
- Industry
- Defines the industry of the store in order to create a personalized Advanced Reporting experience

## Extensibility

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="Apps and Games" stepKey="selectAdvancedReportingIndustry"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingHour}}" userInput="11" stepKey="selectAdvancedReportingHour"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingMinute}}" userInput="11" stepKey="selectAdvancedReportingMinute"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingSeconds}}" userInput="00" stepKey="selectAdvancedReportingSeconds"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingHour}}" userInput="23" stepKey="selectAdvancedReportingHour"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingMinute}}" userInput="59" stepKey="selectAdvancedReportingMinute"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingSeconds}}" userInput="59" stepKey="selectAdvancedReportingSeconds"/>
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveConfigButton"/>
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccess"/>
</test>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<label>Bulk Actions</label>
<field id="lifetime" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Days Saved in Log</label>
<validate>validate-zero-or-greater validate-digits</validate>
</field>
</group>
</section>
Expand Down
6 changes: 6 additions & 0 deletions app/code/Magento/Authorization/Model/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ public function __construct( //phpcs:ignore Generic.CodeAnalysis.UselessOverridi

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

/**
* @inheritDoc
*
* @SuppressWarnings(PHPMD.SerializationAware)
* @deprecated Do not use PHP serialization.
*/
public function __wakeup()
{
Expand Down
41 changes: 41 additions & 0 deletions app/code/Magento/Authorizenet/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,42 @@
# Magento_Authorizenet module

The Magento_Authorizenet module implements the integration with the Authorize.Net payment gateway and makes the latter available as a payment method in Magento.

## Extensibility

Extension developers can interact with the Magento_Authorizenet module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html).

[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Authorizenet module.

### Events

This module dispatches the following events:

- `checkout_directpost_placeOrder` event in the `\Magento\Authorizenet\Controller\Directpost\Payment\Place::placeCheckoutOrder()` method. Parameters:
- `result` is a data object (`\Magento\Framework\DataObject` class).
- `action` is a controller object (`\Magento\Authorizenet\Controller\Directpost\Payment\Place`).

- `order_cancel_after` event in the `\Magento\Authorizenet\Model\Directpost::declineOrder()` method. Parameters:
- `order` is an order object (`\Magento\Sales\Model\Order` class).


This module observes the following events:

- `checkout_submit_all_after` event in the `Magento\Authorizenet\Observer\SaveOrderAfterSubmitObserver` file.
- `checkout_directpost_placeOrder` event in the `Magento\Authorizenet\Observer\AddFieldsToResponseObserver` file.

For information about events in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.3/extension-dev-guide/events-and-observers.html#events).

### Layouts

This module introduces the following layouts and layout handles in the `view/adminhtml/layout` directory:

- `adminhtml_authorizenet_directpost_payment_redirect`

This module introduces the following layouts and layout handles in the `view/frontend/layout` directory:

- `authorizenet_directpost_payment_backendresponse`
- `authorizenet_directpost_payment_redirect`
- `authorizenet_directpost_payment_response`

For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html).
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use Magento\QuoteGraphQl\Model\Cart\Payment\AdditionalDataProviderInterface;
use Magento\Framework\Stdlib\ArrayManager;
use Magento\Framework\GraphQl\Exception\GraphQlInputException;

/**
* SetPaymentMethod additional data provider model for Authorizenet payment method
Expand Down Expand Up @@ -36,10 +37,32 @@ public function __construct(
*
* @param array $data
* @return array
* @throws GraphQlInputException
*/
public function getData(array $data): array
{
$additionalData = $this->arrayManager->get(static::PATH_ADDITIONAL_DATA, $data) ?? [];
if (!isset($data[self::PATH_ADDITIONAL_DATA])) {
throw new GraphQlInputException(
__('Required parameter "authorizenet_acceptjs" for "payment_method" is missing.')
);
}
if (!isset($data[self::PATH_ADDITIONAL_DATA]['opaque_data_descriptor'])) {
throw new GraphQlInputException(
__('Required parameter "opaque_data_descriptor" for "authorizenet_acceptjs" is missing.')
);
}
if (!isset($data[self::PATH_ADDITIONAL_DATA]['opaque_data_value'])) {
throw new GraphQlInputException(
__('Required parameter "opaque_data_value" for "authorizenet_acceptjs" is missing.')
);
}
if (!isset($data[self::PATH_ADDITIONAL_DATA]['cc_last_4'])) {
throw new GraphQlInputException(
__('Required parameter "cc_last_4" for "authorizenet_acceptjs" is missing.')
);
}

$additionalData = $this->arrayManager->get(static::PATH_ADDITIONAL_DATA, $data);
foreach ($additionalData as $key => $value) {
$additionalData[$this->convertSnakeCaseToCamelCase($key)] = $value;
unset($additionalData[$key]);
Expand Down
Loading

0 comments on commit d167013

Please sign in to comment.