Skip to content

Commit 778be58

Browse files
committed
MAGETWO-95259: CatalogSearch module deprecation must be reverted
- Deprecated all classes/interfaces in Magento\Framework\Search\Adapter\Mysql and added missing descriptions to avoid static tests failures. - Deprecated MySQL search related unit tests (for easier removal in the future) - Removed deprecation of Magento\CatalogSearch\Model\ResourceModel\FulltextCollection (it should be kept and refactored)
1 parent 1967990 commit 778be58

Some content is hidden

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

57 files changed

+309
-32
lines changed

app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020

2121
/**
2222
* Fulltext Collection
23-
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
23+
*
24+
* This collection should be refactored to not have dependencies on MySQL-specific implementation.
2425
*
2526
* @api
2627
* @since 100.0.2
27-
* @deprecated
28-
* @see \Magento\ElasticSearch
28+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2929
*/
3030
class Collection extends \Magento\Catalog\Model\ResourceModel\Product\Collection
3131
{

app/code/Magento/CatalogSearch/Setup/Patch/Data/MySQLSearchDeprecationNotification.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
namespace Magento\CatalogSearch\Setup\Patch\Data;
99

10+
/**
11+
* Implementation of the notification about MySQL search being deprecated.
12+
*
13+
* @deprecated
14+
* @see \Magento\ElasticSearch
15+
*/
1016
class MySQLSearchDeprecationNotification implements \Magento\Framework\Setup\Patch\DataPatchInterface
1117
{
1218
/**

app/code/Magento/CatalogSearch/Test/Unit/Model/Adapter/Mysql/Aggregation/DataProvider/QueryBuilderTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
* Test for Magento\CatalogSearch\Model\Adapter\Mysql\Aggregation\DataProvider\QueryBuilder.
2121
*
2222
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
23+
* @deprecated
24+
* @see \Magento\ElasticSearch
2325
*/
2426
class QueryBuilderTest extends \PHPUnit\Framework\TestCase
2527
{

app/code/Magento/CatalogSearch/Test/Unit/Model/Adapter/Mysql/Aggregation/DataProviderTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323

2424
/**
2525
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
26+
*
27+
* @deprecated
28+
* @see \Magento\ElasticSearch
2629
*/
2730
class DataProviderTest extends \PHPUnit\Framework\TestCase
2831
{

app/code/Magento/CatalogSearch/Test/Unit/Model/Adapter/Mysql/Dynamic/DataProviderTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
use Magento\Store\Model\StoreManager;
2020

2121
/**
22-
* Class DataProviderTest
2322
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
23+
* @deprecated
24+
* @see \Magento\ElasticSearch
2425
*/
2526
class DataProviderTest extends \PHPUnit\Framework\TestCase
2627
{

app/code/Magento/CatalogSearch/Test/Unit/Model/Adapter/Mysql/Field/ResolverTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
/**
1111
* Unit tests for Magento\CatalogSearch\Model\Adapter\Mysql\Field\Resolver class.
12+
*
13+
* @deprecated
14+
* @see \Magento\ElasticSearch
1215
*/
1316
class ResolverTest extends \PHPUnit\Framework\TestCase
1417
{

app/code/Magento/CatalogSearch/Test/Unit/Model/Adapter/Mysql/Filter/AliasResolverTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
use Magento\CatalogSearch\Model\Search\RequestGenerator;
1010
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
1111

12+
/**
13+
* @deprecated
14+
* @see \Magento\ElasticSearch
15+
*/
1216
class AliasResolverTest extends \PHPUnit\Framework\TestCase
1317
{
1418
/**

app/code/Magento/CatalogSearch/Test/Unit/Model/Adapter/Mysql/Filter/PreprocessorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
/**
1717
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
18+
* @deprecated
19+
* @see \Magento\ElasticSearch
1820
*/
1921
class PreprocessorTest extends \PHPUnit\Framework\TestCase
2022
{

app/code/Magento/CatalogSearch/Test/Unit/Model/ResourceModel/Advanced/CollectionTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* Tests Magento\CatalogSearch\Model\ResourceModel\Advanced\Collection
1414
*
1515
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
16+
* @deprecated
17+
* @see \Magento\ElasticSearch
1618
*/
1719
class CollectionTest extends BaseCollection
1820
{

app/code/Magento/CatalogSearch/Test/Unit/Model/ResourceModel/BaseCollection.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
* Base class for Collection tests.
1010
*
1111
* Contains helper methods to get commonly used mocks used for collection tests.
12+
*
13+
* @deprecated
14+
* @see \Magento\ElasticSearch
1215
**/
1316
class BaseCollection extends \PHPUnit\Framework\TestCase
1417
{

0 commit comments

Comments
 (0)