Skip to content

Commit

Permalink
[TASK:T12] DI for IndexQueueWorkerTaskAdditionalFieldProvider::$siteR…
Browse files Browse the repository at this point in the history
…epository

Relates: #3376
  • Loading branch information
dkd-kaehm committed Jun 14, 2023
1 parent e1268e5 commit 06ff4a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
11 changes: 3 additions & 8 deletions Classes/Task/IndexQueueWorkerTaskAdditionalFieldProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,9 @@
*/
class IndexQueueWorkerTaskAdditionalFieldProvider extends AbstractAdditionalFieldProvider
{
/**
* SiteRepository
*/
protected SiteRepository $siteRepository;

public function __construct()
{
$this->siteRepository = GeneralUtility::makeInstance(SiteRepository::class);
public function __construct(
protected readonly SiteRepository $siteRepository

This comment has been minimized.

Copy link
@t3-media

t3-media Jun 14, 2023

are you sure? - it is marked as an error from php-syntax in phpstorm

This comment has been minimized.

Copy link
@bmack

bmack Jun 14, 2023

Collaborator

@t3-media I think you need to change your PHPStorm settings to use PHP 8.1+ syntax.

) {
}

/**
Expand Down
6 changes: 5 additions & 1 deletion Configuration/Services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ services:
event: TYPO3\CMS\Backend\View\Event\PageContentPreviewRenderingEvent
# END: BE modules

viewhelper_backend:
viewhelpers_backend:
namespace: ApacheSolrForTypo3\Solr\ViewHelpers\Backend\
resource: '../Classes/ViewHelpers/Backend/*'
public: true
Expand Down Expand Up @@ -267,6 +267,10 @@ services:
tags:
- name: event.listener
identifier: 'solr.index.FrontendHelper.PageIndexer.indexPageContentAfterCacheableContentIsGenerated'
ApacheSolrForTypo3\Solr\Task\IndexQueueWorkerTaskAdditionalFieldProvider:
public: true
arguments:
$siteRepository: '@ApacheSolrForTypo3\Solr\Domain\Site\SiteRepository'

ApacheSolrForTypo3\Solr\EventListener\PageIndexer\AdditionalFieldsForPageIndexing:
autowire: true
Expand Down

0 comments on commit 06ff4a5

Please sign in to comment.