Extract dokuwiki\Search\Indexer class

Not sure why Doku_Indexer caused phpcs to complain about the class name
not being in PascalCase, but Doku_Handler didn't. 🤷

The namespace and new class name was selected to be compatible with the
upcoming changes in #2943. This should hpopefully reduce the overall
hassle of touching the same code base.
This commit is contained in:
Michael Große 2019-12-29 00:52:19 +01:00
parent cc8fc76154
commit 6225b270e0
No known key found for this signature in database
GPG Key ID: BDD834E001B99EDC
6 changed files with 1230 additions and 1218 deletions

View File

@ -149,6 +149,7 @@
<exclude-pattern>*/inc/farm.php</exclude-pattern>
<exclude-pattern>*/inc/fulltext.php</exclude-pattern>
<exclude-pattern>*/inc/pluginutils.php</exclude-pattern>
<exclude-pattern>*/inc/indexer.php</exclude-pattern>
<exclude-pattern>*/inc/Mailer.class.php</exclude-pattern>
<exclude-pattern>*/doku.php</exclude-pattern>
<exclude-pattern>*/install.php</exclude-pattern>

View File

@ -3,7 +3,7 @@
* Test cases for the Doku_Indexer::renamePage and Doku_Indexer::renameMetaValue methods
*/
class indexer_rename_test extends DokuWikiTest {
/** @var Doku_Indexer $indexer */
/** @var \dokuwiki\Search\Indexer $indexer */
private $indexer;
private $old_id = 'old_testid';

1214
inc/Search/Indexer.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -563,3 +563,8 @@ class Subscription {
$manager->notifyAddresses($data);
}
}
/**
* @deprecated 2019-12-29 use \dokuwiki\Search\Indexer
*/
class Doku_Indexer extends \dokuwiki\Search\Indexer {};

View File

@ -629,8 +629,8 @@ function ft_resultComplement($args) {
* @author Andreas Gohr <andi@splitbrain.org>
* @author Kazutaka Miyasaka <kazmiya@gmail.com>
*
* @param Doku_Indexer $Indexer
* @param string $query search query
* @param dokuwiki\Search\Indexer $Indexer
* @param string $query search query
* @return array of search formulas
*/
function ft_queryParser($Indexer, $query){
@ -864,10 +864,10 @@ function ft_queryParser($Indexer, $query){
*
* @author Kazutaka Miyasaka <kazmiya@gmail.com>
*
* @param Doku_Indexer $Indexer
* @param string $term
* @param bool $consider_asian
* @param bool $phrase_mode
* @param dokuwiki\Search\Indexer $Indexer
* @param string $term
* @param bool $consider_asian
* @param bool $phrase_mode
* @return string
*/
function ft_termParser($Indexer, $term, $consider_asian = true, $phrase_mode = false) {

File diff suppressed because it is too large Load Diff