[!!!][FEATURE] Add new Events for Indexing #3651
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this pr does
This change adds new PSR-14 events:
ApacheSolrForTypo3\Solr\Event\Indexing\BeforePageDocumentIsProcessedForIndexingEvent
previously used with
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['Indexer']['indexPageAddDocuments']
ApacheSolrForTypo3\Solr\Event\Indexing\BeforeDocumentIsProcessedForIndexingEvent
previously used with
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['preAddModifyDocuments']
ApacheSolrForTypo3\Solr\Event\Indexing\BeforeDocumentsAreIndexedEvent
previously used with
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['indexItemAddDocuments']
This way, EXT:solr migrates to PSR-14 events and adds a more defined way to utilize the PHP API and to help extension authors to understand what is used in EXT:solr.
The hooks
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['preAddModifyDocuments']
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['indexItemAddDocuments']
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['Indexer']['indexPageAddDocuments']
are now removed in favor of the new events.
These interfaces related to the hooks are removed:
ApacheSolrForTypo3\Solr\IndexQueue\PageIndexerDocumentsModifier
ApacheSolrForTypo3\Solr\IndexQueue\AdditionalIndexQueueItemIndexer
ApacheSolrForTypo3\Solr\AdditionalPageIndexer
Documentation is added, tests are adapted.
Relates: #3376, #3441
Fixes: #3437