Skip to content

Commit 13673b2

Browse files
authored
Merge branch '2.4-develop' into navarr/update-flush-cache-by-tags
2 parents 5734a6c + 3008324 commit 13673b2

File tree

6,240 files changed

+64948
-319975
lines changed

Some content is hidden

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

6,240 files changed

+64948
-319975
lines changed

.github/ISSUE_TEMPLATE/story.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: GraphQL Story
3+
about: User story for GraphQL project
4+
labels: 'Project: GraphQL'
5+
6+
---
7+
8+
*As a ___ I want to ___ so that ___.*
9+
10+
### AC
11+
* a
12+
* b
13+
### Approved Schema
14+
* a

.php_cs.dist

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
$finder = PhpCsFixer\Finder::create()
1212
->name('*.phtml')
13-
->exclude('dev/tests/functional/generated')
14-
->exclude('dev/tests/functional/var')
15-
->exclude('dev/tests/functional/vendor')
1613
->exclude('dev/tests/integration/tmp')
1714
->exclude('dev/tests/integration/var')
1815
->exclude('lib/internal/Cm')

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<p align="center">
2-
<a href="https://magento.com">
3-
<img src="https://static.magento.com/sites/all/themes/magento/logo.svg" width="300px" alt="Magento" />
4-
</a>
5-
</p>
6-
<p align="center">
7-
<br /><br />
2+
<a href="https://magento.com">
3+
<img src="https://static.magento.com/sites/all/themes/magento/logo.svg" width="300px" alt="Magento Commerce" />
4+
</a>
5+
<br />
6+
<br />
87
<a href="https://www.codetriage.com/magento/magento2">
98
<img src="https://www.codetriage.com/magento/magento2/badges/users.svg" alt="Open Source Helpers" />
109
</a>

app/code/Magento/AdminAnalytics/Test/Mftf/Test/TrackingScriptTest.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

app/code/Magento/AdminAnalytics/etc/db_schema.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
1010
<table name="admin_analytics_usage_version_log" resource="default" engine="innodb"
1111
comment="Admin Notification Viewer Log Table">
12-
<column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
12+
<column xsi:type="int" name="id" unsigned="true" nullable="false" identity="true"
1313
comment="Log ID"/>
1414
<column xsi:type="varchar" name="last_viewed_in_version" nullable="false" length="50"
1515
comment="Viewer last viewed on product version"/>

app/code/Magento/AdminNotification/etc/db_schema.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
1010
<table name="adminnotification_inbox" resource="default" engine="innodb" comment="Adminnotification Inbox">
11-
<column xsi:type="int" name="notification_id" padding="10" unsigned="true" nullable="false" identity="true"
11+
<column xsi:type="int" name="notification_id" unsigned="true" nullable="false" identity="true"
1212
comment="Notification ID"/>
13-
<column xsi:type="smallint" name="severity" padding="5" unsigned="true" nullable="false" identity="false"
13+
<column xsi:type="smallint" name="severity" unsigned="true" nullable="false" identity="false"
1414
default="0" comment="Problem type"/>
1515
<column xsi:type="timestamp" name="date_added" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
1616
comment="Create date"/>
1717
<column xsi:type="varchar" name="title" nullable="false" length="255" comment="Title"/>
1818
<column xsi:type="text" name="description" nullable="true" comment="Description"/>
1919
<column xsi:type="varchar" name="url" nullable="true" length="255" comment="Url"/>
20-
<column xsi:type="smallint" name="is_read" padding="5" unsigned="true" nullable="false" identity="false"
20+
<column xsi:type="smallint" name="is_read" unsigned="true" nullable="false" identity="false"
2121
default="0" comment="Flag if notification read"/>
22-
<column xsi:type="smallint" name="is_remove" padding="5" unsigned="true" nullable="false" identity="false"
22+
<column xsi:type="smallint" name="is_remove" unsigned="true" nullable="false" identity="false"
2323
default="0" comment="Flag if notification might be removed"/>
2424
<constraint xsi:type="primary" referenceId="PRIMARY">
2525
<column name="notification_id"/>
@@ -36,7 +36,7 @@
3636
</table>
3737
<table name="admin_system_messages" resource="default" engine="innodb" comment="Admin System Messages">
3838
<column xsi:type="varchar" name="identity" nullable="false" length="100" comment="Message ID"/>
39-
<column xsi:type="smallint" name="severity" padding="5" unsigned="true" nullable="false" identity="false"
39+
<column xsi:type="smallint" name="severity" unsigned="true" nullable="false" identity="false"
4040
default="0" comment="Problem type"/>
4141
<column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
4242
comment="Create date"/>

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing/Validator/TierPrice.php

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,25 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
declare(strict_types=1);
8+
69
namespace Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing\Validator;
710

811
use Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing;
12+
use Magento\CatalogImportExport\Model\Import\Product;
913
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface;
14+
use Magento\CatalogImportExport\Model\Import\Product\StoreResolver;
15+
use Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractImportValidator;
16+
use Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractPrice;
17+
use Magento\Customer\Api\GroupRepositoryInterface;
18+
use Magento\Framework\Api\SearchCriteriaBuilder;
19+
use Magento\Framework\Exception\LocalizedException;
1020

11-
class TierPrice extends \Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractPrice
21+
class TierPrice extends AbstractPrice
1222
{
1323
/**
14-
* @var \Magento\CatalogImportExport\Model\Import\Product\StoreResolver
24+
* @var StoreResolver
1525
*/
1626
protected $storeResolver;
1727

@@ -27,21 +37,26 @@ class TierPrice extends \Magento\CatalogImportExport\Model\Import\Product\Valida
2737
];
2838

2939
/**
30-
* @param \Magento\Customer\Api\GroupRepositoryInterface $groupRepository
31-
* @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder
32-
* @param \Magento\CatalogImportExport\Model\Import\Product\StoreResolver $storeResolver
40+
* @param GroupRepositoryInterface $groupRepository
41+
* @param SearchCriteriaBuilder $searchCriteriaBuilder
42+
* @param StoreResolver $storeResolver
3343
*/
3444
public function __construct(
35-
\Magento\Customer\Api\GroupRepositoryInterface $groupRepository,
36-
\Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder,
37-
\Magento\CatalogImportExport\Model\Import\Product\StoreResolver $storeResolver
45+
GroupRepositoryInterface $groupRepository,
46+
SearchCriteriaBuilder $searchCriteriaBuilder,
47+
StoreResolver $storeResolver
3848
) {
3949
$this->storeResolver = $storeResolver;
4050
parent::__construct($groupRepository, $searchCriteriaBuilder);
4151
}
4252

4353
/**
44-
* {@inheritdoc}
54+
* Initialize method
55+
*
56+
* @param Product $context
57+
*
58+
* @return RowValidatorInterface|AbstractImportValidator|void
59+
* @throws LocalizedException
4560
*/
4661
public function init($context)
4762
{
@@ -52,7 +67,10 @@ public function init($context)
5267
}
5368

5469
/**
70+
* Add decimal error
71+
*
5572
* @param string $attribute
73+
*
5674
* @return void
5775
*/
5876
protected function addDecimalError($attribute)
@@ -83,12 +101,12 @@ public function getCustomerGroups()
83101
}
84102

85103
/**
86-
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
87104
* Validation
88105
*
89106
* @param mixed $value
90107
* @return bool
91108
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
109+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
92110
*/
93111
public function isValid($value)
94112
{
@@ -133,6 +151,7 @@ public function isValid($value)
133151
* Check if at list one value and length are valid
134152
*
135153
* @param array $value
154+
*
136155
* @return bool
137156
*/
138157
protected function isValidValueAndLength(array $value)
@@ -150,6 +169,7 @@ protected function isValidValueAndLength(array $value)
150169
* Check if value has empty columns
151170
*
152171
* @param array $value
172+
*
153173
* @return bool
154174
*/
155175
protected function hasEmptyColumns(array $value)

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing/Validator/TierPriceType.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,24 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
declare(strict_types=1);
8+
79
namespace Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing\Validator;
810

911
use Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing;
1012
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface;
13+
use Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractImportValidator;
1114

1215
/**
1316
* Class TierPriceType validates tier price type.
1417
*/
15-
class TierPriceType extends \Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractImportValidator
18+
class TierPriceType extends AbstractImportValidator
1619
{
17-
/**
18-
* {@inheritdoc}
19-
*/
20-
public function init($context)
21-
{
22-
return parent::init($context);
23-
}
24-
2520
/**
2621
* Validate tier price type.
2722
*
2823
* @param array $value
24+
*
2925
* @return bool
3026
*/
3127
public function isValid($value)

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing/Validator/Website.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,47 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
declare(strict_types=1);
8+
69
namespace Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing\Validator;
710

811
use Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing;
9-
use Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractImportValidator;
1012
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface;
13+
use Magento\CatalogImportExport\Model\Import\Product\StoreResolver;
14+
use Magento\CatalogImportExport\Model\Import\Product\Validator\AbstractImportValidator;
15+
use Magento\Store\Model\Website as WebsiteModel;
1116

1217
class Website extends AbstractImportValidator implements RowValidatorInterface
1318
{
1419
/**
15-
* @var \Magento\CatalogImportExport\Model\Import\Product\StoreResolver
20+
* @var StoreResolver
1621
*/
1722
protected $storeResolver;
1823

1924
/**
20-
* @var \Magento\Store\Model\Website
25+
* @var WebsiteModel
2126
*/
2227
protected $websiteModel;
2328

2429
/**
25-
* @param \Magento\CatalogImportExport\Model\Import\Product\StoreResolver $storeResolver
26-
* @param \Magento\Store\Model\Website $websiteModel
30+
* @param StoreResolver $storeResolver
31+
* @param WebsiteModel $websiteModel
2732
*/
2833
public function __construct(
29-
\Magento\CatalogImportExport\Model\Import\Product\StoreResolver $storeResolver,
30-
\Magento\Store\Model\Website $websiteModel
34+
StoreResolver $storeResolver,
35+
WebsiteModel $websiteModel
3136
) {
3237
$this->storeResolver = $storeResolver;
3338
$this->websiteModel = $websiteModel;
3439
}
3540

36-
/**
37-
* {@inheritdoc}
38-
*/
39-
public function init($context)
40-
{
41-
return parent::init($context);
42-
}
43-
4441
/**
4542
* Validate by website type
4643
*
4744
* @param array $value
4845
* @param string $websiteCode
46+
*
4947
* @return bool
5048
*/
5149
protected function isWebsiteValid($value, $websiteCode)
@@ -62,7 +60,8 @@ protected function isWebsiteValid($value, $websiteCode)
6260
/**
6361
* Validate value
6462
*
65-
* @param mixed $value
63+
* @param array $value
64+
*
6665
* @return bool
6766
*/
6867
public function isValid($value)
@@ -85,6 +84,7 @@ public function isValid($value)
8584
*/
8685
public function getAllWebsitesValue()
8786
{
88-
return AdvancedPricing::VALUE_ALL_WEBSITES . ' ['.$this->websiteModel->getBaseCurrency()->getCurrencyCode().']';
87+
return AdvancedPricing::VALUE_ALL_WEBSITES .
88+
' [' . $this->websiteModel->getBaseCurrency()->getCurrencyCode() . ']';
8989
}
9090
}

app/code/Magento/AdvancedSearch/Model/Client/ClientResolver.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
*/
66
namespace Magento\AdvancedSearch\Model\Client;
77

8-
use \Magento\Framework\ObjectManagerInterface;
8+
use Magento\Framework\ObjectManagerInterface;
99
use Magento\Framework\Search\EngineResolverInterface;
10+
use Magento\Framework\App\Config\ScopeConfigInterface;
1011

1112
/**
1213
* @api
@@ -46,7 +47,7 @@ class ClientResolver
4647
private $clientOptionsPool;
4748

4849
/**
49-
* @var EngineResolver
50+
* @var EngineResolverInterface
5051
*/
5152
private $engineResolver;
5253

app/code/Magento/AdvancedSearch/Model/Indexer/Fulltext/Plugin/CustomerGroup.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
use Magento\Framework\Model\AbstractModel;
1313
use Magento\Catalog\Model\ResourceModel\Attribute;
1414
use Magento\AdvancedSearch\Model\Client\ClientOptionsInterface;
15-
use Magento\Framework\Search\EngineResolverInterface;
16-
use Magento\Search\Model\EngineResolver;
1715

1816
class CustomerGroup extends AbstractPlugin
1917
{
@@ -22,24 +20,16 @@ class CustomerGroup extends AbstractPlugin
2220
*/
2321
protected $clientOptions;
2422

25-
/**
26-
* @var EngineResolverInterface
27-
*/
28-
protected $engineResolver;
29-
3023
/**
3124
* @param IndexerRegistry $indexerRegistry
3225
* @param ClientOptionsInterface $clientOptions
33-
* @param EngineResolverInterface $engineResolver
3426
*/
3527
public function __construct(
3628
IndexerRegistry $indexerRegistry,
37-
ClientOptionsInterface $clientOptions,
38-
EngineResolverInterface $engineResolver
29+
ClientOptionsInterface $clientOptions
3930
) {
4031
parent::__construct($indexerRegistry);
4132
$this->clientOptions = $clientOptions;
42-
$this->engineResolver = $engineResolver;
4333
}
4434

4535
/**
@@ -56,9 +46,7 @@ public function aroundSave(
5646
\Closure $proceed,
5747
AbstractModel $group
5848
) {
59-
$needInvalidation =
60-
($this->engineResolver->getCurrentSearchEngine() != EngineResolver::CATALOG_SEARCH_MYSQL_ENGINE)
61-
&& ($group->isObjectNew() || $group->dataHasChangedFor('tax_class_id'));
49+
$needInvalidation = $group->isObjectNew() || $group->dataHasChangedFor('tax_class_id');
6250
$result = $proceed($group);
6351
if ($needInvalidation) {
6452
$this->indexerRegistry->get(Fulltext::INDEXER_ID)->invalidate();

0 commit comments

Comments
 (0)