Skip to content

Commit c710e4c

Browse files
committed
Merge remote-tracking branch 'origin/2.4-develop' into 2.4-develop-pr32
2 parents 83505e3 + 3dcb97f commit c710e4c

File tree

742 files changed

+10142
-2353
lines changed

Some content is hidden

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

742 files changed

+10142
-2353
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?php
2+
/**
3+
*
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
declare(strict_types=1);
8+
9+
namespace Magento\TestModuleOverrideConfig\Model;
10+
11+
/**
12+
* Class represent simple container to save data
13+
*/
14+
class FixtureCallStorage
15+
{
16+
/** @var array */
17+
private $storage = [];
18+
19+
/**
20+
* Add fixture to storage
21+
*
22+
* @param string $fixture
23+
*/
24+
public function addFixtureToStorage(string $fixture): void
25+
{
26+
$this->storage[] = $fixture;
27+
}
28+
29+
/**
30+
* Get fixture position in storage
31+
*
32+
* @param string $fixture
33+
* @return false|int
34+
*/
35+
public function getFixturePosition(string $fixture)
36+
{
37+
return array_search($fixture, $this->storage);
38+
}
39+
40+
/**
41+
* Get storage
42+
*
43+
* @return array
44+
*/
45+
public function getStorage(): array
46+
{
47+
return $this->storage;
48+
}
49+
50+
/**
51+
* Get fixtures count in storage
52+
*
53+
* @param string $fixture
54+
* @return int
55+
*/
56+
public function getFixturesCount(string $fixture = ''): int
57+
{
58+
$count = count($this->storage);
59+
if ($fixture) {
60+
$result = array_filter($this->storage, function ($storedFixture) use ($fixture) {
61+
return $storedFixture === $fixture;
62+
});
63+
$count = count($result);
64+
}
65+
66+
return $count;
67+
}
68+
69+
/**
70+
* Clear storage
71+
*
72+
* @return void
73+
*/
74+
public function clearStorage(): void
75+
{
76+
$this->storage = [];
77+
}
78+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "magento/module-override-config-test",
3+
"description": "module for override config check",
4+
"config": {
5+
"sort-packages": true
6+
},
7+
"require": {
8+
"php": "~7.1.3||~7.2.0||~7.3.0",
9+
"magento/framework": "*",
10+
"magento/module-integration": "*"
11+
},
12+
"type": "magento2-module",
13+
"extra": {
14+
"map": [
15+
[
16+
"*",
17+
"Magento/TestModuleOverrideConfig"
18+
]
19+
]
20+
}
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
9+
<system>
10+
<section id="test_section" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
11+
<group id="test_group" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
12+
<field id="field_1" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"/>
13+
<field id="field_2" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"/>
14+
<field id="field_3" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"/>
15+
</group>
16+
</section>
17+
</system>
18+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
9+
<default>
10+
<test_section>
11+
<test_group>
12+
<field_1>1st field default value</field_1>
13+
<field_2>2nd field default value</field_2>
14+
<field_3>3rd field default value</field_3>
15+
</test_group>
16+
</test_section>
17+
</default>
18+
<websites>
19+
<base>
20+
<test_section>
21+
<test_group>
22+
<field_3>3rd field website scope default value</field_3>
23+
</test_group>
24+
</test_section>
25+
</base>
26+
</websites>
27+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9+
<module name="Magento_TestModuleOverrideConfig" />
10+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
use Magento\Framework\Component\ComponentRegistrar;
9+
10+
$registrar = new ComponentRegistrar();
11+
if ($registrar->getPath(ComponentRegistrar::MODULE, 'Magento_TestModuleOverrideConfig') === null) {
12+
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestModuleOverrideConfig', __DIR__);
13+
}

0 commit comments

Comments
 (0)