mirror of
https://github.com/Codappix/search_core.git
synced 2024-12-25 16:56:10 +01:00
Merge remote-tracking branch 'origin/develop' into feature/doc-cleanup
This commit is contained in:
commit
f0de7aa2b4
14 changed files with 118 additions and 15 deletions
96
.phan/config.php
Normal file
96
.phan/config.php
Normal file
|
@ -0,0 +1,96 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This configuration will be read and overlaid on top of the
|
||||
* default configuration. Command line arguments will be applied
|
||||
* after this file is read.
|
||||
*/
|
||||
return [
|
||||
|
||||
// Supported values: '7.0', '7.1', '7.2', null.
|
||||
// If this is set to null,
|
||||
// then Phan assumes the PHP version which is closest to the minor version
|
||||
// of the php executable used to execute phan.
|
||||
"target_php_version" => '7.0',
|
||||
|
||||
// Override to hardcode existence and types of (non-builtin) globals.
|
||||
// Class names should be prefixed with '\\'.
|
||||
// (E.g. ['_FOO' => '\\FooClass', 'page' => '\\PageClass', 'userId' => 'int'])
|
||||
'globals_type_map' => [
|
||||
'_EXTKEY' => 'string',
|
||||
'EM_CONF' => 'array',
|
||||
],
|
||||
|
||||
// A list of directories that should be parsed for class and
|
||||
// method information. After excluding the directories
|
||||
// defined in exclude_analysis_directory_list, the remaining
|
||||
// files will be statically analyzed for errors.
|
||||
//
|
||||
// Thus, both first-party and third-party code being used by
|
||||
// your application should be included in this list.
|
||||
'directory_list' => [
|
||||
'Classes',
|
||||
'.Build/vendor',
|
||||
],
|
||||
|
||||
// A list of files to include in analysis
|
||||
'file_list' => [
|
||||
'ext_emconf.php',
|
||||
'ext_tables.php',
|
||||
'ext_localconf.php',
|
||||
],
|
||||
|
||||
// A directory list that defines files that will be excluded
|
||||
// from static analysis, but whose class and method
|
||||
// information should be included.
|
||||
//
|
||||
// Generally, you'll want to include the directories for
|
||||
// third-party code (such as "vendor/") in this list.
|
||||
//
|
||||
// n.b.: If you'd like to parse but not analyze 3rd
|
||||
// party code, directories containing that code
|
||||
// should be added to the `directory_list` as
|
||||
// to `exclude_analysis_directory_list`.
|
||||
"exclude_analysis_directory_list" => [
|
||||
'.Build/vendor'
|
||||
],
|
||||
|
||||
// A list of directories that should be parsed for class and
|
||||
// method information. After excluding the directories
|
||||
// defined in exclude_analysis_directory_list, the remaining
|
||||
// files will be statically analyzed for errors.
|
||||
//
|
||||
// Thus, both first-party and third-party code being used by
|
||||
// your application should be included in this list.
|
||||
'directory_list' => [
|
||||
'Classes',
|
||||
// 'Tests',
|
||||
'.Build/vendor',
|
||||
],
|
||||
|
||||
// The number of processes to fork off during the analysis phase.
|
||||
'processes' => 3,
|
||||
|
||||
// Add any issue types (such as 'PhanUndeclaredMethod')
|
||||
// here to inhibit them from being reported
|
||||
'suppress_issue_types' => [
|
||||
'PhanDeprecatedFunction', // For now
|
||||
'PhanParamTooMany', // For now, due to ObjectManager->get()
|
||||
],
|
||||
|
||||
// A list of plugin files to execute.
|
||||
// See https://github.com/phan/phan/tree/master/.phan/plugins for even more.
|
||||
// (Pass these in as relative paths.
|
||||
// The 0.10.2 release will allow passing 'AlwaysReturnPlugin' if referring to a plugin that is bundled with Phan)
|
||||
'plugins' => [
|
||||
// checks if a function, closure or method unconditionally returns.
|
||||
'AlwaysReturnPlugin', // can also be written as 'vendor/phan/phan/.phan/plugins/AlwaysReturnPlugin.php'
|
||||
// Checks for syntactically unreachable statements in
|
||||
// the global scope or function bodies.
|
||||
'UnreachableCodePlugin',
|
||||
'DollarDollarPlugin',
|
||||
'DuplicateArrayKeyPlugin',
|
||||
'PregRegexCheckerPlugin',
|
||||
'PrintfCheckerPlugin',
|
||||
],
|
||||
];
|
|
@ -22,7 +22,6 @@ namespace Codappix\SearchCore\Command;
|
|||
|
||||
use Codappix\SearchCore\Domain\Index\IndexerFactory;
|
||||
use Codappix\SearchCore\Domain\Index\NoMatchingIndexerException;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Mvc\Controller\CommandController;
|
||||
|
||||
/**
|
||||
|
|
|
@ -44,7 +44,7 @@ class Connection implements Singleton
|
|||
|
||||
/**
|
||||
* @param ConfigurationContainerInterface $configuration
|
||||
* @param \Elastica\Client $elasticaClient
|
||||
* @param \Elastica\Client|null $elasticaClient
|
||||
*/
|
||||
public function __construct(
|
||||
ConfigurationContainerInterface $configuration,
|
||||
|
@ -68,7 +68,7 @@ class Connection implements Singleton
|
|||
/**
|
||||
* Get the concrete client for internal usage!
|
||||
*/
|
||||
public function getClient() : \ Elastica\Client
|
||||
public function getClient() : \Elastica\Client
|
||||
{
|
||||
return $this->elasticaClient;
|
||||
}
|
||||
|
|
|
@ -22,10 +22,8 @@ namespace Codappix\SearchCore\Connection\Elasticsearch;
|
|||
|
||||
use Codappix\SearchCore\Configuration\ConfigurationContainerInterface;
|
||||
use Codappix\SearchCore\Configuration\InvalidArgumentException;
|
||||
use Elastica\Exception\ResponseException;
|
||||
use TYPO3\CMS\Core\SingletonInterface as Singleton;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
|
||||
/**
|
||||
* Factory to get indexes.
|
||||
|
|
|
@ -21,7 +21,6 @@ namespace Codappix\SearchCore\Connection\Elasticsearch;
|
|||
*/
|
||||
|
||||
use TYPO3\CMS\Core\SingletonInterface as Singleton;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
|
||||
/**
|
||||
* Factory to get indexes.
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace Codappix\SearchCore\DataProcessing;
|
|||
*/
|
||||
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Service\TypoScriptService;
|
||||
use TYPO3\CMS\Core\TypoScript\TypoScriptService;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,7 +23,6 @@ namespace Codappix\SearchCore\Domain\Index;
|
|||
use Codappix\SearchCore\Configuration\ConfigurationContainerInterface;
|
||||
use Codappix\SearchCore\Configuration\InvalidArgumentException;
|
||||
use Codappix\SearchCore\Connection\ConnectionInterface;
|
||||
use Codappix\SearchCore\DataProcessing\ProcessorInterface;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
abstract class AbstractIndexer implements IndexerInterface
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace Codappix\SearchCore\Domain\Index\TcaIndexer;
|
|||
*/
|
||||
|
||||
use Codappix\SearchCore\Configuration\ConfigurationContainerInterface;
|
||||
use Codappix\SearchCore\Configuration\InvalidArgumentException as InvalidConfigurationArgumentException;
|
||||
use Codappix\SearchCore\Domain\Index\TcaIndexer\InvalidArgumentException;
|
||||
use Codappix\SearchCore\Database\Doctrine\Join;
|
||||
use Codappix\SearchCore\Database\Doctrine\Where;
|
||||
use Codappix\SearchCore\Domain\Index\IndexingException;
|
||||
|
|
|
@ -156,11 +156,15 @@ class SearchRequest implements SearchRequestInterface
|
|||
public function setLimit($limit)
|
||||
{
|
||||
$this->limit = (int) $limit;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setOffset($offset)
|
||||
{
|
||||
$this->offset = (int) $offset;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLimit()
|
||||
|
|
|
@ -23,8 +23,6 @@ namespace Codappix\SearchCore\Domain\Search;
|
|||
use Codappix\SearchCore\Configuration\ConfigurationContainerInterface;
|
||||
use Codappix\SearchCore\Configuration\ConfigurationUtility;
|
||||
use Codappix\SearchCore\Configuration\InvalidArgumentException;
|
||||
use Codappix\SearchCore\Connection\ConnectionInterface;
|
||||
use Codappix\SearchCore\Connection\Elasticsearch\Query;
|
||||
use Codappix\SearchCore\Connection\SearchRequestInterface;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Utility\ArrayUtility;
|
||||
|
|
|
@ -24,9 +24,7 @@ use Codappix\SearchCore\Configuration\ConfigurationContainerInterface;
|
|||
use Codappix\SearchCore\Domain\Index\IndexerFactory;
|
||||
use Codappix\SearchCore\Domain\Index\IndexerInterface;
|
||||
use Codappix\SearchCore\Domain\Index\NoMatchingIndexerException;
|
||||
use Codappix\SearchCore\Domain\Index\TcaIndexer;
|
||||
use TYPO3\CMS\Core\SingletonInterface as Singleton;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* Handles all data related things like updates, deletes and inserts.
|
||||
|
|
|
@ -21,7 +21,6 @@ namespace Codappix\SearchCore\Hook;
|
|||
*/
|
||||
|
||||
use Codappix\SearchCore\Configuration\NoConfigurationException;
|
||||
use Codappix\SearchCore\Domain\Index\NoMatchingIndexerException;
|
||||
use Codappix\SearchCore\Domain\Service\DataHandler as OwnDataHandler;
|
||||
use TYPO3\CMS\Backend\Utility\BackendUtility;
|
||||
use TYPO3\CMS\Core\DataHandling\DataHandler as CoreDataHandler;
|
||||
|
|
|
@ -5,4 +5,5 @@ Changelog
|
|||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
changelog/*
|
||||
changelog/20180408-introduce-php70-type-hints
|
||||
changelog/20180406-120-facet-configuration
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
Breacking Change "Introduce PHP 7.0 TypeHints"
|
||||
==============================================
|
||||
|
||||
As PHP evolved, we now migrate the whole code base to use PHP 7.0 type hints.
|
||||
We do not use PHP 7.1 Type Hints, as some customers still need PHP 7.0 support.
|
||||
|
||||
Also we added missing methods to interfaces, that were already used in code.
|
||||
|
||||
As this leads to changed method signatures, most custom implementations of interfaces, or overwrites
|
||||
of existing methods are broken.
|
||||
|
||||
To fix, just update the signatures as pointed out by PHP while running the code.
|
Loading…
Reference in a new issue