Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[!!!][FEATURE] Add new Events for Indexing #3651

Merged
merged 4 commits into from
Jun 2, 2023

Conversation

bmack
Copy link
Collaborator

@bmack bmack commented May 30, 2023

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

bmack added 2 commits June 1, 2023 09:05
This change adds new PSR-14 events in favor of:

* $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['indexItemAddDocuments']
* $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['Indexer']['indexPageAddDocuments']
* $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['preAddModifyDocuments']

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.

This still needs to be defined, whether we want to remove
the hooks in this patch as well.

Also, documentation needs to be adapted.
The hooks are removed.

The interfaces are removed:
* ApacheSolrForTypo3\Solr\IndexQueue\PageIndexerDocumentsModifier
* ApacheSolrForTypo3\Solr\IndexQueue\AdditionalIndexQueueItemIndexer
* AdditionalPageIndexer

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.

Documentation is added, tests are adapted.
@bmack bmack changed the title [FEATURE] Add new Events for Indexing [!!!][FEATURE] Add new Events for Indexing Jun 1, 2023
bmack added 2 commits June 1, 2023 13:59
The new Events are now called:

* 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']
@dkd-kaehm dkd-kaehm merged commit 57a36ba into TYPO3-Solr:main Jun 2, 2023
@dkd-kaehm dkd-kaehm mentioned this pull request Oct 13, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK] Replace Signals with PSR-14 events
2 participants