Skip to content

Commit 16a1c24

Browse files
authored
feat: adjust type for EntityRepository in ThumbnailSizesChangedListener
1 parent 8ca3066 commit 16a1c24

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

CHANGELOG_en-GB.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 2.1.1
2+
* Fixed exception in ThumbnailSizesChangedListener to support old MediaFolderRepositoryDecorator for Shopware 6.4
3+
14
# 2.1.0
25
* Adjust wordings and remove typos
36
* Add configuration within the plugin to activate its function explicit

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"thumbnail"
1212
],
1313
"description": "This plugins allows you to use variable thumbnails, without having them on storage.",
14-
"version": "2.1.0",
14+
"version": "2.1.1",
1515
"type": "shopware-platform-plugin",
1616
"license": "mit",
1717
"authors": [

src/EventListener/ThumbnailSizesChangedListener.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Shopware\Core\Content\Media\Aggregate\MediaFolder\MediaFolderEntity;
66
use Shopware\Core\Content\Media\Aggregate\MediaFolderConfigurationMediaThumbnailSize\MediaFolderConfigurationMediaThumbnailSizeDefinition;
77
use Shopware\Core\Content\Media\Commands\GenerateThumbnailsCommand;
8-
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepository;
8+
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
99
use Shopware\Core\Framework\DataAbstractionLayer\Event\EntityWrittenEvent;
1010
use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
1111
use Shopware\Core\Framework\DataAbstractionLayer\Search\Filter\EqualsAnyFilter;
@@ -17,11 +17,11 @@ class ThumbnailSizesChangedListener implements EventSubscriberInterface
1717
{
1818
private GenerateThumbnailsCommand $generateThumbnailsCommand;
1919

20-
private EntityRepository $mediaFolderRepository;
20+
private EntityRepositoryInterface $mediaFolderRepository;
2121

2222
public function __construct(
2323
GenerateThumbnailsCommand $generateThumbnailsCommand,
24-
EntityRepository $mediaFolderRepository
24+
EntityRepositoryInterface $mediaFolderRepository
2525
) {
2626
$this->mediaFolderRepository = $mediaFolderRepository;
2727
$this->generateThumbnailsCommand = $generateThumbnailsCommand;

0 commit comments

Comments
 (0)