Skip to content

Commit

Permalink
Merge branch '2.4-develop' into bugfix/move-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
lbajsarowicz committed Jun 12, 2020
2 parents a84633e + f3a160c commit 7ff6063
Show file tree
Hide file tree
Showing 5,128 changed files with 28,557 additions and 314,114 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
11 changes: 10 additions & 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.3.2) and any important information on the environment where bug is reproducible.
Provide the exact Magento version (example: 2.4.0) and any important information on the environment where bug is reproducible.
-->
1.
2.
Expand All @@ -32,3 +32,12 @@ Important: Provide a set of clear steps to reproduce this bug. We can not provid
<!--- Tell us what happened instead. Include error messages and issues. -->
1. [Screenshots, logs or description]
2.

---
Please provide [Severity](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#backlog) assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

- [ ] Severity: **S0** _- Affects critical data or functionality and leaves users without workaround._
- [ ] Severity: **S1** _- Affects critical data or functionality and forces users to employ a workaround._
- [ ] Severity: **S2** _- Affects non-critical data or functionality and forces users to employ a workaround._
- [ ] Severity: **S3** _- Affects non-critical data or functionality and does not force users to employ a workaround._
- [ ] Severity: **S4** _- Affects aesthetics, professional look and feel, “quality” or “usability”._
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/developer-experience-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ Fields marked with (*) are required. Please don't remove the template.

### Proposed solution
<!--- Suggest your potential solutions for this issue. -->

---
Please provide [Severity](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#backlog) assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

- [ ] Severity: **S0** _- Affects critical data or functionality and leaves users with no workaround._
- [ ] Severity: **S1** _- Affects critical data or functionality and forces users to employ a workaround._
- [ ] Severity: **S2** _- Affects non-critical data or functionality and forces users to employ a workaround._
- [ ] Severity: **S3** _- Affects non-critical data or functionality and does not force users to employ a workaround._
- [ ] Severity: **S4** _- Affects aesthetics, professional look and feel, “quality” or “usability”._
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: GraphQL Story
about: User story for GraphQL project
labels: 'Project: GraphQL'

---

*As a ___ I want to ___ so that ___.*

### AC
* a
* b
### Approved Schema
* a
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
If relevant, please provide a list of fixed issues in the format magento/magento2#<issue_number>.
There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.
-->
1. magento/magento2#<issue_number>: Issue title
1. Fixes magento/magento2#<issue_number>

### Manual testing scenarios (*)
<!---
Expand Down
3 changes: 0 additions & 3 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

$finder = PhpCsFixer\Finder::create()
->name('*.phtml')
->exclude('dev/tests/functional/generated')
->exclude('dev/tests/functional/var')
->exclude('dev/tests/functional/vendor')
->exclude('dev/tests/integration/tmp')
->exclude('dev/tests/integration/var')
->exclude('lib/internal/Cm')
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/AdminAnalytics/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="admin_analytics_usage_version_log" resource="default" engine="innodb"
comment="Admin Notification Viewer Log Table">
<column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
<column xsi:type="int" name="id" unsigned="true" nullable="false" identity="true"
comment="Log ID"/>
<column xsi:type="varchar" name="last_viewed_in_version" nullable="false" length="50"
comment="Viewer last viewed on product version"/>
Expand Down
10 changes: 5 additions & 5 deletions app/code/Magento/AdminNotification/etc/db_schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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"
<column xsi:type="int" name="notification_id" unsigned="true" nullable="false" identity="true"
comment="Notification ID"/>
<column xsi:type="smallint" name="severity" padding="5" unsigned="true" nullable="false" identity="false"
<column xsi:type="smallint" name="severity" 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"
comment="Create date"/>
<column xsi:type="varchar" name="title" nullable="false" length="255" comment="Title"/>
<column xsi:type="text" name="description" nullable="true" comment="Description"/>
<column xsi:type="varchar" name="url" nullable="true" length="255" comment="Url"/>
<column xsi:type="smallint" name="is_read" padding="5" unsigned="true" nullable="false" identity="false"
<column xsi:type="smallint" name="is_read" unsigned="true" nullable="false" identity="false"
default="0" comment="Flag if notification read"/>
<column xsi:type="smallint" name="is_remove" padding="5" unsigned="true" nullable="false" identity="false"
<column xsi:type="smallint" name="is_remove" unsigned="true" nullable="false" identity="false"
default="0" comment="Flag if notification might be removed"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="notification_id"/>
Expand All @@ -36,7 +36,7 @@
</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="smallint" name="severity" padding="5" unsigned="true" nullable="false" identity="false"
<column xsi:type="smallint" name="severity" 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"
comment="Create date"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
*/
namespace Magento\AdvancedSearch\Model\Client;

use \Magento\Framework\ObjectManagerInterface;
use Magento\Framework\ObjectManagerInterface;
use Magento\Framework\Search\EngineResolverInterface;
use Magento\Framework\App\Config\ScopeConfigInterface;

/**
* @api
Expand Down Expand Up @@ -46,7 +47,7 @@ class ClientResolver
private $clientOptionsPool;

/**
* @var EngineResolver
* @var EngineResolverInterface
*/
private $engineResolver;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
use Magento\Framework\Model\AbstractModel;
use Magento\Catalog\Model\ResourceModel\Attribute;
use Magento\AdvancedSearch\Model\Client\ClientOptionsInterface;
use Magento\Framework\Search\EngineResolverInterface;
use Magento\Search\Model\EngineResolver;

class CustomerGroup extends AbstractPlugin
{
Expand All @@ -22,24 +20,16 @@ class CustomerGroup extends AbstractPlugin
*/
protected $clientOptions;

/**
* @var EngineResolverInterface
*/
protected $engineResolver;

/**
* @param IndexerRegistry $indexerRegistry
* @param ClientOptionsInterface $clientOptions
* @param EngineResolverInterface $engineResolver
*/
public function __construct(
IndexerRegistry $indexerRegistry,
ClientOptionsInterface $clientOptions,
EngineResolverInterface $engineResolver
ClientOptionsInterface $clientOptions
) {
parent::__construct($indexerRegistry);
$this->clientOptions = $clientOptions;
$this->engineResolver = $engineResolver;
}

/**
Expand All @@ -56,9 +46,7 @@ public function aroundSave(
\Closure $proceed,
AbstractModel $group
) {
$needInvalidation =
($this->engineResolver->getCurrentSearchEngine() != EngineResolver::CATALOG_SEARCH_MYSQL_ENGINE)
&& ($group->isObjectNew() || $group->dataHasChangedFor('tax_class_id'));
$needInvalidation = $group->isObjectNew() || $group->dataHasChangedFor('tax_class_id');
$result = $proceed($group);
if ($needInvalidation) {
$this->indexerRegistry->get(Fulltext::INDEXER_ID)->invalidate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
use Magento\Customer\Model\ResourceModel\Group as CustomerGroupResourceModel;
use Magento\Framework\Indexer\IndexerInterface;
use Magento\Framework\Indexer\IndexerRegistry;
use Magento\Framework\Search\EngineResolverInterface;
use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\MockObject\MockObject;

/**
* @covers \Magento\AdvancedSearch\Model\Indexer\Fulltext\Plugin\CustomerGroup
Expand All @@ -35,7 +35,7 @@ class CustomerGroupTest extends TestCase
private $indexerMock;

/**
* @var Group|MockObject
* @var CustomerGroupResourceModel|MockObject
*/
private $subjectMock;

Expand All @@ -49,11 +49,6 @@ class CustomerGroupTest extends TestCase
*/
private $indexerRegistryMock;

/**
* @var EngineResolverInterface|MockObject
*/
private $engineResolverMock;

protected function setUp(): void
{
$this->subjectMock = $this->createMock(CustomerGroupResourceModel::class);
Expand All @@ -73,35 +68,24 @@ protected function setUp(): void
IndexerRegistry::class,
['get']
);
$this->engineResolverMock = $this->createPartialMock(
EngineResolverInterface::class,
['getCurrentSearchEngine']
);
$this->model = new CustomerGroupPlugin(
$this->indexerRegistryMock,
$this->customerOptionsMock,
$this->engineResolverMock
$this->customerOptionsMock
);
}

/**
* @param string $searchEngine
* @param bool $isObjectNew
* @param bool $isTaxClassIdChanged
* @param int $invalidateCounter
* @return void
* @dataProvider aroundSaveDataProvider
*/
public function testAroundSave(
string $searchEngine,
bool $isObjectNew,
bool $isTaxClassIdChanged,
int $invalidateCounter
): void {
$this->engineResolverMock->expects($this->once())
->method('getCurrentSearchEngine')
->willReturn($searchEngine);

$groupMock = $this->createPartialMock(
CustomerGroupModel::class,
['dataHasChangedFor', 'isObjectNew', '__wakeup']
Expand Down Expand Up @@ -137,14 +121,10 @@ public function testAroundSave(
public function aroundSaveDataProvider(): array
{
return [
['mysql', false, false, 0],
['mysql', false, true, 0],
['mysql', true, false, 0],
['mysql', true, true, 0],
['custom', false, false, 0],
['custom', false, true, 1],
['custom', true, false, 1],
['custom', true, true, 1],
[false, false, 0],
[false, true, 1],
[true, false, 1],
[true, true, 1],
];
}
}
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,10 +9,10 @@
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="query_id" padding="10" unsigned="true" nullable="false" identity="false"
<column xsi:type="int" name="id" unsigned="true" nullable="false" identity="true" comment="ID"/>
<column xsi:type="int" name="query_id" unsigned="true" nullable="false" identity="false"
default="0" comment="Query ID"/>
<column xsi:type="int" name="relation_id" padding="10" unsigned="true" nullable="false" identity="false"
<column xsi:type="int" name="relation_id" unsigned="true" nullable="false" identity="false"
default="0" comment="Relation ID"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="id"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Show extends Action implements HttpGetActionInterface
/**
* @inheritdoc
*/
const ADMIN_RESOURCE = 'Magento_Analytics::analytics_settings';
const ADMIN_RESOURCE = 'Magento_Analytics::advanced_reporting';

/**
* @param Context $context
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Analytics/Test/Mftf/Data/UserRoleData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@
<item>Magento_Backend::custom</item>
<item>Magento_Backend::tools</item>
<item>Magento_Backend::cache</item>
<item>Magento_Backend::setup_wizard</item>
<item>Magento_Backup::backup</item>
<item>Magento_Backup::rollback</item>
<item>Magento_Indexer::index</item>
Expand Down
6 changes: 1 addition & 5 deletions app/code/Magento/Analytics/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,7 @@
<item name="27" xsi:type="string">payment/cashondelivery/active</item>
<item name="28" xsi:type="string">payment/paypal_billing_agreement/title</item>
<item name="29" xsi:type="string">payment/paypal_billing_agreement/active</item>
<item name="30" xsi:type="string">payment/braintree/title</item>
<item name="31" xsi:type="string">payment/braintree/active</item>
<item name="32" xsi:type="string">payment/braintree_paypal/title</item>
<item name="33" xsi:type="string">payment/braintree_paypal/active</item>
<item name="34" xsi:type="string">analytics/general/vertical</item>
<item name="30" xsi:type="string">analytics/general/vertical</item>
</argument>
</arguments>
</type>
Expand Down
14 changes: 7 additions & 7 deletions app/code/Magento/AsynchronousOperations/etc/db_schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
<table name="magento_bulk" resource="default" engine="innodb"
comment="Bulk entity that represents set of related asynchronous operations">
<column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
<column xsi:type="int" name="id" unsigned="true" nullable="false" identity="true"
comment="Bulk Internal ID (must not be exposed)"/>
<column xsi:type="varbinary" name="uuid" nullable="true" length="39"
comment="Bulk UUID (can be exposed to reference bulk entity)"/>
<column xsi:type="int" name="user_id" padding="10" unsigned="true" nullable="true" identity="false"
<column xsi:type="int" name="user_id" unsigned="true" nullable="true" identity="false"
comment="ID of the WebAPI user that performed an action"/>
<column xsi:type="int" name="user_type" nullable="true" comment="Which type of user"/>
<column xsi:type="varchar" name="description" nullable="true" length="255" comment="Bulk Description"/>
<column xsi:type="int" name="operation_count" padding="10" unsigned="true" nullable="false" identity="false"
<column xsi:type="int" name="operation_count" unsigned="true" nullable="false" identity="false"
comment="Total number of operations scheduled within this bulk"/>
<column xsi:type="timestamp" name="start_time" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
comment="Bulk start time"/>
Expand All @@ -32,7 +32,7 @@
</index>
</table>
<table name="magento_operation" resource="default" engine="innodb" comment="Operation entity">
<column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
<column xsi:type="int" name="id" unsigned="true" nullable="false" identity="true"
comment="Operation ID"/>
<column xsi:type="varbinary" name="bulk_uuid" nullable="true" length="39" comment="Related Bulk UUID"/>
<column xsi:type="varchar" name="topic_name" nullable="true" length="255"
Expand All @@ -41,9 +41,9 @@
comment="Data (serialized) required to perform an operation"/>
<column xsi:type="blob" name="result_serialized_data" nullable="true"
comment="Result data (serialized) after perform an operation"/>
<column xsi:type="smallint" name="status" padding="6" unsigned="false" nullable="true" identity="false"
<column xsi:type="smallint" name="status" unsigned="false" nullable="true" identity="false"
default="0" comment="Operation status (OPEN | COMPLETE | RETRIABLY_FAILED | NOT_RETRIABLY_FAILED)"/>
<column xsi:type="smallint" name="error_code" padding="6" unsigned="false" nullable="true" identity="false"
<column xsi:type="smallint" name="error_code" unsigned="false" nullable="true" identity="false"
comment="Code of the error that appeared during operation execution (used to aggregate related failed operations)"/>
<column xsi:type="varchar" name="result_message" nullable="true" length="255"
comment="Operation result message"/>
Expand All @@ -59,7 +59,7 @@
</table>
<table name="magento_acknowledged_bulk" resource="default" engine="innodb"
comment="Bulk that was viewed by user from notification area">
<column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
<column xsi:type="int" name="id" unsigned="true" nullable="false" identity="true"
comment="Internal ID"/>
<column xsi:type="varbinary" name="bulk_uuid" nullable="true" length="39" comment="Related Bulk UUID"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
Expand Down
Loading

0 comments on commit 7ff6063

Please sign in to comment.