From 2b888a2d0700d16a676549eab1d1601d1e8c8bea Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 6 Jun 2019 16:26:32 +0200 Subject: [PATCH] Cleanup code base for CMS 9 * Remove no longer necessary code. * Improve changelog for cms 9. --- Classes/Domain/Index/AbstractIndexer.php | 2 - Classes/Domain/Model/Query.php | 198 ------------------ .../1.0.0/20190517-typo3-v9-update.rst | 7 +- 3 files changed, 5 insertions(+), 202 deletions(-) delete mode 100644 Classes/Domain/Model/Query.php diff --git a/Classes/Domain/Index/AbstractIndexer.php b/Classes/Domain/Index/AbstractIndexer.php index 88b1197..b22c011 100644 --- a/Classes/Domain/Index/AbstractIndexer.php +++ b/Classes/Domain/Index/AbstractIndexer.php @@ -23,8 +23,6 @@ namespace Codappix\SearchCore\Domain\Index; use Codappix\SearchCore\Configuration\ConfigurationContainerInterface; use Codappix\SearchCore\Configuration\InvalidArgumentException; use Codappix\SearchCore\Connection\ConnectionInterface; -use TYPO3\CMS\Core\Exception; -use TYPO3\CMS\Core\Utility\Exception\MissingArrayPathException; use TYPO3\CMS\Core\Utility\GeneralUtility; abstract class AbstractIndexer implements IndexerInterface diff --git a/Classes/Domain/Model/Query.php b/Classes/Domain/Model/Query.php deleted file mode 100644 index ab94806..0000000 --- a/Classes/Domain/Model/Query.php +++ /dev/null @@ -1,198 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -use TYPO3\CMS\Extbase\Persistence\QueryInterface; - -/** - * Extbase QueryInterface - * Current implementation covers only paginate widget support. - */ -class Query implements QueryInterface -{ - /** - * @var int - */ - private $offset = 0; - - /** - * @var int - */ - private $limit = 10; - - public function execute($returnRawQueryResult = false) - { - if (! ($this->connection instanceof ConnectionInterface)) { - throw new \InvalidArgumentException( - 'Connection was not set before, therefore execute can not work. Use `setConnection` before.', - 1502197732 - ); - } - if (! ($this->searchService instanceof SearchService)) { - throw new \InvalidArgumentException( - 'SearchService was not set before, therefore execute can not work. Use `setSearchService` before.', - 1520325175 - ); - } - - return $this->searchService->processResult($this->connection->search($this)); - } - - public function setLimit($limit) - { - $this->limit = (int) $limit; - - return $this; - } - - public function setOffset($offset) - { - $this->offset = (int) $offset; - - return $this; - } - - public function getLimit() - { - return $this->limit; - } - - public function getOffset() - { - return $this->offset; - } - - public function getSource() - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196146); - } - - public function setOrderings(array $orderings) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196163); - } - - public function matching($constraint) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196197); - } - - public function logicalAnd($constraint1) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196166); - } - - public function logicalOr($constraint1) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196198); - } - - public function logicalNot(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196166); - } - - public function equals($propertyName, $operand, $caseSensitive = true) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196199); - } - - public function like($propertyName, $operand, $caseSensitive = true) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196199); - } - - public function contains($propertyName, $operand) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196200); - } - - public function in($propertyName, $operand) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196167); - } - - public function lessThan($propertyName, $operand) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196201); - } - - public function lessThanOrEqual($propertyName, $operand) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196168); - } - - public function greaterThan($propertyName, $operand) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196202); - } - - public function greaterThanOrEqual($propertyName, $operand) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196168); - } - - public function getType() - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196203); - } - - public function setQuerySettings(\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface $querySettings) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196168); - } - - public function getQuerySettings() - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196205); - } - - public function count() - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196169); - } - - public function getOrderings() - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196206); - } - - public function getConstraint() - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196171); - } - - public function isEmpty($propertyName) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196207); - } - - public function setSource(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface $source) - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196172); - } - - public function getStatement() - { - throw new \BadMethodCallException('Method is not implemented yet.', 1502196208); - } -} diff --git a/Documentation/source/changelog/1.0.0/20190517-typo3-v9-update.rst b/Documentation/source/changelog/1.0.0/20190517-typo3-v9-update.rst index bbd1f47..b434a13 100644 --- a/Documentation/source/changelog/1.0.0/20190517-typo3-v9-update.rst +++ b/Documentation/source/changelog/1.0.0/20190517-typo3-v9-update.rst @@ -9,8 +9,9 @@ This change contains some breaking changes: * Due to dropped TYPO3 CMS < v9 support, also all PHP Code within ``Compatibility`` namespace was removed. -* Fluid variable ``{request.query}`` is no longer provided, due to internal API - changes. Use ``{request.searchTerm}`` instead. + * ``\Codappix\SearchCore\DataProcessing\ContentObjectDataProcessorAdapterProcessor`` + has changed signature for ``__construct`` due to removed ``Compatibility`` + namespace. * PHP Interface ``\Codappix\SearchCore\Connection\SearchRequestInterface`` has changed, due to extending TYPO3 Interface @@ -18,3 +19,5 @@ This change contains some breaking changes: Therefore also PHP class ``\Codappix\SearchCore\Domain\Model\SearchRequest`` has been adjusted. + +* Recycler are respected. Pages from type recycler are ignored during indexing.