Skip to content

Commit

Permalink
[TASK] Evaluate all entries in Services.yaml regarding to shared se…
Browse files Browse the repository at this point in the history
…tting

All entries in Services.yaml become the `shared` setting dependent on its implementation and context.
All non-Singleton-Like classes are set to `shared: false` which could stuck with objects states:
* on Builder-Objects
* on Query-Objects
* on other object, those state change is not global relevant

Relates: #3995
Fixes: #4183, #4246
Ports: #4251
  • Loading branch information
dkd-kaehm committed Dec 11, 2024
1 parent b5b22eb commit a3da67a
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion Configuration/Services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ services:
resource: '../Classes/ViewHelpers/*'
public: true
autowire: true
shared: false

backend_controller:
namespace: ApacheSolrForTypo3\Solr\Controller\Backend\Search\
Expand All @@ -41,14 +42,17 @@ services:
ApacheSolrForTypo3\Solr\Domain\Search\ApacheSolrDocument\Builder:
public: true
autowire: true
shared: false

ApacheSolrForTypo3\Solr\Domain\Search\Uri\SearchUriBuilder:
public: true
autowire: true
shared: false

ApacheSolrForTypo3\Solr\Domain\Variants\IdBuilder:
public: true
autowire: true
shared: false

# BE modules, plugins
ApacheSolrForTypo3\Solr\Backend\SettingsPreviewOnPlugins:
Expand All @@ -58,16 +62,19 @@ services:
- name: event.listener
identifier: 'solr.plugin.be.settings.preview'
event: TYPO3\CMS\Backend\View\Event\PageContentPreviewRenderingEvent
shared: false
# END: BE modules

viewhelpers_backend:
namespace: ApacheSolrForTypo3\Solr\ViewHelpers\Backend\
resource: '../Classes/ViewHelpers/Backend/*'
public: true
autowire: true
shared: false

ApacheSolrForTypo3\Solr\Domain\Index\Queue\UpdateHandler\DataUpdateHandler:
public: true
shared: true
arguments:
$recordService: '@ApacheSolrForTypo3\Solr\Domain\Index\Queue\RecordMonitor\Helper\ConfigurationAwareRecordService'
$frontendEnvironment: '@ApacheSolrForTypo3\Solr\FrontendEnvironment'
Expand All @@ -79,6 +86,7 @@ services:
$dataHandler: '@TYPO3\CMS\Core\DataHandling\DataHandler'
ApacheSolrForTypo3\Solr\Domain\Index\Queue\UpdateHandler\GarbageHandler:
public: true
shared: true
arguments:
$recordService: '@ApacheSolrForTypo3\Solr\Domain\Index\Queue\RecordMonitor\Helper\ConfigurationAwareRecordService'
$frontendEnvironment: '@ApacheSolrForTypo3\Solr\FrontendEnvironment'
Expand All @@ -88,27 +96,33 @@ services:
ApacheSolrForTypo3\Solr\Domain\Site\SiteHashService:
public: true
autowire: true
shared: true

ApacheSolrForTypo3\Solr\IndexQueue\PageIndexerRequestHandler:
public: true
autowire: true
shared: true

ApacheSolrForTypo3\Solr\EventListener\EnhancedRouting\CachedUrlModifier:
shared: true
tags:
- name: event.listener
identifier: 'solr.routing.cachedurl-modifier'
event: ApacheSolrForTypo3\Solr\Event\Routing\BeforeVariableInCachedUrlAreReplacedEvent
ApacheSolrForTypo3\Solr\EventListener\EnhancedRouting\CachedPathVariableModifier:
shared: true
tags:
- name: event.listener
identifier: 'solr.routing.cachedurl-modifier'
event: ApacheSolrForTypo3\Solr\Event\Routing\BeforeCachedVariablesAreProcessedEvent
ApacheSolrForTypo3\Solr\EventListener\EnhancedRouting\PostEnhancedUriProcessor:
shared: true
tags:
- name: event.listener
identifier: 'solr.routing.postenhanceduriprocessor-modifier'
event: ApacheSolrForTypo3\Solr\Event\Routing\AfterUriIsProcessedEvent
ApacheSolrForTypo3\Solr\Domain\Index\Queue\UpdateHandler\EventListener\NoProcessingEventListener:
shared: true
arguments:
$extensionConfiguration: '@ApacheSolrForTypo3\Solr\System\Configuration\ExtensionConfiguration'
$eventDispatcher: '@Psr\EventDispatcher\EventDispatcherInterface'
Expand Down Expand Up @@ -142,6 +156,7 @@ services:
before: 'solr.index.updatehandler.immediateprocessingeventlistener,solr.index.updatehandler.delayedprocessingeventlistener'
event: ApacheSolrForTypo3\Solr\Domain\Index\Queue\UpdateHandler\Events\RecordGarbageCheckEvent
ApacheSolrForTypo3\Solr\Domain\Index\Queue\UpdateHandler\EventListener\ImmediateProcessingEventListener:
shared: true
arguments:
$extensionConfiguration: '@ApacheSolrForTypo3\Solr\System\Configuration\ExtensionConfiguration'
$eventDispatcher: '@Psr\EventDispatcher\EventDispatcherInterface'
Expand Down Expand Up @@ -175,6 +190,7 @@ services:
before: 'solr.index.updatehandler.delayedprocessingeventlistener'
event: ApacheSolrForTypo3\Solr\Domain\Index\Queue\UpdateHandler\Events\RecordGarbageCheckEvent
ApacheSolrForTypo3\Solr\Domain\Index\Queue\UpdateHandler\EventListener\DelayedProcessingEventListener:
shared: true
arguments:
$extensionConfiguration: '@ApacheSolrForTypo3\Solr\System\Configuration\ExtensionConfiguration'
$eventDispatcher: '@Psr\EventDispatcher\EventDispatcherInterface'
Expand Down Expand Up @@ -204,61 +220,76 @@ services:
# Register search components
ApacheSolrForTypo3\Solr\Search\AccessComponent:
autowire: true
shared: false
tags:
- name: event.listener
identifier: 'solr.search-component.access'
ApacheSolrForTypo3\Solr\Search\AnalysisComponent:
autowire: true
shared: false
tags:
- name: event.listener
identifier: 'solr.search-component.analysis'
ApacheSolrForTypo3\Solr\Search\DebugComponent:
autowire: true
shared: false
tags:
- name: event.listener
identifier: 'solr.search-component.debug'
ApacheSolrForTypo3\Solr\Search\ElevationComponent:
autowire: true
shared: false
tags:
- name: event.listener
identifier: 'solr.search-component.elevation'
ApacheSolrForTypo3\Solr\Search\GroupingComponent:
autowire: true
shared: false
tags:
- name: event.listener
identifier: 'solr.search-component.grouping'
ApacheSolrForTypo3\Solr\Search\FacetingComponent:
autowire: true
# Uses FacetRegistry, which is singleton. @todo: See classes doc-comment
shared: true
tags:
- name: event.listener
identifier: 'solr.search-component.faceting'
ApacheSolrForTypo3\Solr\Search\HighlightingComponent:
autowire: true
shared: false
tags:
- name: event.listener
identifier: 'solr.search-component.highlighting'
ApacheSolrForTypo3\Solr\Search\LastSearchesComponent:
autowire: true
# @todo: See classes doc-comment
shared: false
tags:
- name: event.listener
identifier: 'solr.search-component.last-searches'
ApacheSolrForTypo3\Solr\Search\RelevanceComponent:
autowire: true
shared: false
tags:
- name: event.listener
identifier: 'solr.search-component.relevance'
ApacheSolrForTypo3\Solr\Search\SortingComponent:
autowire: true
shared: false
tags:
- name: event.listener
identifier: 'solr.search-component.sorting'
ApacheSolrForTypo3\Solr\Search\SpellcheckingComponent:
autowire: true
shared: false
tags:
- name: event.listener
identifier: 'solr.search-component.spellchecking'
ApacheSolrForTypo3\Solr\Search\StatisticsComponent:
autowire: true
# @todo: See classes doc-comment
shared: true
tags:
- name: event.listener
identifier: 'solr.search-component.statistics'
Expand All @@ -269,6 +300,7 @@ services:
### Indexing
ApacheSolrForTypo3\Solr\EventListener\PageIndexer\FrontendGroupsModifier:
autowire: true
shared: false
tags:
- name: event.listener
identifier: 'solr.index.PageIndexer.FrontendUserAuthenticator'
Expand All @@ -283,28 +315,33 @@ services:

ApacheSolrForTypo3\Solr\IndexQueue\FrontendHelper\PageIndexer:
autowire: true
shared: true
tags:
- name: event.listener
identifier: 'solr.index.FrontendHelper.PageIndexer.indexPageContentAfterCacheableContentIsGenerated'
ApacheSolrForTypo3\Solr\Task\IndexQueueWorkerTaskAdditionalFieldProvider:
public: true
shared: true
arguments:
$siteRepository: '@ApacheSolrForTypo3\Solr\Domain\Site\SiteRepository'

ApacheSolrForTypo3\Solr\EventListener\PageIndexer\AdditionalFieldsForPageIndexing:
autowire: true
shared: false
tags:
- name: event.listener
identifier: 'solr.index.AdditionalFieldsForPageIndexing'

ApacheSolrForTypo3\Solr\IndexQueue\FrontendHelper\PageFieldMappingIndexer:
autowire: true
shared: false
tags:
- name: event.listener
identifier: 'solr.index.PageFieldMappingIndexer'

ApacheSolrForTypo3\Solr\EventListener\Extbase\PersistenceEventListener:
autowire: true
shared: true
tags:
- name: event.listener
identifier: 'solr.index.ExtbaseEntityPersisted'
Expand All @@ -315,26 +352,30 @@ services:

### EXT:solr content objects
ApacheSolrForTypo3\Solr\ContentObject\Classification:
shared: false
tags:
- name: frontend.contentobject
identifier: 'SOLR_CLASSIFICATION'
ApacheSolrForTypo3\Solr\ContentObject\Content:
shared: false
tags:
- name: frontend.contentobject
identifier: 'SOLR_CONTENT'
ApacheSolrForTypo3\Solr\ContentObject\Multivalue:
shared: false
tags:
- name: frontend.contentobject
identifier: 'SOLR_MULTIVALUE'
ApacheSolrForTypo3\Solr\ContentObject\Relation:
shared: false
arguments:
$tcaService: '@ApacheSolrForTypo3\Solr\System\TCA\TCAService'
tags:
- name: frontend.contentobject
identifier: 'SOLR_RELATION'


# Reports: Status
ApacheSolrForTypo3\Solr\Report\:
resource: '../Classes/Report/*'
autoconfigure: true
shared: false

0 comments on commit a3da67a

Please sign in to comment.