-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔃 [EngCom] Public Pull Requests - 2.3-develop Minor Fixes
Accepted Public Pull Requests: - #21476: Fix/issue 21192 (by @DenisSaltanahmedov) - #21503: Remove setting of page title from Form/Register block and add title to customer_account_create layout (by @mfickers) - #20239: Fixed issue #20187 Downloadble Price duplicate issue (by @GovindaSharma) - #21462: URL rewrite fix while product website update using mass action (by @AnshuMishra17) - #17668: Adding property mapper for product eav attribute -> search weight. (by @bartoszkubicki) - #21279: Fixed: #21278, Add sort order on downloadable links (by @maheshWebkul721) - #21170: Fix issue with custom option file uploading (by @nikolaevas) - #20484: Fix performance leak in salesrule collection (by @david-fuehr) - #19637: Fixed Issue #19632 - Backend Marketing Cart Price Rule Label Alignment Issue (by @speedy008) - #18705: Correct child node load when multiple calls to CategoryManagement::ge� (by @pmclain) Fixed GitHub Issues: - #21192: Wrong data of Import status with Add/Update method in Advanced Prices in CSV (reported by @DenisSaltanahmedov) has been fixed in #21476 by @DenisSaltanahmedov in 2.3-develop branch Related commits: 1. 2f1bc31 2. e29807f 3. df93752 - #20187: Downloadable product view layout (reported by @melaxon) has been fixed in #20239 by @GovindaSharma in 2.3-develop branch Related commits: 1. e6f6422 - #21329: URL Rewrites are overwritten (reported by @AnshuMishra17) has been fixed in #21462 by @AnshuMishra17 in 2.3-develop branch Related commits: 1. 7cacec1 - #21278: Sort order missing on Downloadable Product Links and Sample Columns (reported by @maheshWebkul721) has been fixed in #21279 by @maheshWebkul721 in 2.3-develop branch Related commits: 1. c9a9d64 2. 92d2a3c 3. 03f0c3a 4. 81a4de8 - #19117: High Database Load for Sales Rule Validation (reported by @rauberdaniel) has been fixed in #20484 by @david-fuehr in 2.3-develop branch Related commits: 1. 79cefb5 2. 41de8cb 3. fa7fb54 4. 18c8bb5 5. 0319bb0 6. 83e1e84 7. 24e7dd7 8. 91fecf7 9. 5ca9dbd 10. 11e5397 11. e516ebc - #19632: Backend Marketing Cart Price Rule Label Alignment Issue (reported by @speedy008) has been fixed in #19637 by @speedy008 in 2.3-develop branch Related commits: 1. 2e855c4 2. f4de914 - #17297: No children data for \Magento\Catalog\Model\CategoryManagement::getTree($categoryId) after first call. (reported by @j0um) has been fixed in #18705 by @pmclain in 2.3-develop branch Related commits: 1. 0db0e84
- Loading branch information
Showing
16 changed files
with
318 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
app/code/Magento/CatalogSearch/Model/ResourceModel/Setup/PropertyMapper.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\CatalogSearch\Model\ResourceModel\Setup; | ||
|
||
use Magento\Eav\Model\Entity\Setup\PropertyMapperAbstract; | ||
|
||
/** | ||
* Class PropertyMapper | ||
* | ||
* @package Magento\CatalogSearch\Model\ResourceModel\Setup | ||
*/ | ||
class PropertyMapper extends PropertyMapperAbstract | ||
{ | ||
/** | ||
* Map input attribute properties to storage representation | ||
* | ||
* @param array $input | ||
* @param int $entityTypeId | ||
* @return array | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
*/ | ||
public function map(array $input, $entityTypeId): array | ||
{ | ||
return [ | ||
'search_weight' => $this->_getValue($input, 'search_weight', 1), | ||
]; | ||
} | ||
} |
65 changes: 65 additions & 0 deletions
65
app/code/Magento/CatalogSearch/Test/Unit/Model/ResourceModel/Setup/PropertyMapperTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\CatalogSearch\Test\Unit\Model\ResourceModel\Setup; | ||
|
||
use Magento\CatalogSearch\Model\ResourceModel\Setup\PropertyMapper; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
/** | ||
* Class PropertyMapperTest | ||
* | ||
* @package Magento\CatalogSearch\Test\Unit\Model\ResourceModel\Setup | ||
*/ | ||
class PropertyMapperTest extends TestCase | ||
{ | ||
/** | ||
* @var PropertyMapper | ||
*/ | ||
private $propertyMapper; | ||
|
||
/** | ||
* @return void | ||
*/ | ||
protected function setUp(): void | ||
{ | ||
$this->propertyMapper = new PropertyMapper(); | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function caseProvider(): array | ||
{ | ||
return [ | ||
[ | ||
['search_weight' => 9, 'something_other' => '3'], | ||
['search_weight' => 9] | ||
], | ||
[ | ||
['something' => 3], | ||
['search_weight' => 1] | ||
] | ||
]; | ||
} | ||
|
||
/** | ||
* @dataProvider caseProvider | ||
* | ||
* @test | ||
* | ||
* @param array $input | ||
* @param array $result | ||
* @return void | ||
*/ | ||
public function testMapCorrectlyMapsValue(array $input, array $result): void | ||
{ | ||
//Second parameter doesn't matter as it is not used | ||
$this->assertSame($result, $this->propertyMapper->map($input, 4)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.