[!!!][TASK] Remove deprecated Extbase-related code (Part 3) 73/59273/3
authorAlexander Schnitzler <git@alexanderschnitzler.de>
Sat, 22 Dec 2018 13:10:18 +0000 (14:10 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 22 Dec 2018 14:20:43 +0000 (15:20 +0100)
* public static method in ActionController
* public method in Argument
* public method in Arguments
* class AbstractValidatorTestcase
* legacy location of settings.view.formatToPageTypeMapping

Releases: master
Resolves: #87268
Change-Id: Ieacc247e2ee85b088c01ae9d6d79691df319b333
Reviewed-on: https://review.typo3.org/59273
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
13 files changed:
typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst
typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php
typo3/sysext/extbase/Classes/Mvc/Controller/Argument.php
typo3/sysext/extbase/Classes/Mvc/Controller/Arguments.php
typo3/sysext/extbase/Classes/Service/ExtensionService.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/AbstractValidatorTestcase.php [deleted file]
typo3/sysext/extbase/Tests/Unit/Validation/Validator/FloatValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/IntegerValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/NotEmptyValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/TextValidatorTest.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php

index 7ccb239..e84b302 100644 (file)
@@ -52,6 +52,8 @@ The following PHP classes that have been previously deprecated for v9 have been
 * :php:`TYPO3\CMS\Extbase\Scheduler\FieldProvider`
 * :php:`TYPO3\CMS\Extbase\Scheduler\Task`
 * :php:`TYPO3\CMS\Extbase\Scheduler\TaskExecutor`
+* :php:`TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator\AbstractValidatorTestcase`
+* :php:`TYPO3\CMS\Extbase\Validation\Validator\RawValidator`
 * :php:`TYPO3\CMS\Extensionmanager\Command\ExtensionCommandController`
 * :php:`TYPO3\CMS\Frontend\Http\EidRequestHandler`
 * :php:`TYPO3\CMS\Frontend\Page\ExternalPageUrlHandler`
@@ -62,7 +64,6 @@ The following PHP classes that have been previously deprecated for v9 have been
 * :php:`TYPO3\CMS\Workspaces\Service\AutoPublishService`
 * :php:`TYPO3\CMS\Workspaces\Task\AutoPublishTask`
 * :php:`TYPO3\CMS\Workspaces\Task\CleanupPreviewLinkTask`
-* :php:`TYPO3\CMS\Extbase\Validation\Validator\RawValidator`
 
 
 The following PHP interfaces that have been previously deprecated for v9 have been removed:
@@ -298,6 +299,8 @@ The following PHP class methods that have been previously deprecated for v9 have
 * :php:`TYPO3\CMS\Core\Utility\GeneralUtility->sysLog()`
 * :php:`TYPO3\CMS\Core\Utility\GeneralUtility->unQuoteFilenames()`
 * :php:`TYPO3\CMS\Extbase\Core\Bootstrap->configureObjectManager()`
+* :php:`TYPO3\CMS\Extbase\Mvc\Controller\Argument->getValidationResults()`
+* :php:`TYPO3\CMS\Extbase\Mvc\Controller\Arguments->getValidationResults()`
 * :php:`TYPO3\CMS\Extbase\Service\EnvironmentService->isEnvironmentInCliMode`
 * :php:`TYPO3\CMS\Fluid\Core\Widget\Bootstrap->configureObjectManager()`
 * :php:`TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->addParams()`
@@ -384,14 +387,15 @@ The following PHP static class methods that have been previously deprecated for
 * :php:`TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory::determineSaltingHashingMethod()`
 * :php:`TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory::getSaltingInstance()`
 * :php:`TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory::setPreferredHashingMethod()`
+* :php:`TYPO3\CMS\Extbase\Mvc\Controller\ActionController::getActionMethodParameters()`
 
 
 The following methods changed signature according to previous deprecations in v9 at the end of the argument list:
 
 * :php:`TYPO3\CMS\Backend\Http\RouteDispatcher->dispatch()` - Second argument dropped
 * :php:`TYPO3\CMS\Backend\Utility\BackendUtility::getPagesTSconfig()` - Second and third argument dropped
-* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->modAccess() - Second argument dropped
-* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->getTSConfig() - First and second argument dropped
+* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->modAccess()` - Second argument dropped
+* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->getTSConfig()` - First and second argument dropped
 * :php:`TYPO3\CMS\Core\Charset\CharsetConverter->conv()` - Fourth argument dropped
 * :php:`TYPO3\CMS\Core\Core\Bootstrap->checkIfEssentialConfigurationExists()` - First argument mandatory
 * :php:`TYPO3\CMS\Core\Core\Bootstrap->populateLocalConfiguration()` - First argument mandatory
index 18a7df1..af22e4e 100644 (file)
@@ -602,34 +602,4 @@ class ActionController extends AbstractController
         $outputMessage = 'Validation failed while trying to call ' . static::class . '->' . $this->actionMethodName . '().' . PHP_EOL;
         return $outputMessage;
     }
-
-    /**
-     * Returns a map of action method names and their parameters.
-     *
-     * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
-     *
-     * @return array Array of method parameters by action name
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-     */
-    public static function getActionMethodParameters($objectManager)
-    {
-        trigger_error(
-            'Method ' . __METHOD__ . ' is deprecated and will be removed in TYPO3 v10.0.',
-            E_USER_DEPRECATED
-        );
-
-        $reflectionService = $objectManager->get(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class);
-
-        $result = [];
-
-        $className = get_called_class();
-        $methodNames = get_class_methods($className);
-        foreach ($methodNames as $methodName) {
-            if (strlen($methodName) > 6 && strpos($methodName, 'Action', strlen($methodName) - 6) !== false) {
-                $result[$methodName] = $reflectionService->getMethodParameters($className, $methodName);
-            }
-        }
-
-        return $result;
-    }
 }
index ebe33bc..46dbaf6 100644 (file)
@@ -305,20 +305,6 @@ class Argument
     }
 
     /**
-     * @return \TYPO3\CMS\Extbase\Error\Result Validation errors which have occurred.
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-     */
-    public function getValidationResults()
-    {
-        trigger_error(
-            'Method ' . __METHOD__ . ' is deprecated and will be removed in TYPO3 v10.0.',
-            E_USER_DEPRECATED
-        );
-
-        return $this->validate();
-    }
-
-    /**
      * Returns a string representation of this argument's value
      *
      * @return string
index b067d5b..c5542c4 100644 (file)
@@ -273,22 +273,6 @@ class Arguments extends \ArrayObject
     }
 
     /**
-     * Get all property mapping / validation errors
-     *
-     * @return \TYPO3\CMS\Extbase\Error\Result
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-     */
-    public function getValidationResults()
-    {
-        trigger_error(
-            'Method ' . __METHOD__ . ' is deprecated and will be removed in TYPO3 v10.0.',
-            E_USER_DEPRECATED
-        );
-
-        return $this->validate();
-    }
-
-    /**
      * @return \TYPO3\CMS\Extbase\Error\Result
      */
     public function validate(): \TYPO3\CMS\Extbase\Error\Result
index 5f7ba18..8d5cd39 100644 (file)
@@ -236,12 +236,6 @@ class ExtensionService implements \TYPO3\CMS\Core\SingletonInterface
      */
     public function getTargetPageTypeByFormat($extensionName, $format)
     {
-        // Legacy location
-        $settings = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, $extensionName);
-        if (isset($settings['view']['formatToPageTypeMapping']) && is_array($settings['view']['formatToPageTypeMapping'])) {
-            trigger_error('Extension "' . $extensionName . '": Defining settings.view.formatToPageTypeMapping will be removed in TYPO3 10. Move definition to view.formatToPageTypeMapping.', E_USER_DEPRECATED);
-            $formatToPageTypeMapping = $settings['view']['formatToPageTypeMapping'];
-        }
         // Default behaviour
         $settings = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, $extensionName);
         if (isset($settings['view']['formatToPageTypeMapping']) && is_array($settings['view']['formatToPageTypeMapping'])) {
diff --git a/typo3/sysext/extbase/Tests/Unit/Validation/Validator/AbstractValidatorTestcase.php b/typo3/sysext/extbase/Tests/Unit/Validation/Validator/AbstractValidatorTestcase.php
deleted file mode 100644 (file)
index 7e99bb2..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
-
-/**
- * Test case for the Abstract Validator
- * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
- */
-abstract class AbstractValidatorTestcase extends UnitTestCase
-{
-    /**
-     * @var string
-     */
-    protected $validatorClassName;
-
-    /**
-     * @var \TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface
-     */
-    protected $validator;
-
-    /**
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-     */
-    protected function setUp()
-    {
-        $this->validator = $this->getValidator();
-    }
-
-    /**
-     * @param array $options
-     * @return mixed
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-     */
-    protected function getValidator($options = [])
-    {
-        trigger_error(
-            __CLASS__ . ' is deprecated and will be removed in TYPO3 v10.0.',
-            E_USER_DEPRECATED
-        );
-
-        $validator = new $this->validatorClassName($options);
-        return $validator;
-    }
-
-    /**
-     * @param array $options
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-     */
-    protected function validatorOptions($options)
-    {
-        trigger_error(
-            __CLASS__ . ' is deprecated and will be removed in TYPO3 v10.0.',
-            E_USER_DEPRECATED
-        );
-
-        $this->validator = $this->getValidator($options);
-    }
-}
index 9e81c0e..fe9cd4d 100644 (file)
@@ -17,7 +17,7 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 /**
  * Testcase for the float validator
  */
-class FloatValidatorTest extends \TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator\AbstractValidatorTestcase
+class FloatValidatorTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
 {
     /**
      * @var string
index a3aaa73..6252dad 100644 (file)
@@ -17,7 +17,7 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 /**
  * Testcase for the integer validator
  */
-class IntegerValidatorTest extends \TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator\AbstractValidatorTestcase
+class IntegerValidatorTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
 {
     /**
      * @var string
index 2343e31..d998997 100644 (file)
@@ -17,7 +17,7 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 /**
  * Testcase for the not empty validator
  */
-class NotEmptyValidatorTest extends \TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator\AbstractValidatorTestcase
+class NotEmptyValidatorTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
 {
     /**
      * @var string
index 8376c15..69b0530 100644 (file)
@@ -17,7 +17,7 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
 /**
  * Testcase for the text validator
  */
-class TextValidatorTest extends \TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator\AbstractValidatorTestcase
+class TextValidatorTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
 {
     /**
      * @var string
index c1a8cf1..a8c1d5c 100644 (file)
@@ -697,6 +697,7 @@ return [
     ],
     'TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator\AbstractValidatorTestcase' => [
         'restFiles' => [
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
             'Deprecation-83511-DeprecateAbstractValidatorTestcase.rst',
         ],
     ],
index 4961c05..dd43458 100644 (file)
@@ -2543,6 +2543,7 @@ return [
         'numberOfMandatoryArguments' => 0,
         'maximumNumberOfArguments' => 0,
         'restFiles' => [
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
             'Deprecation-85012-OnlyValidateMethodParamsIfNeeded.rst',
         ],
     ],
@@ -2550,6 +2551,7 @@ return [
         'numberOfMandatoryArguments' => 0,
         'maximumNumberOfArguments' => 0,
         'restFiles' => [
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
             'Deprecation-85012-OnlyValidateMethodParamsIfNeeded.rst',
         ],
     ],
index 6d689d7..6876dc0 100644 (file)
@@ -556,6 +556,7 @@ return [
         'numberOfMandatoryArguments' => 2,
         'maximumNumberOfArguments' => 4,
         'restFiles' => [
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
             'Deprecation-83475-AggregateValidatorInformationInClassSchema-2.rst',
         ],
     ],