Skip to content

Commit 0300ae4

Browse files
authored
ENGCOM-5964: #15775: [Forwardport] Incorrect return type getList() in CustomerRepository. #20181
2 parents 6f1a6f7 + 1097dfe commit 0300ae4

36 files changed

+489
-22
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
namespace Magento\AsynchronousOperations\Model;
9+
10+
use Magento\AsynchronousOperations\Api\Data\OperationSearchResultsInterface;
11+
use Magento\Framework\Api\SearchResults;
12+
13+
/**
14+
* Service Data Object with bulk Operation search result.
15+
*/
16+
class OperationSearchResults extends SearchResults implements OperationSearchResultsInterface
17+
{
18+
}

app/code/Magento/AsynchronousOperations/etc/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<preference for="Magento\AsynchronousOperations\Api\Data\SummaryOperationStatusInterface" type="Magento\AsynchronousOperations\Model\OperationStatus" />
1717
<preference for="Magento\AsynchronousOperations\Api\Data\DetailedBulkOperationsStatusInterface" type="Magento\AsynchronousOperations\Model\BulkStatus\Detailed" />
1818
<preference for="Magento\AsynchronousOperations\Api\Data\BulkOperationsStatusInterface" type="Magento\AsynchronousOperations\Model\BulkStatus\Short" />
19-
<preference for="Magento\AsynchronousOperations\Api\Data\OperationSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
19+
<preference for="Magento\AsynchronousOperations\Api\Data\OperationSearchResultsInterface" type="Magento\AsynchronousOperations\Model\OperationSearchResults" />
2020
<preference for="Magento\AsynchronousOperations\Api\OperationRepositoryInterface" type="Magento\AsynchronousOperations\Model\OperationRepository" />
2121
<type name="Magento\Framework\EntityManager\MetadataPool">
2222
<arguments>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
namespace Magento\Catalog\Model;
9+
10+
use Magento\Catalog\Api\Data\CategoryAttributeSearchResultsInterface;
11+
use Magento\Framework\Api\SearchResults;
12+
13+
/**
14+
* Service Data Object with Category Attribute search results.
15+
*/
16+
class CategoryAttributeSearchResults extends SearchResults implements CategoryAttributeSearchResultsInterface
17+
{
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
namespace Magento\Catalog\Model;
9+
10+
use Magento\Catalog\Api\Data\CategorySearchResultsInterface;
11+
use Magento\Framework\Api\SearchResults;
12+
13+
/**
14+
* Service Data Object with Category search results.
15+
*/
16+
class CategorySearchResults extends SearchResults implements CategorySearchResultsInterface
17+
{
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
namespace Magento\Catalog\Model;
9+
10+
use Magento\Catalog\Api\Data\ProductAttributeSearchResultsInterface;
11+
use Magento\Framework\Api\SearchResults;
12+
13+
/**
14+
* Service Data Object with Product Attribute search results.
15+
*/
16+
class ProductAttributeSearchResults extends SearchResults implements ProductAttributeSearchResultsInterface
17+
{
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
namespace Magento\Catalog\Model;
9+
10+
use Magento\Catalog\Api\Data\ProductSearchResultsInterface;
11+
use Magento\Framework\Api\SearchResults;
12+
13+
/**
14+
* Service Data Object with Product search results.
15+
*/
16+
class ProductSearchResults extends SearchResults implements ProductSearchResultsInterface
17+
{
18+
}

app/code/Magento/Catalog/etc/di.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@
3636
<preference for="Magento\Catalog\Api\ProductAttributeGroupRepositoryInterface" type="Magento\Catalog\Model\ProductAttributeGroupRepository" />
3737
<preference for="Magento\Catalog\Api\ProductAttributeOptionManagementInterface" type="Magento\Catalog\Model\Product\Attribute\OptionManagement" />
3838
<preference for="Magento\Catalog\Api\ProductLinkRepositoryInterface" type="Magento\Catalog\Model\ProductLink\Repository" />
39-
<preference for="Magento\Catalog\Api\Data\ProductAttributeSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
40-
<preference for="Magento\Catalog\Api\Data\CategoryAttributeSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
41-
<preference for="Magento\Catalog\Api\Data\ProductSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
39+
<preference for="Magento\Catalog\Api\Data\ProductAttributeSearchResultsInterface" type="Magento\Catalog\Model\ProductAttributeSearchResults" />
40+
<preference for="Magento\Catalog\Api\Data\CategoryAttributeSearchResultsInterface" type="Magento\Catalog\Model\CategoryAttributeSearchResults" />
41+
<preference for="Magento\Catalog\Api\Data\ProductSearchResultsInterface" type="Magento\Catalog\Model\ProductSearchResults" />
4242
<preference for="Magento\Catalog\Api\ProductAttributeManagementInterface" type="Magento\Catalog\Model\Product\Attribute\Management" />
4343
<preference for="Magento\Catalog\Api\AttributeSetManagementInterface" type="Magento\Catalog\Model\Product\Attribute\SetManagement" />
4444
<preference for="Magento\Catalog\Api\AttributeSetRepositoryInterface" type="Magento\Catalog\Model\Product\Attribute\SetRepository" />
4545
<preference for="Magento\Catalog\Api\ProductManagementInterface" type="Magento\Catalog\Model\ProductManagement" />
4646
<preference for="Magento\Catalog\Api\AttributeSetFinderInterface" type="Magento\Catalog\Model\Product\Attribute\AttributeSetFinder" />
4747
<preference for="Magento\Catalog\Api\CategoryListInterface" type="Magento\Catalog\Model\CategoryList" />
48-
<preference for="Magento\Catalog\Api\Data\CategorySearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
48+
<preference for="Magento\Catalog\Api\Data\CategorySearchResultsInterface" type="Magento\Catalog\Model\CategorySearchResults" />
4949
<preference for="Magento\Catalog\Model\Config\Source\ProductPriceOptionsInterface" type="Magento\Catalog\Model\Config\Source\Product\Options\Price"/>
5050
<preference for="Magento\Catalog\Model\Indexer\Product\Flat\Table\BuilderInterface" type="Magento\Catalog\Model\Indexer\Product\Flat\Table\Builder"/>
5151
<preference for="Magento\Catalog\Api\ProductRenderListInterface" type="Magento\Catalog\Model\ProductRenderList"/>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
namespace Magento\Cms\Model;
9+
10+
use Magento\Cms\Api\Data\BlockSearchResultsInterface;
11+
use Magento\Framework\Api\SearchResults;
12+
13+
/**
14+
* Service Data Object with Block search results.
15+
*/
16+
class BlockSearchResults extends SearchResults implements BlockSearchResultsInterface
17+
{
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
namespace Magento\Cms\Model;
9+
10+
use Magento\Cms\Api\Data\PageSearchResultsInterface;
11+
use Magento\Framework\Api\SearchResults;
12+
13+
/**
14+
* Service Data Object with Page search results.
15+
*/
16+
class PageSearchResults extends SearchResults implements PageSearchResultsInterface
17+
{
18+
}

app/code/Magento/Cms/etc/di.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
99
<preference for="Magento\Cms\Api\Data\PageSearchResultsInterface"
10-
type="Magento\Framework\Api\SearchResults" />
10+
type="Magento\Cms\Model\PageSearchResults" />
1111
<preference for="Magento\Cms\Api\Data\BlockSearchResultsInterface"
12-
type="Magento\Framework\Api\SearchResults" />
12+
type="Magento\Cms\Model\BlockSearchResults" />
1313
<preference for="Magento\Cms\Api\GetBlockByIdentifierInterface" type="Magento\Cms\Model\GetBlockByIdentifier" />
1414
<preference for="Magento\Cms\Api\GetPageByIdentifierInterface" type="Magento\Cms\Model\GetPageByIdentifier" />
1515
<preference for="Magento\Cms\Api\Data\PageInterface" type="Magento\Cms\Model\Page" />
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
namespace Magento\Customer\Model;
9+
10+
use Magento\Customer\Api\Data\AddressSearchResultsInterface;
11+
use Magento\Framework\Api\SearchResults;
12+
13+
/**
14+
* Service Data Object with Address search results.
15+
*/
16+
class AddressSearchResults extends SearchResults implements AddressSearchResultsInterface
17+
{
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
namespace Magento\Customer\Model;
9+
10+
use Magento\Customer\Api\Data\CustomerSearchResultsInterface;
11+
use Magento\Framework\Api\SearchResults;
12+
13+
/**
14+
* Service Data Object with Customer search results.
15+
*/
16+
class CustomerSearchResults extends SearchResults implements CustomerSearchResultsInterface
17+
{
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
namespace Magento\Customer\Model;
9+
10+
use Magento\Customer\Api\Data\GroupSearchResultsInterface;
11+
use Magento\Framework\Api\SearchResults;
12+
13+
/**
14+
* Service Data Object with Customer Groups search results.
15+
*/
16+
class GroupSearchResults extends SearchResults implements GroupSearchResultsInterface
17+
{
18+
}

app/code/Magento/Customer/etc/di.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
<preference for="Magento\Customer\Api\Data\ValidationResultsInterface"
2929
type="Magento\Customer\Model\Data\ValidationResults" />
3030
<preference for="Magento\Customer\Api\Data\GroupSearchResultsInterface"
31-
type="Magento\Framework\Api\SearchResults" />
31+
type="Magento\Customer\Model\GroupSearchResults" />
3232
<preference for="Magento\Customer\Api\Data\CustomerSearchResultsInterface"
33-
type="Magento\Framework\Api\SearchResults" />
33+
type="Magento\Customer\Model\CustomerSearchResults" />
3434
<preference for="Magento\Customer\Api\Data\AddressSearchResultsInterface"
35-
type="Magento\Framework\Api\SearchResults" />
35+
type="Magento\Customer\Model\AddressSearchResults" />
3636
<preference for="Magento\Customer\Api\AccountManagementInterface"
3737
type="Magento\Customer\Model\AccountManagement" />
3838
<preference for="Magento\Customer\Api\CustomerMetadataInterface"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
namespace Magento\Eav\Model;
9+
10+
use Magento\Eav\Api\Data\AttributeGroupSearchResultsInterface;
11+
use Magento\Framework\Api\SearchResults;
12+
13+
/**
14+
* Service Data Object with Attribute Group search results.
15+
*/
16+
class AttributeGroupSearchResults extends SearchResults implements AttributeGroupSearchResultsInterface
17+
{
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
namespace Magento\Eav\Model;
9+
10+
use Magento\Eav\Api\Data\AttributeSearchResultsInterface;
11+
use Magento\Framework\Api\SearchResults;
12+
13+
/**
14+
* Service Data Object with Eav Attribute search results.
15+
*/
16+
class AttributeSearchResults extends SearchResults implements AttributeSearchResultsInterface
17+
{
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
namespace Magento\Eav\Model;
9+
10+
use Magento\Eav\Api\Data\AttributeSetSearchResultsInterface;
11+
use Magento\Framework\Api\SearchResults;
12+
13+
/**
14+
* Service Data Object with Attribute Set search results.
15+
*/
16+
class AttributeSetSearchResults extends SearchResults implements AttributeSetSearchResultsInterface
17+
{
18+
}

app/code/Magento/Eav/etc/di.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
<preference for="Magento\Eav\Api\AttributeOptionManagementInterface" type="Magento\Eav\Model\Entity\Attribute\OptionManagement" />
2323
<preference for="Magento\Eav\Api\Data\AttributeOptionLabelInterface" type="Magento\Eav\Model\Entity\Attribute\OptionLabel" />
2424
<preference for="Magento\Eav\Api\Data\AttributeValidationRuleInterface" type="Magento\Eav\Model\Entity\Attribute\ValidationRule" />
25-
<preference for="Magento\Eav\Api\Data\AttributeSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
26-
<preference for="Magento\Eav\Api\Data\AttributeSetSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
27-
<preference for="Magento\Eav\Api\Data\AttributeGroupSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
25+
<preference for="Magento\Eav\Api\Data\AttributeSearchResultsInterface" type="Magento\Eav\Model\AttributeSearchResults" />
26+
<preference for="Magento\Eav\Api\Data\AttributeSetSearchResultsInterface" type="Magento\Eav\Model\AttributeSetSearchResults" />
27+
<preference for="Magento\Eav\Api\Data\AttributeGroupSearchResultsInterface" type="Magento\Eav\Model\AttributeGroupSearchResults" />
2828
<preference for="Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface" type="Magento\Eav\Model\TypeLocator" />
2929

3030
<type name="Magento\Eav\Model\Entity\Attribute\Config">

app/code/Magento/Quote/Api/Data/CartSearchResultsInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Quote\Api\Data;
79

810
/**
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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+
namespace Magento\Quote\Model;
9+
10+
use Magento\Framework\Api\AbstractSimpleObject;
11+
use Magento\Quote\Api\Data\CartSearchResultsInterface;
12+
13+
/**
14+
* Service Data Object with Cart search results.
15+
*/
16+
class CartSearchResults extends AbstractSimpleObject implements CartSearchResultsInterface
17+
{
18+
/**
19+
* @inheritdoc
20+
*/
21+
public function setItems(array $items = null)
22+
{
23+
return $this->setData(self::KEY_ITEMS, $items);
24+
}
25+
26+
/**
27+
* @inheritdoc
28+
*/
29+
public function getItems()
30+
{
31+
return $this->_get(self::KEY_ITEMS) === null ? [] : $this->_get(self::KEY_ITEMS);
32+
}
33+
34+
/**
35+
* @inheritdoc
36+
*/
37+
public function getSearchCriteria()
38+
{
39+
return $this->_get(self::KEY_SEARCH_CRITERIA);
40+
}
41+
42+
/**
43+
* @inheritdoc
44+
*/
45+
public function setSearchCriteria(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria)
46+
{
47+
return $this->setData(self::KEY_SEARCH_CRITERIA, $searchCriteria);
48+
}
49+
50+
/**
51+
* @inheritdoc
52+
*/
53+
public function getTotalCount()
54+
{
55+
return $this->_get(self::KEY_TOTAL_COUNT);
56+
}
57+
58+
/**
59+
* @inheritdoc
60+
*/
61+
public function setTotalCount($count)
62+
{
63+
return $this->setData(self::KEY_TOTAL_COUNT, $count);
64+
}
65+
}

0 commit comments

Comments
 (0)