Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/2.3-develop' into date-type-no…
Browse files Browse the repository at this point in the history
…t-hide-formatting
  • Loading branch information
sedonik committed Oct 13, 2019
2 parents 594cb63 + 14d6388 commit 295372e
Show file tree
Hide file tree
Showing 800 changed files with 23,726 additions and 6,055 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Fields marked with (*) are required. Please don't remove the template.

### Preconditions (*)
<!---
Provide the exact Magento version (example: 2.2.5) and any important information on the environment where bug is reproducible.
Provide the exact Magento version (example: 2.3.2) and any important information on the environment where bug is reproducible.
-->
1.
2.
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a

## Install Magento

* [Installation Guide](https://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html).
* [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.

To learn about how to make a contribution, click [here][1].
To learn about how to contribute, click [here][1].

To learn about issues, click [here][2]. To open an issue, click [here][3].

Expand All @@ -33,7 +37,7 @@ The members of this team have been recognized for their outstanding commitment t
</a>

<h3>Top Contributors</h3>
Magento is thankful for any contribution that can improve our code base, documentation or increase test coverage. We always recognize our most active members, as their contributions are the foundation of the Magento Open Source platform.
Magento is thankful for any contribution that can improve our codebase, documentation or increase test coverage. We always recognize our most active members, as their contributions are the foundation of the Magento Open Source platform.
<a href="https://magento.com/magento-contributors">
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/contributors.png"/>
</a>
Expand All @@ -44,7 +48,7 @@ Please review the [Code Contributions guide](https://devdocs.magento.com/guides/

## Reporting Security Issues

To report security vulnerabilities or learn more about reporting security issues in Magento software or web sites visit the [Magento Bug Bounty Program](https://hackerone.com/magento) on hackerone. Please create a hackerone account [there](https://hackerone.com/magento) to submit and follow-up your issue.
To report security vulnerabilities or learn more about reporting security issues in Magento software or web sites visit the [Magento Bug Bounty Program](https://hackerone.com/magento) on hackerone. Please create a hackerone account [there](https://hackerone.com/magento) to submit and follow-up on your issue.

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).

Expand All @@ -60,7 +64,7 @@ Please see LICENSE_EE.txt for the full text of the MEE License or visit https://

## Community Engineering Slack

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).
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 a request at [[email protected]](mailto:[email protected]) or [self signup](https://tinyurl.com/engcom-slack).


We have channels for each project. These channels are recommended for new members:
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 All @@ -211,6 +216,7 @@ public function export()
if ($entityCollection->count() == 0) {
break;
}
$entityCollection->clear();
$exportData = $this->getExportData();
foreach ($exportData as $dataRow) {
$writer->writeRow($dataRow);
Expand All @@ -234,16 +240,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 +359,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 +468,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 +485,7 @@ private function fetchTierPrices(array $productIds): array
$selectFields
)
->where(
'ap.'.$productEntityLinkField.' IN (?)',
'ap.' . $productEntityLinkField . ' IN (?)',
$productIds
);

Expand Down Expand Up @@ -602,7 +599,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
5 changes: 4 additions & 1 deletion app/code/Magento/Analytics/Model/ExportDataHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function __construct(
public function prepareExportData()
{
try {
$tmpDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::SYS_TMP);
$tmpDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);

$this->prepareDirectory($tmpDirectory, $this->getTmpFilesDirRelativePath());
$this->reportWriter->write($tmpDirectory, $this->getTmpFilesDirRelativePath());
Expand Down Expand Up @@ -157,7 +157,9 @@ private function prepareDirectory(WriteInterface $directory, $path)
private function prepareFileDirectory(WriteInterface $directory, $path)
{
$directory->delete($path);
// phpcs:ignore Magento2.Functions.DiscouragedFunction
if (dirname($path) !== '.') {
// phpcs:ignore Magento2.Functions.DiscouragedFunction
$directory->create(dirname($path));
}

Expand All @@ -176,6 +178,7 @@ private function pack($source, $destination)
$this->archive->pack(
$source,
$destination,
// phpcs:ignore Magento2.Functions.DiscouragedFunction
is_dir($source) ?: false
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Magento\Framework\Archive;
use Magento\Framework\Filesystem;
use Magento\Framework\Filesystem\Directory\WriteInterface;
use Magento\Framework\Filesystem\DirectoryList;
use Magento\Framework\App\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::SYS_TMP)
->with(DirectoryList::VAR_DIR)
->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::SYS_TMP)
->with(DirectoryList::VAR_DIR)
->willReturn($this->directoryMock);
$this->reportWriterMock
->expects($this->once())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\AsynchronousOperations\Model;

use Magento\AsynchronousOperations\Api\Data\OperationSearchResultsInterface;
use Magento\Framework\Api\SearchResults;

/**
* Service Data Object with bulk Operation search result.
*/
class OperationSearchResults extends SearchResults implements OperationSearchResultsInterface
{
}
2 changes: 1 addition & 1 deletion app/code/Magento/AsynchronousOperations/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<preference for="Magento\AsynchronousOperations\Api\Data\SummaryOperationStatusInterface" type="Magento\AsynchronousOperations\Model\OperationStatus" />
<preference for="Magento\AsynchronousOperations\Api\Data\DetailedBulkOperationsStatusInterface" type="Magento\AsynchronousOperations\Model\BulkStatus\Detailed" />
<preference for="Magento\AsynchronousOperations\Api\Data\BulkOperationsStatusInterface" type="Magento\AsynchronousOperations\Model\BulkStatus\Short" />
<preference for="Magento\AsynchronousOperations\Api\Data\OperationSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
<preference for="Magento\AsynchronousOperations\Api\Data\OperationSearchResultsInterface" type="Magento\AsynchronousOperations\Model\OperationSearchResults" />
<preference for="Magento\AsynchronousOperations\Api\OperationRepositoryInterface" type="Magento\AsynchronousOperations\Model\OperationRepository" />
<type name="Magento\Framework\EntityManager\MetadataPool">
<arguments>
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
Loading

0 comments on commit 295372e

Please sign in to comment.