diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-78679-CrawlerInclusionViaRequire_onceInIndexedSearch.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-78679-CrawlerInclusionViaRequire_onceInIndexedSearch.rst new file mode 100644 index 0000000000000000000000000000000000000000..4d9abf25973ed4906757c4e15998d0fd2c23b4e2 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-78679-CrawlerInclusionViaRequire_onceInIndexedSearch.rst @@ -0,0 +1,40 @@ +.. include:: ../../Includes.txt + +========================================================================== +Deprecation: #78679 - Crawler inclusion via require_once in Indexed Search +========================================================================== + +See :issue:`78679` + +Description +=========== + +The system extension "Indexed Search" has support for EXT:crawler, by using the crawler library +to index a page. + +This functionality is done under the hood via the Indexer class, which does a manual PHP call on +"require_once" - code which is not necessary anymore, since the TYPO3 Core class loader. The public +PHP method `TYPO3\CMS\IndexedSearch\Indexer->includeCrawlerClass()` is therefore marked as +deprecated. + + +Impact +====== + +Calling the method `TYPO3\CMS\IndexedSearch\Indexer->includeCrawlerClass()` will trigger a +deprecation log message. + + +Affected Installations +====================== + +Any TYPO3 installation with a custom indexer written in PHP, and Indexed Search and Crawler +installed, and the custom indexer using the method call above. + + +Migration +========= + +Remove the function call, as TYPO3 includes the PHP class automatically. + +.. index:: ext:indexed_search, PHP-API \ No newline at end of file diff --git a/typo3/sysext/indexed_search/Classes/Indexer.php b/typo3/sysext/indexed_search/Classes/Indexer.php index f6e5557ea5792c7dc18207c5f5da80184b48e395..a9afc00a3b23c81b8e6d719747a067765f7a780a 100644 --- a/typo3/sysext/indexed_search/Classes/Indexer.php +++ b/typo3/sysext/indexed_search/Classes/Indexer.php @@ -766,7 +766,6 @@ class Indexer // Get links: $list = $this->extractHyperLinks($content); if ($this->indexerConfig['useCrawlerForExternalFiles'] && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('crawler')) { - $this->includeCrawlerClass(); $crawler = GeneralUtility::makeInstance(\tx_crawler_lib::class); } // Traverse links: @@ -2098,9 +2097,11 @@ class Indexer * Includes the crawler class * * @return void + * @deprecated since TYPO3 v8, will be removed in TYPO3 v9, autoloader is taking care of that functionality */ public function includeCrawlerClass() { + GeneralUtility::logDeprecatedFunction(); require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('crawler') . 'class.tx_crawler_lib.php'; }