Skip to content

Commit 71c76f0

Browse files
merge magento/2.3-develop into magento-tsg/2.3-develop-pr76
2 parents b602055 + f1910f0 commit 71c76f0

Some content is hidden

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

49 files changed

+1031
-425
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+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?php declare(strict_types=1);
2+
/**
3+
*
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
8+
namespace Magento\Catalog\Observer;
9+
10+
use Magento\Catalog\Model\Category;
11+
use Magento\Framework\Event\Observer as Event;
12+
use Magento\Framework\Event\ObserverInterface;
13+
use Magento\PageCache\Model\Cache\Type as PageCache;
14+
use Magento\PageCache\Model\Config as CacheConfig;
15+
16+
/**
17+
* Flush the built in page cache when a category is moved
18+
*/
19+
class FlushCategoryPagesCache implements ObserverInterface
20+
{
21+
22+
/**
23+
* @var CacheConfig
24+
*/
25+
private $cacheConfig;
26+
27+
/**
28+
*
29+
* @var PageCache
30+
*/
31+
private $pageCache;
32+
33+
/**
34+
* FlushCategoryPagesCache constructor.
35+
*
36+
* @param CacheConfig $cacheConfig
37+
* @param PageCache $pageCache
38+
*/
39+
public function __construct(CacheConfig $cacheConfig, PageCache $pageCache)
40+
{
41+
$this->cacheConfig = $cacheConfig;
42+
$this->pageCache = $pageCache;
43+
}
44+
45+
/**
46+
* Clean the category page cache if built in cache page cache is used.
47+
*
48+
* The built in cache requires cleaning all pages that contain the top category navigation menu when a
49+
* category is moved. This is because the built in cache does not support ESI blocks.
50+
*
51+
* @param Event $event
52+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
53+
*/
54+
public function execute(Event $event)
55+
{
56+
if ($this->cacheConfig->getType() == CacheConfig::BUILT_IN && $this->cacheConfig->isEnabled()) {
57+
$this->pageCache->clean(\Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, [Category::CACHE_TAG]);
58+
}
59+
}
60+
}

app/code/Magento/Catalog/etc/adminhtml/events.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@
1212
<event name="catalog_category_change_products">
1313
<observer name="category_product_indexer" instance="Magento\Catalog\Observer\CategoryProductIndexer"/>
1414
</event>
15+
<event name="category_move">
16+
<observer name="clean_cagegory_page_cache" instance="Magento\Catalog\Observer\FlushCategoryPagesCache" />
17+
</event>
1518
</config>

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+
}

0 commit comments

Comments
 (0)