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

Commit

Permalink
Merge remote-tracking branch 'mainline/2.3-develop' into ISSUE-691
Browse files Browse the repository at this point in the history
Signed-off-by: Tomash Khamlai <tomash.khamlai@gmail.com>
  • Loading branch information
TomashKhamlai committed Sep 27, 2019
2 parents be8d332 + ea71192 commit d606fcd
Show file tree
Hide file tree
Showing 1,041 changed files with 32,793 additions and 7,306 deletions.
206 changes: 206 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
/app/code/Magento/AdminNotification/ @paliarush
/app/code/Magento/Backend/ @paliarush
/app/code/Magento/User/ @paliarush
/lib/internal/Magento/Framework/App/ @buskamuza
/lib/internal/Magento/Framework/Controller/ @buskamuza
/lib/internal/Magento/Framework/Flag/ @buskamuza
/lib/internal/Magento/Framework/HTTP/ @buskamuza
/lib/internal/Magento/Framework/Logger/ @buskamuza
/lib/internal/Magento/Framework/Message/ @buskamuza
/lib/internal/Magento/Framework/Notification/ @buskamuza
/lib/internal/Magento/Framework/Session/ @buskamuza
/lib/internal/Magento/Framework/Url/ @buskamuza
/app/code/Magento/Cms/ @melnikovi
/app/code/Magento/CmsUrlRewrite/ @melnikovi
/app/code/Magento/Contact/ @melnikovi
/app/code/Magento/Email/ @melnikovi
/app/code/Magento/Variable/ @melnikovi
/app/code/Magento/Widget/ @melnikovi
/lib/internal/Magento/Framework/Cache/ @kokoc
/app/code/Magento/CacheInvalidate/ @kokoc
/app/code/Magento/CatalogInventory/ @tariqjawed83 @maghamed
/app/code/Magento/Bundle/ @akaplya
/app/code/Magento/BundleImportExport/ @akaplya
/app/code/Magento/Catalog/ @akaplya
/app/code/Magento/CatalogAnalytics/ @akaplya
/app/code/Magento/CatalogImportExport/ @akaplya
/app/code/Magento/CatalogSearch/ @kokoc
/app/code/Magento/CatalogUrlRewrite/ @akaplya
/app/code/Magento/ConfigurableImportExport/ @akaplya
/app/code/Magento/ConfigurableProduct/ @akaplya
/app/code/Magento/Downloadable/ @akaplya
/app/code/Magento/DownloadableImportExport/ @akaplya
/app/code/Magento/GroupedImportExport/ @akaplya
/app/code/Magento/GroupedProduct/ @akaplya
/app/code/Magento/LayeredNavigation/ @kokoc
/app/code/Magento/ProductVideo/ @akaplya
/app/code/Magento/Review/ @akaplya
/app/code/Magento/Swatches/ @akaplya
/app/code/Magento/SwatchesLayeredNavigation/ @kokoc
/app/code/Magento/Checkout/ @paliarush
/app/code/Magento/CheckoutAgreements/ @paliarush
/app/code/Magento/GiftMessage/ @paliarush
/app/code/Magento/InstantPurchase/ @paliarush
/app/code/Magento/Multishipping/ @joni-jones
/app/code/Magento/Quote/ @paliarush
/app/code/Magento/QuoteAnalytics/ @paliarush
/lib/internal/Magento/Framework/Code/ @joni-jones
/lib/internal/Magento/Framework/Reflection/ @joni-jones
/lib/internal/Magento/Framework/Component/ @buskamuza
/app/code/Magento/Version/ @buskamuza
/lib/internal/Magento/Framework/Config/ @paliarush
/app/code/Magento/Config/ @paliarush
/lib/internal/Magento/Framework/Console/ @joni-jones
/lib/internal/Magento/Framework/Process/ @joni-jones
/lib/internal/Magento/Framework/Shell/ @joni-jones
/app/code/Magento/Cookie/ @kokoc
/lib/internal/Magento/Framework/Crontab/ @tariqjawed83 @buskamuza
/app/code/Magento/Cron/ @tariqjawed83 @buskamuza
/app/code/Magento/Customer/ @paliarush
/app/code/Magento/CustomerAnalytics/ @paliarush
/app/code/Magento/CustomerImportExport/ @paliarush
/app/code/Magento/Persistent/ @paliarush
/app/code/Magento/Wishlist/ @paliarush
/lib/internal/Magento/Framework/DB/ @akaplya
/lib/internal/Magento/Framework/EntityManager/ @akaplya
/lib/internal/Magento/Framework/Indexer/ @akaplya
/lib/internal/Magento/Framework/Model/ @akaplya
/lib/internal/Magento/Framework/Mview/ @akaplya
/app/code/Magento/Eav/ @akaplya
/app/code/Magento/Indexer/ @akaplya
/lib/internal/Magento/Framework/Archive/ @joni-jones
/lib/internal/Magento/Framework/Convert/ @joni-jones
/lib/internal/Magento/Framework/Data/ @joni-jones
/lib/internal/Magento/Framework/DomDocument/ @joni-jones
/lib/internal/Magento/Framework/Json/ @joni-jones
/lib/internal/Magento/Framework/Math/ @joni-jones
/lib/internal/Magento/Framework/Parse/ @joni-jones
/lib/internal/Magento/Framework/Serialize/ @joni-jones
/lib/internal/Magento/Framework/Simplexml/ @joni-jones
/lib/internal/Magento/Framework/Stdlib/ @joni-jones
/lib/internal/Magento/Framework/Unserialize/ @joni-jones
/lib/internal/Magento/Framework/Xml/ @joni-jones
/lib/internal/Magento/Framework/XsltProcessor/ @joni-jones
/app/code/Magento/Deploy/ @kandy @buskamuza
/lib/internal/Magento/Framework/Profiler/ @kandy
/app/code/Magento/Developer/ @buskamuza
/app/code/Magento/Directory/ @buskamuza
/lib/internal/Magento/Framework/Exception/ @paliarush
/lib/internal/Magento/Framework/File/ @buskamuza
/lib/internal/Magento/Framework/Filesystem/ @buskamuza
/lib/internal/Magento/Framework/System/ @buskamuza
/lib/internal/Magento/Framework/Css/ @DrewML
/lib/internal/Magento/Framework/Option/ @DrewML
/lib/internal/Magento/Framework/RequireJs/ @DrewML
/lib/internal/Magento/Framework/View/ @melnikovi
/dev/tests/js/ @DrewML
/app/code/Magento/RequireJs/ @DrewML
/app/code/Magento/Theme/ @melnikovi
/app/code/Magento/Ui/ @melnikovi
/lib/internal/Magento/Framework/Intl/ @melnikovi
/lib/internal/Magento/Framework/Locale/ @melnikovi
/lib/internal/Magento/Framework/Phrase/ @melnikovi
/lib/internal/Magento/Framework/Translate/ @melnikovi
/app/code/Magento/Translation/ @melnikovi
/app/code/Magento/ImportExport/ @akaplya
/app/code/Magento/GoogleAdwords/ @buskamuza @melnikovi
/app/code/Magento/Newsletter/ @buskamuza @melnikovi
/app/code/Magento/ProductAlert/ @buskamuza @melnikovi
/app/code/Magento/Rss/ @buskamuza @melnikovi
/app/code/Magento/SendFriend/ @buskamuza @melnikovi
/app/code/Magento/Marketplace/ @buskamuza
/app/code/Magento/MediaStorage/ @buskamuza
/lib/internal/Magento/Framework/Amqp/ @tariqjawed83 @paliarush
/lib/internal/Magento/Framework/Bulk/ @tariqjawed83 @paliarush
/lib/internal/Magento/Framework/Communication/ @tariqjawed83 @paliarush
/app/code/Magento/Amqp/ @tariqjawed83 @paliarush
/app/code/Magento/AsynchronousOperations/ @tariqjawed83 @paliarush
/app/code/Magento/MessageQueue/ @tariqjawed83 @paliarush
/app/code/Magento/MysqlMq/ @tariqjawed83 @paliarush
/app/code/Magento/Sales/ @joni-jones
/app/code/Magento/SalesInventory/ @joni-jones
/app/code/Magento/SalesSequence/ @joni-jones
/lib/internal/Magento/Framework/Event/ @buskamuza @kandy
/lib/internal/Magento/Framework/Interception/ @buskamuza @kandy
/lib/internal/Magento/Framework/ObjectManager/ @buskamuza @kandy
/app/code/Magento/PageCache/ @Andrey @kokoc @paliarush
/app/code/Magento/Authorizenet/ @joni-jones
/app/code/Magento/Braintree/ @joni-jones
/app/code/Magento/OfflinePayments/ @joni-jones
/app/code/Magento/Payment/ @joni-jones
/app/code/Magento/Paypal/ @joni-jones
/app/code/Magento/Signifyd/ @joni-jones
/app/code/Magento/Vault/ @joni-jones
/lib/internal/Magento/Framework/Pricing/ @akaplya
/app/code/Magento/AdvancedPricingImportExport/ @akaplya
/app/code/Magento/CurrencySymbol/ @akaplya
/app/code/Magento/Msrp/ @akaplya
/app/code/Magento/Tax/ @akaplya
/app/code/Magento/TaxImportExport/ @akaplya
/app/code/Magento/Weee/ @akaplya
/app/code/Magento/CatalogRule/ @kokoc
/app/code/Magento/CatalogRuleConfigurable/ @kokoc
/app/code/Magento/CatalogWidget/ @kokoc
/app/code/Magento/Rule/ @kokoc
/app/code/Magento/SalesRule/ @akaplya
/app/code/Magento/ReleaseNotification/ @paliarush
/app/code/Magento/Analytics/ @tariqjawed83 @buskamuza
/app/code/Magento/GoogleAnalytics/ @tariqjawed83 @buskamuza
/app/code/Magento/NewRelicReporting/ @tariqjawed83 @buskamuza
/app/code/Magento/Reports/ @tariqjawed83 @buskamuza
/app/code/Magento/ReviewAnalytics/ @tariqjawed83 @buskamuza
/app/code/Magento/SalesAnalytics/ @tariqjawed83 @buskamuza
/app/code/Magento/WishlistAnalytics/ @tariqjawed83 @buskamuza
/app/code/Magento/GoogleOptimizer/ @paliarush
/app/code/Magento/Robots/ @paliarush
/app/code/Magento/Sitemap/ @paliarush
/lib/internal/Magento/Framework/Search/ @kokoc
/app/code/Magento/AdvancedSearch/ @kokoc
/app/code/Magento/Elasticsearch/ @kokoc
/app/code/Magento/Search/ @kokoc
/lib/internal/Magento/Framework/Acl/ @kokoc
/lib/internal/Magento/Framework/Authorization/ @kokoc
/lib/internal/Magento/Framework/Encryption/ @kokoc
/app/code/Magento/Authorization/ @kokoc
/app/code/Magento/Captcha/ @kokoc
/app/code/Magento/EncryptionKey/ @kokoc
/app/code/Magento/Security/ @kokoc
/lib/internal/Magento/Framework/Autoload/ @buskamuza
/lib/internal/Magento/Framework/Backup/ @buskamuza
/lib/internal/Magento/Framework/Composer/ @buskamuza
/lib/internal/Magento/Framework/Setup/ @buskamuza
/app/code/Magento/Backup/ @buskamuza
/setup/ @buskamuza
/app/code/Magento/Dhl/ @joni-jones
/app/code/Magento/Fedex/ @joni-jones
/app/code/Magento/OfflineShipping/ @joni-jones
/app/code/Magento/Shipping/ @joni-jones
/app/code/Magento/Ups/ @joni-jones
/app/code/Magento/Usps/ @joni-jones
/app/code/Magento/Store/ @akaplya
/lib/internal/Magento/Framework/TestFramework/ @paliarush
/dev/tests/integration/framework/ @buskamuza
/dev/tests/setup-integration/framework/ @paliarush
/dev/tests/static/framework/ @paliarush
/dev/tests/unit/ @paliarush
/dev/tests/api-functional/ @paliarush
/app/code/Magento/UrlRewrite/ @kokoc
/lib/internal/Magento/Framework/Image/ @buskamuza
/lib/internal/Magento/Framework/Mail/ @melnikovi
/lib/internal/Magento/Framework/Filter/ @melnikovi
/lib/internal/Magento/Framework/Validation/ @melnikovi
/lib/internal/Magento/Framework/Validator/ @melnikovi
/lib/internal/Magento/Framework/Api/ @paliarush
/lib/internal/Magento/Framework/GraphQL/ @paliarush
/lib/internal/Magento/Framework/Oauth/ @paliarush
/lib/internal/Magento/Framework/Webapi/ @paliarush
/app/code/Magento/GraphQL/ @paliarush
/app/code/Magento/Integration/ @paliarush
/app/code/Magento/Swagger/ @paliarush
/app/code/Magento/Webapi/ @paliarush
/app/code/Magento/WebapiSecurity/ @paliarush

composer.json @buskamuza
*.js @DrewML
.htaccess* @akaplya
nginx.conf* @akaplya
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
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ class AdvancedPricing extends \Magento\ImportExport\Model\Import\Entity\Abstract

const VALIDATOR_WEBSITE = 'validator_website';

const VALIDATOR_TEAR_PRICE = 'validator_tear_price';
/**
* @deprecated
* @see VALIDATOR_TIER_PRICE
*/
private const VALIDATOR_TEAR_PRICE = 'validator_tier_price';

private const VALIDATOR_TIER_PRICE = 'validator_tier_price';

/**
* Validation failure message template definitions.
Expand Down Expand Up @@ -221,7 +227,7 @@ public function __construct(
$this->_catalogProductEntity = $this->_resourceFactory->create()->getTable('catalog_product_entity');
$this->_oldSkus = $this->retrieveOldSkus();
$this->_validators[self::VALIDATOR_WEBSITE] = $websiteValidator;
$this->_validators[self::VALIDATOR_TEAR_PRICE] = $tierPriceValidator;
$this->_validators[self::VALIDATOR_TIER_PRICE] = $tierPriceValidator;
$this->errorAggregator = $errorAggregator;

foreach (array_merge($this->errorMessageTemplates, $this->_messageTemplates) as $errorCode => $message) {
Expand Down Expand Up @@ -536,7 +542,7 @@ protected function getWebSiteId($websiteCode)
*/
protected function getCustomerGroupId($customerGroup)
{
$customerGroups = $this->_getValidator(self::VALIDATOR_TEAR_PRICE)->getCustomerGroups();
$customerGroups = $this->_getValidator(self::VALIDATOR_TIER_PRICE)->getCustomerGroups();
return $customerGroup == self::VALUE_ALL_GROUPS ? 0 : $customerGroups[$customerGroup];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
*/
class AdvancedPricingTest extends \Magento\ImportExport\Test\Unit\Model\Import\AbstractImportTestCase
{
/**
* DB Table data
*/
const TABLE_NAME = 'tableName';
const LINK_FIELD = 'linkField';

Expand Down Expand Up @@ -54,7 +57,7 @@ class AdvancedPricingTest extends \Magento\ImportExport\Test\Unit\Model\Import\A
protected $websiteValidator;

/**
* @var AdvancedPricing\Validator\TearPrice |\PHPUnit_Framework_MockObject_MockObject
* @var AdvancedPricing\Validator\TierPrice |\PHPUnit_Framework_MockObject_MockObject
*/
protected $tierPriceValidator;

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
Loading

0 comments on commit d606fcd

Please sign in to comment.