Skip to content

magento/magento2#15775: [Forwardport] Incorrect return type getList() in CustomerRepository. #20181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\AsynchronousOperations\Model;

use Magento\AsynchronousOperations\Api\Data\OperationSearchResultsInterface;
use Magento\Framework\Api\SearchResults;

/**
* Service Data Object with bulk Operation search result.
*/
class OperationSearchResults extends SearchResults implements OperationSearchResultsInterface
{
}
2 changes: 1 addition & 1 deletion app/code/Magento/AsynchronousOperations/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<preference for="Magento\AsynchronousOperations\Api\Data\SummaryOperationStatusInterface" type="Magento\AsynchronousOperations\Model\OperationStatus" />
<preference for="Magento\AsynchronousOperations\Api\Data\DetailedBulkOperationsStatusInterface" type="Magento\AsynchronousOperations\Model\BulkStatus\Detailed" />
<preference for="Magento\AsynchronousOperations\Api\Data\BulkOperationsStatusInterface" type="Magento\AsynchronousOperations\Model\BulkStatus\Short" />
<preference for="Magento\AsynchronousOperations\Api\Data\OperationSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
<preference for="Magento\AsynchronousOperations\Api\Data\OperationSearchResultsInterface" type="Magento\AsynchronousOperations\Model\OperationSearchResults" />
<preference for="Magento\AsynchronousOperations\Api\OperationRepositoryInterface" type="Magento\AsynchronousOperations\Model\OperationRepository" />
<type name="Magento\Framework\EntityManager\MetadataPool">
<arguments>
Expand Down
18 changes: 18 additions & 0 deletions app/code/Magento/Catalog/Model/CategoryAttributeSearchResults.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Catalog\Model;

use Magento\Catalog\Api\Data\CategoryAttributeSearchResultsInterface;
use Magento\Framework\Api\SearchResults;

/**
* Service Data Object with Category Attribute search results.
*/
class CategoryAttributeSearchResults extends SearchResults implements CategoryAttributeSearchResultsInterface
{
}
18 changes: 18 additions & 0 deletions app/code/Magento/Catalog/Model/CategorySearchResults.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Catalog\Model;

use Magento\Catalog\Api\Data\CategorySearchResultsInterface;
use Magento\Framework\Api\SearchResults;

/**
* Service Data Object with Category search results.
*/
class CategorySearchResults extends SearchResults implements CategorySearchResultsInterface
{
}
18 changes: 18 additions & 0 deletions app/code/Magento/Catalog/Model/ProductAttributeSearchResults.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Catalog\Model;

use Magento\Catalog\Api\Data\ProductAttributeSearchResultsInterface;
use Magento\Framework\Api\SearchResults;

/**
* Service Data Object with Product Attribute search results.
*/
class ProductAttributeSearchResults extends SearchResults implements ProductAttributeSearchResultsInterface
{
}
18 changes: 18 additions & 0 deletions app/code/Magento/Catalog/Model/ProductSearchResults.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Catalog\Model;

use Magento\Catalog\Api\Data\ProductSearchResultsInterface;
use Magento\Framework\Api\SearchResults;

/**
* Service Data Object with Product search results.
*/
class ProductSearchResults extends SearchResults implements ProductSearchResultsInterface
{
}
8 changes: 4 additions & 4 deletions app/code/Magento/Catalog/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@
<preference for="Magento\Catalog\Api\ProductAttributeGroupRepositoryInterface" type="Magento\Catalog\Model\ProductAttributeGroupRepository" />
<preference for="Magento\Catalog\Api\ProductAttributeOptionManagementInterface" type="Magento\Catalog\Model\Product\Attribute\OptionManagement" />
<preference for="Magento\Catalog\Api\ProductLinkRepositoryInterface" type="Magento\Catalog\Model\ProductLink\Repository" />
<preference for="Magento\Catalog\Api\Data\ProductAttributeSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
<preference for="Magento\Catalog\Api\Data\CategoryAttributeSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
<preference for="Magento\Catalog\Api\Data\ProductSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
<preference for="Magento\Catalog\Api\Data\ProductAttributeSearchResultsInterface" type="Magento\Catalog\Model\ProductAttributeSearchResults" />
<preference for="Magento\Catalog\Api\Data\CategoryAttributeSearchResultsInterface" type="Magento\Catalog\Model\CategoryAttributeSearchResults" />
<preference for="Magento\Catalog\Api\Data\ProductSearchResultsInterface" type="Magento\Catalog\Model\ProductSearchResults" />
<preference for="Magento\Catalog\Api\ProductAttributeManagementInterface" type="Magento\Catalog\Model\Product\Attribute\Management" />
<preference for="Magento\Catalog\Api\AttributeSetManagementInterface" type="Magento\Catalog\Model\Product\Attribute\SetManagement" />
<preference for="Magento\Catalog\Api\AttributeSetRepositoryInterface" type="Magento\Catalog\Model\Product\Attribute\SetRepository" />
<preference for="Magento\Catalog\Api\ProductManagementInterface" type="Magento\Catalog\Model\ProductManagement" />
<preference for="Magento\Catalog\Api\AttributeSetFinderInterface" type="Magento\Catalog\Model\Product\Attribute\AttributeSetFinder" />
<preference for="Magento\Catalog\Api\CategoryListInterface" type="Magento\Catalog\Model\CategoryList" />
<preference for="Magento\Catalog\Api\Data\CategorySearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
<preference for="Magento\Catalog\Api\Data\CategorySearchResultsInterface" type="Magento\Catalog\Model\CategorySearchResults" />
<preference for="Magento\Catalog\Model\Config\Source\ProductPriceOptionsInterface" type="Magento\Catalog\Model\Config\Source\Product\Options\Price"/>
<preference for="Magento\Catalog\Model\Indexer\Product\Flat\Table\BuilderInterface" type="Magento\Catalog\Model\Indexer\Product\Flat\Table\Builder"/>
<preference for="Magento\Catalog\Api\ProductRenderListInterface" type="Magento\Catalog\Model\ProductRenderList"/>
Expand Down
18 changes: 18 additions & 0 deletions app/code/Magento/Cms/Model/BlockSearchResults.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Cms\Model;

use Magento\Cms\Api\Data\BlockSearchResultsInterface;
use Magento\Framework\Api\SearchResults;

/**
* Service Data Object with Block search results.
*/
class BlockSearchResults extends SearchResults implements BlockSearchResultsInterface
{
}
18 changes: 18 additions & 0 deletions app/code/Magento/Cms/Model/PageSearchResults.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Cms\Model;

use Magento\Cms\Api\Data\PageSearchResultsInterface;
use Magento\Framework\Api\SearchResults;

/**
* Service Data Object with Page search results.
*/
class PageSearchResults extends SearchResults implements PageSearchResultsInterface
{
}
5 changes: 2 additions & 3 deletions app/code/Magento/Cms/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Cms\Api\Data\PageSearchResultsInterface"
type="Magento\Framework\Api\SearchResults" />
type="Magento\Cms\Model\PageSearchResults" />
<preference for="Magento\Cms\Api\Data\BlockSearchResultsInterface"
type="Magento\Framework\Api\SearchResults" />
type="Magento\Cms\Model\BlockSearchResults" />
<preference for="Magento\Cms\Api\GetBlockByIdentifierInterface" type="Magento\Cms\Model\GetBlockByIdentifier" />
<preference for="Magento\Cms\Api\GetPageByIdentifierInterface" type="Magento\Cms\Model\GetPageByIdentifier" />
<preference for="Magento\Cms\Api\Data\PageInterface" type="Magento\Cms\Model\Page" />
Expand Down Expand Up @@ -234,4 +234,3 @@
</arguments>
</type>
</config>

18 changes: 18 additions & 0 deletions app/code/Magento/Customer/Model/AddressSearchResults.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Customer\Model;

use Magento\Customer\Api\Data\AddressSearchResultsInterface;
use Magento\Framework\Api\SearchResults;

/**
* Service Data Object with Address search results.
*/
class AddressSearchResults extends SearchResults implements AddressSearchResultsInterface
{
}
18 changes: 18 additions & 0 deletions app/code/Magento/Customer/Model/CustomerSearchResults.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Customer\Model;

use Magento\Customer\Api\Data\CustomerSearchResultsInterface;
use Magento\Framework\Api\SearchResults;

/**
* Service Data Object with Customer search results.
*/
class CustomerSearchResults extends SearchResults implements CustomerSearchResultsInterface
{
}
18 changes: 18 additions & 0 deletions app/code/Magento/Customer/Model/GroupSearchResults.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Customer\Model;

use Magento\Customer\Api\Data\GroupSearchResultsInterface;
use Magento\Framework\Api\SearchResults;

/**
* Service Data Object with Customer Groups search results.
*/
class GroupSearchResults extends SearchResults implements GroupSearchResultsInterface
{
}
6 changes: 3 additions & 3 deletions app/code/Magento/Customer/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
<preference for="Magento\Customer\Api\Data\ValidationResultsInterface"
type="Magento\Customer\Model\Data\ValidationResults" />
<preference for="Magento\Customer\Api\Data\GroupSearchResultsInterface"
type="Magento\Framework\Api\SearchResults" />
type="Magento\Customer\Model\GroupSearchResults" />
<preference for="Magento\Customer\Api\Data\CustomerSearchResultsInterface"
type="Magento\Framework\Api\SearchResults" />
type="Magento\Customer\Model\CustomerSearchResults" />
<preference for="Magento\Customer\Api\Data\AddressSearchResultsInterface"
type="Magento\Framework\Api\SearchResults" />
type="Magento\Customer\Model\AddressSearchResults" />
<preference for="Magento\Customer\Api\AccountManagementInterface"
type="Magento\Customer\Model\AccountManagement" />
<preference for="Magento\Customer\Api\CustomerMetadataInterface"
Expand Down
18 changes: 18 additions & 0 deletions app/code/Magento/Eav/Model/AttributeGroupSearchResults.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Eav\Model;

use Magento\Eav\Api\Data\AttributeGroupSearchResultsInterface;
use Magento\Framework\Api\SearchResults;

/**
* Service Data Object with Attribute Group search results.
*/
class AttributeGroupSearchResults extends SearchResults implements AttributeGroupSearchResultsInterface
{
}
18 changes: 18 additions & 0 deletions app/code/Magento/Eav/Model/AttributeSearchResults.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Eav\Model;

use Magento\Eav\Api\Data\AttributeSearchResultsInterface;
use Magento\Framework\Api\SearchResults;

/**
* Service Data Object with Eav Attribute search results.
*/
class AttributeSearchResults extends SearchResults implements AttributeSearchResultsInterface
{
}
18 changes: 18 additions & 0 deletions app/code/Magento/Eav/Model/AttributeSetSearchResults.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Eav\Model;

use Magento\Eav\Api\Data\AttributeSetSearchResultsInterface;
use Magento\Framework\Api\SearchResults;

/**
* Service Data Object with Attribute Set search results.
*/
class AttributeSetSearchResults extends SearchResults implements AttributeSetSearchResultsInterface
{
}
6 changes: 3 additions & 3 deletions app/code/Magento/Eav/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<preference for="Magento\Eav\Api\AttributeOptionManagementInterface" type="Magento\Eav\Model\Entity\Attribute\OptionManagement" />
<preference for="Magento\Eav\Api\Data\AttributeOptionLabelInterface" type="Magento\Eav\Model\Entity\Attribute\OptionLabel" />
<preference for="Magento\Eav\Api\Data\AttributeValidationRuleInterface" type="Magento\Eav\Model\Entity\Attribute\ValidationRule" />
<preference for="Magento\Eav\Api\Data\AttributeSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
<preference for="Magento\Eav\Api\Data\AttributeSetSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
<preference for="Magento\Eav\Api\Data\AttributeGroupSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
<preference for="Magento\Eav\Api\Data\AttributeSearchResultsInterface" type="Magento\Eav\Model\AttributeSearchResults" />
<preference for="Magento\Eav\Api\Data\AttributeSetSearchResultsInterface" type="Magento\Eav\Model\AttributeSetSearchResults" />
<preference for="Magento\Eav\Api\Data\AttributeGroupSearchResultsInterface" type="Magento\Eav\Model\AttributeGroupSearchResults" />
<preference for="Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface" type="Magento\Eav\Model\TypeLocator" />

<type name="Magento\Eav\Model\Entity\Attribute\Config">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Quote\Api\Data;

/**
Expand Down
65 changes: 65 additions & 0 deletions app/code/Magento/Quote/Model/CartSearchResults.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Quote\Model;

use Magento\Framework\Api\AbstractSimpleObject;
use Magento\Quote\Api\Data\CartSearchResultsInterface;

/**
* Service Data Object with Cart search results.
*/
class CartSearchResults extends AbstractSimpleObject implements CartSearchResultsInterface
{
/**
* @inheritdoc
*/
public function setItems(array $items = null)
{
return $this->setData(self::KEY_ITEMS, $items);
}

/**
* @inheritdoc
*/
public function getItems()
{
return $this->_get(self::KEY_ITEMS) === null ? [] : $this->_get(self::KEY_ITEMS);
}

/**
* @inheritdoc
*/
public function getSearchCriteria()
{
return $this->_get(self::KEY_SEARCH_CRITERIA);
}

/**
* @inheritdoc
*/
public function setSearchCriteria(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria)
{
return $this->setData(self::KEY_SEARCH_CRITERIA, $searchCriteria);
}

/**
* @inheritdoc
*/
public function getTotalCount()
{
return $this->_get(self::KEY_TOTAL_COUNT);
}

/**
* @inheritdoc
*/
public function setTotalCount($count)
{
return $this->setData(self::KEY_TOTAL_COUNT, $count);
}
}
Loading