mirror of
https://github.com/Codappix/search_core.git
synced 2024-12-23 15:56:09 +01:00
TASK: Remove code base for TYPO3 7.x
Also add documentation with breaking change.
This commit is contained in:
parent
0d14f80f62
commit
577a5624b8
13 changed files with 38 additions and 178 deletions
|
@ -1,57 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Codappix\SearchCore\Compatibility;
|
||||
|
||||
/*
|
||||
* Copyright (C) 2018 Daniel Siepmann <coding@daniel-siepmann.de>
|
||||
*
|
||||
* 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\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
|
||||
use TYPO3\CMS\Extbase\Object\Container\Container;
|
||||
|
||||
/**
|
||||
* Register different concrete implementations, depending on current TYPO3 version.
|
||||
* This way we can provide working implementations for multiple TYPO3 versions.
|
||||
*/
|
||||
class ImplementationRegistrationService
|
||||
{
|
||||
public static function registerImplementations()
|
||||
{
|
||||
$container = GeneralUtility::makeInstance(Container::class);
|
||||
if (VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 8000000) {
|
||||
$container->registerImplementation(
|
||||
\Codappix\SearchCore\Compatibility\TypoScriptServiceInterface::class,
|
||||
\Codappix\SearchCore\Compatibility\TypoScriptService::class
|
||||
);
|
||||
$container->registerImplementation(
|
||||
\Codappix\SearchCore\Domain\Index\TcaIndexer\TcaTableServiceInterface::class,
|
||||
\Codappix\SearchCore\Domain\Index\TcaIndexer\TcaTableService::class
|
||||
);
|
||||
} else {
|
||||
$container->registerImplementation(
|
||||
\Codappix\SearchCore\Compatibility\TypoScriptServiceInterface::class,
|
||||
\Codappix\SearchCore\Compatibility\TypoScriptService76::class
|
||||
);
|
||||
$container->registerImplementation(
|
||||
\Codappix\SearchCore\Domain\Index\TcaIndexer\TcaTableServiceInterface::class,
|
||||
\Codappix\SearchCore\Domain\Index\TcaIndexer\TcaTableService76::class
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Codappix\SearchCore\Compatibility;
|
||||
|
||||
/*
|
||||
* Copyright (C) 2018 Daniel Siepmann <coding@daniel-siepmann.de>
|
||||
*
|
||||
* 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\Core\TypoScript\TypoScriptService as CoreTypoScriptService;
|
||||
|
||||
/**
|
||||
* Used since TYPO3 CMS 8.7.
|
||||
*/
|
||||
class TypoScriptService extends CoreTypoScriptService implements TypoScriptServiceInterface
|
||||
{
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Codappix\SearchCore\Compatibility;
|
||||
|
||||
/*
|
||||
* Copyright (C) 2018 Daniel Siepmann <coding@daniel-siepmann.de>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Allows to use DI configuration to switch concrete implementation, depending
|
||||
* on current TYPO3 Version.
|
||||
*/
|
||||
interface TypoScriptServiceInterface
|
||||
{
|
||||
public function convertPlainArrayToTypoScriptArray(array $plainArray);
|
||||
}
|
|
@ -21,7 +21,7 @@ namespace Codappix\SearchCore\DataProcessing;
|
|||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
use Codappix\SearchCore\Compatibility\TypoScriptServiceInterface;
|
||||
use TYPO3\CMS\Core\TypoScript\TypoScriptService;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
|
||||
|
@ -31,15 +31,15 @@ use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
|||
class ContentObjectDataProcessorAdapterProcessor implements ProcessorInterface
|
||||
{
|
||||
/**
|
||||
* @var TypoScriptServiceInterface
|
||||
* @var TypoScriptService
|
||||
*/
|
||||
protected $typoScriptService;
|
||||
|
||||
/**
|
||||
* ContentObjectDataProcessorAdapterProcessor constructor.
|
||||
* @param TypoScriptServiceInterface $typoScriptService
|
||||
* @param TypoScriptService $typoScriptService
|
||||
*/
|
||||
public function __construct(TypoScriptServiceInterface $typoScriptService)
|
||||
public function __construct(TypoScriptService $typoScriptService)
|
||||
{
|
||||
$this->typoScriptService = $typoScriptService;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ Changelog
|
|||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
changelog/20181027-remove-cms7-support
|
||||
changelog/20180518-75-make-index-name-configurable
|
||||
changelog/20180424-149-extract-relation-resolver-to-data-processing
|
||||
changelog/20180410-148-keep-sys_language_uid
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
Breaking Change "Remove CMS7 support"
|
||||
=====================================
|
||||
|
||||
We no longer support TYPO3 CMS 7.x.
|
||||
|
||||
Stay at an older release, or upgrade your TYPO3 installation.
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
|
||||
$filePath = '.Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php';
|
||||
|
||||
require_once dirname(dirname(__DIR__)) . '/' . $filePath;
|
|
@ -21,9 +21,9 @@ namespace Codappix\SearchCore\Tests\Functional\DataProcessing;
|
|||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
use Codappix\SearchCore\Compatibility\TypoScriptService;
|
||||
use Codappix\SearchCore\DataProcessing\ContentObjectDataProcessorAdapterProcessor;
|
||||
use Codappix\SearchCore\Tests\Functional\AbstractFunctionalTestCase;
|
||||
use TYPO3\CMS\Core\TypoScript\TypoScriptService;
|
||||
use TYPO3\CMS\Frontend\DataProcessing\SplitProcessor;
|
||||
|
||||
class ContentObjectDataProcessorAdapterProcessorTest extends AbstractFunctionalTestCase
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<phpunit
|
||||
backupGlobals="true"
|
||||
backupStaticAttributes="false"
|
||||
bootstrap="Bootstrap.php"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="false"
|
||||
convertWarningsToExceptions="false"
|
||||
forceCoversAnnotation="false"
|
||||
processIsolation="true"
|
||||
stopOnError="false"
|
||||
stopOnFailure="false"
|
||||
stopOnIncomplete="false"
|
||||
stopOnSkipped="false"
|
||||
verbose="false">
|
||||
backupGlobals="true"
|
||||
backupStaticAttributes="false"
|
||||
bootstrap="../../.Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="false"
|
||||
convertWarningsToExceptions="false"
|
||||
forceCoversAnnotation="false"
|
||||
processIsolation="true"
|
||||
stopOnError="false"
|
||||
stopOnFailure="false"
|
||||
stopOnIncomplete="false"
|
||||
stopOnSkipped="false"
|
||||
verbose="false">
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="functional-tests">
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
diff --git a/composer.json b/composer.json
|
||||
index 83e5f47..e9fa296 100644
|
||||
--- a/composer.json
|
||||
+++ b/composer.json
|
||||
@@ -21,8 +21,7 @@
|
||||
"ruflin/elastica": "^6.0.2"
|
||||
},
|
||||
"require-dev": {
|
||||
- "phpunit/phpunit": "~6.4.4",
|
||||
- "typo3/testing-framework": "^2.0.0",
|
||||
+ "phpunit/phpunit": "~5.7.0",
|
||||
"squizlabs/php_codesniffer": "~3.1.1"
|
||||
},
|
||||
"config": {
|
|
@ -1,7 +0,0 @@
|
|||
<?php
|
||||
|
||||
$filePath = '.Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsBootstrap.php';
|
||||
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
require_once dirname(dirname(__DIR__)) . '/' . $filePath;
|
|
@ -1,18 +1,18 @@
|
|||
<phpunit
|
||||
backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
bootstrap="Bootstrap.php"
|
||||
backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
bootstrap="../../.Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsBootstrap.php"
|
||||
|
||||
colors="true"
|
||||
convertErrorsToExceptions="false"
|
||||
convertWarningsToExceptions="false"
|
||||
forceCoversAnnotation="false"
|
||||
processIsolation="false"
|
||||
stopOnError="false"
|
||||
stopOnFailure="false"
|
||||
stopOnIncomplete="false"
|
||||
stopOnSkipped="false"
|
||||
verbose="false">
|
||||
colors="true"
|
||||
convertErrorsToExceptions="false"
|
||||
convertWarningsToExceptions="false"
|
||||
forceCoversAnnotation="false"
|
||||
processIsolation="false"
|
||||
stopOnError="false"
|
||||
stopOnFailure="false"
|
||||
stopOnIncomplete="false"
|
||||
stopOnSkipped="false"
|
||||
verbose="false">
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="unit-tests">
|
||||
|
|
|
@ -61,8 +61,6 @@ call_user_func(function ($extension, $configuration) {
|
|||
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $extension . '/Configuration/TSconfig/Page/Mod/Wizards/NewContentElement.tsconfig">'
|
||||
);
|
||||
|
||||
\Codappix\SearchCore\Compatibility\ImplementationRegistrationService::registerImplementations();
|
||||
|
||||
if (empty($configuration) ||
|
||||
(isset($configuration['disable.']['elasticsearch']) &&
|
||||
filter_var($configuration['disable.']['elasticsearch'], FILTER_VALIDATE_BOOLEAN) === false)
|
||||
|
|
Loading…
Reference in a new issue