TASK: Remove code base for TYPO3 7.x

Also add documentation with breaking change.
This commit is contained in:
Daniel Siepmann 2018-10-27 10:55:21 +02:00
parent 0d14f80f62
commit 577a5624b8
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
13 changed files with 38 additions and 178 deletions

View file

@ -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
);
}
}
}

View file

@ -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
{
}

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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

View file

@ -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.

View file

@ -1,5 +0,0 @@
<?php
$filePath = '.Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php';
require_once dirname(dirname(__DIR__)) . '/' . $filePath;

View file

@ -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

View file

@ -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">

View file

@ -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": {

View file

@ -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;

View file

@ -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">

View file

@ -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)