From 0e3f487681bbda466bd506b4d60d7a71d283ed9f Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 27 Apr 2017 16:10:28 +0200 Subject: [PATCH 1/6] TASK: Add removed classes in 7.0 Relates: #41 --- .../Configuration/Removed/Classes/7.0.yaml | 45 +++++++++++++++++++ .../Expected.diff | 3 +- .../InputFileForIssues.php | 1 + 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/src/Standards/Typo3Update/Configuration/Removed/Classes/7.0.yaml b/src/Standards/Typo3Update/Configuration/Removed/Classes/7.0.yaml index 2341204..c50d9c9 100644 --- a/src/Standards/Typo3Update/Configuration/Removed/Classes/7.0.yaml +++ b/src/Standards/Typo3Update/Configuration/Removed/Classes/7.0.yaml @@ -9,3 +9,48 @@ \TYPO3\CMS\Backend\Template\StandardDocumentTemplate: replacement: 'Use \TYPO3\CMS\Backend\Template\DocumentTemplate instead' docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-61782-DeprecatedDocumentTemplateClassesRemoved.html' + \TYPO3\CMS\Extbase\Mvc\Controller\ArgumentError: + replacement: 'Migrate to rewritten property mapper' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-57396-ExtbaseDeprecatedPropertyMapperRemoved.html' + \TYPO3\CMS\Extbase\Mvc\Controller\ArgumentsValidator: + replacement: 'Migrate to rewritten property mapper' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-57396-ExtbaseDeprecatedPropertyMapperRemoved.html' + \TYPO3\CMS\Extbase\Property\Mapper: + replacement: 'Migrate to rewritten property mapper' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-57396-ExtbaseDeprecatedPropertyMapperRemoved.html' + \TYPO3\CMS\Extbase\Property\MappingResults: + replacement: 'Migrate to rewritten property mapper' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-57396-ExtbaseDeprecatedPropertyMapperRemoved.html' + \TYPO3\CMS\Extbase\Security\Channel\RequestHashService: + replacement: 'Migrate to rewritten property mapper' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-57396-ExtbaseDeprecatedPropertyMapperRemoved.html' + \TYPO3\CMS\Extbase\Validation\PropertyError: + replacement: 'Migrate to rewritten property mapper' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-57396-ExtbaseDeprecatedPropertyMapperRemoved.html' + \TYPO3\CMS\Extbase\Validation\Validator\AbstractObjectValidator: + replacement: 'Migrate to rewritten property mapper' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-57396-ExtbaseDeprecatedPropertyMapperRemoved.html' + \TYPO3\CMS\Fluid\ViewHelpers\Form\ErrorsViewHelper: + replacement: 'Migrate to rewritten property mapper' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-57396-ExtbaseDeprecatedPropertyMapperRemoved.html' + \TYPO3\CMS\Extbase\Mvc\Controller\FlashMessageContainer: + replacement: 'Change the API calls to not be of static kind anymore. Extbase extensions have to use getFlashMessageQueue() of the controllerContext' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-57382-FlashMessageApi.html' + \TYPO3\CMS\Extbase\Service\TypeHandlingService: + replacement: 'Replace all calls to \TYPO3\CMS\Extbase\Service\TypeHandlingService functions to their new static functions in \TYPO3\CMS\Extbase\Utility\TypeHandlingUtility' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-61786-ExtbaseDeprecatedTypeHandlingServiceRemoved.html' + \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelConstantsInterface: + replacement: 'Use \TYPO3\CMS\Extbase\Persistence\QueryInterface::*' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-62673-ExtbaseDeprecatedCodeRemoved.html#removed-php-classes' + \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactoryInterface: + replacement: null + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-62673-ExtbaseDeprecatedCodeRemoved.html#removed-php-classes' + \TYPO3\CMS\Scheduler\Task\FileIndexingTask: + replacement: null + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-62670-DeprecatedCodeRemovalInMultipleSysexts.html#removed-php-classes' + \TYPO3\CMS\Core\Compatibility\GlobalObjectDeprecationDecorator: + replacement: null + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-62416-DeprecatedCodeRemovalInCoreSysext.html#removed-php-classes' + \TYPO3\CMS\Core\Resource\Service\IndexerService: + replacement: null + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-62416-DeprecatedCodeRemovalInCoreSysext.html#removed-php-classes' diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/Expected.diff index 41f28ef..80accd3 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/Expected.diff +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/Expected.diff @@ -1,10 +1,11 @@ --- tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/InputFileForIssues.php +++ PHP_CodeSniffer -@@ -19,6 +19,6 @@ +@@ -19,7 +19,7 @@ * 02110-1301, USA. */ -t3lib_div::makeInstance('Tx_Extbase_Command_HelpCommandController'); +t3lib_div::makeInstance('\TYPO3\CMS\Extbase\Command\HelpCommandController'); + t3lib_div::makeInstance(\TYPO3\CMS\Core\Resource\Service\IndexerService::class); // Not handled by this sniff, but StaticCallSniff, as this uses double colon. t3lib_div::makeInstance(Tx_Extbase_Command_HelpCommandController::class); diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/InputFileForIssues.php index 12550c5..ccc9a0c 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/InputFileForIssues.php +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/InputFileForIssues.php @@ -20,5 +20,6 @@ */ t3lib_div::makeInstance('Tx_Extbase_Command_HelpCommandController'); +t3lib_div::makeInstance(\TYPO3\CMS\Core\Resource\Service\IndexerService::class); // Not handled by this sniff, but StaticCallSniff, as this uses double colon. t3lib_div::makeInstance(Tx_Extbase_Command_HelpCommandController::class); From 98b93316521c20a5ca79a343aa3d6435299cba68 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 27 Apr 2017 16:20:14 +0200 Subject: [PATCH 2/6] TASK: Add removed classes for TYPO3 7.3 Relates: #41 --- .../Configuration/Removed/Classes/7.3.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/Standards/Typo3Update/Configuration/Removed/Classes/7.3.yaml diff --git a/src/Standards/Typo3Update/Configuration/Removed/Classes/7.3.yaml b/src/Standards/Typo3Update/Configuration/Removed/Classes/7.3.yaml new file mode 100644 index 0000000..d9fa51d --- /dev/null +++ b/src/Standards/Typo3Update/Configuration/Removed/Classes/7.3.yaml @@ -0,0 +1,14 @@ +# Breaking changes in 7.3: https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.3/Index.html#breaking-changes +'7.3': + \TYPO3\CMS\T3editor\FormWizard: + replacement: 'Use the newly introduced API' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.3/Breaking-67229-FormEngineRelatedClasses.html' + \TYPO3\CMS\Rtehtmlarea\Controller\FrontendRteController: + replacement: 'Use the newly introduced API' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.3/Breaking-67229-FormEngineRelatedClasses.html' + \TYPO3\CMS\Rsaauth\Hook\LoginFormHook: + replacement: 'Use the new backend login form API' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.3/Breaking-66669-BackendLoginControllerRefactored.html' + \TYPO3\CMS\Extbase\Persistence\Generic\IdentityMap: + replacement: 'Existing code can be migrated to the persistence Session class which provides a drop-in replacement for the IdentityMap' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.3/Breaking-66429-RemoveIdentityMapFromPersistence.html' From 3663af3755e354293d5bfe60d893c19f56d0076a Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 27 Apr 2017 16:33:36 +0200 Subject: [PATCH 3/6] TASK: Add removed classes for TYPO3 7.3 Relates: #41 --- .../Configuration/Removed/Classes/7.4.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/Standards/Typo3Update/Configuration/Removed/Classes/7.4.yaml diff --git a/src/Standards/Typo3Update/Configuration/Removed/Classes/7.4.yaml b/src/Standards/Typo3Update/Configuration/Removed/Classes/7.4.yaml new file mode 100644 index 0000000..23c4838 --- /dev/null +++ b/src/Standards/Typo3Update/Configuration/Removed/Classes/7.4.yaml @@ -0,0 +1,14 @@ +# Breaking changes in 7.4: https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.4/Index.html#breaking-changes +'7.4': + \TYPO3\CMS\Backend\Rte\AbstractRte: + replacement: 'Take a look at the docs' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.4/Breaking-67811-RteApi.html' + \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaBase: + replacement: 'Take a look at the docs' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.4/Breaking-67811-RteApi.html' + \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi: + replacement: 'Not removed but refactored, see docs' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.4/Breaking-67811-RteApi.html' + \TYPO3\CMS\Backend\Template\FrontendDocumentTemplate: + replacement: null + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.4/Breaking-68243-MoveNotUsedFrontendDocumentTemplate.html' From cfdf58f7d47163af419d0fd6250bf4cc947dffb2 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 27 Apr 2017 16:33:55 +0200 Subject: [PATCH 4/6] TASK: Add removed classes for TYPO3 7.5 Relates: #41 --- .../Configuration/Removed/Classes/7.5.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/Standards/Typo3Update/Configuration/Removed/Classes/7.5.yaml diff --git a/src/Standards/Typo3Update/Configuration/Removed/Classes/7.5.yaml b/src/Standards/Typo3Update/Configuration/Removed/Classes/7.5.yaml new file mode 100644 index 0000000..8fdb755 --- /dev/null +++ b/src/Standards/Typo3Update/Configuration/Removed/Classes/7.5.yaml @@ -0,0 +1,17 @@ +# Breaking changes in 7.5: https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.5/Index.html#breaking-changes +'7.5': + \TYPO3\CMS\Backend\Form\DataPreprocessor: + replacement: 'Take a look at the docs' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.5/Breaking-69568-FormEngine.html' + \TYPO3\CMS\Backend\Form\FormEngine: + replacement: 'Take a look at the docs' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.5/Breaking-69568-FormEngine.html' + \TYPO3\CMS\Backend\Form\FlexFormsHelper: + replacement: 'Take a look at the docs' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.5/Breaking-69568-FormEngine.html' + \TYPO3\CMS\Core\Database\SqlParser: + replacement: 'Use \TYPO3\CMS\Dbal\Database\SqlParser instead' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.5/Breaking-68401-SqlParserMovedIntoEXTdbal.html' + \TYPO3\CMS\Cshmanual\Controller\HelpModuleController: + replacement: 'Use the Extbase controller or Repository class' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.5/Breaking-63000-MigrateCshmanualToExtbase.html' From 4fdc15d71532fcd7043b4c207e76f12341c9bd81 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 27 Apr 2017 16:41:22 +0200 Subject: [PATCH 5/6] TASK: Add removed classes for TYPO3 7.5 Relates: #41 --- .../Configuration/Removed/Classes/7.6.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/Standards/Typo3Update/Configuration/Removed/Classes/7.6.yaml diff --git a/src/Standards/Typo3Update/Configuration/Removed/Classes/7.6.yaml b/src/Standards/Typo3Update/Configuration/Removed/Classes/7.6.yaml new file mode 100644 index 0000000..4a497e3 --- /dev/null +++ b/src/Standards/Typo3Update/Configuration/Removed/Classes/7.6.yaml @@ -0,0 +1,23 @@ +# Breaking changes in 7.6: https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.6/Index.html#breaking-changes +'7.6': + \TYPO3\CMS\Recordlist\Browser\ElementBrowser: + replacement: 'Use the new API for adding element browsers or link handlers' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.6/Breaking-66369-RemovedElementBrowserRelatedClasses.html' + \TYPO3\CMS\Rtehtmlarea\BrowseLinks: + replacement: 'Use the new API for adding element browsers or link handlers' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.6/Breaking-66369-RemovedElementBrowserRelatedClasses.html' + \TYPO3\CMS\Rtehtmlarea\FolderTree: + replacement: 'Use the new API for adding element browsers or link handlers' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.6/Breaking-66369-RemovedElementBrowserRelatedClasses.html' + \TYPO3\CMS\Rtehtmlarea\LinkHandler\RemoveLinkHandler: + replacement: 'Use the new API for adding element browsers or link handlers' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.6/Breaking-66369-RemovedElementBrowserRelatedClasses.html' + \TYPO3\CMS\Rtehtmlarea\PageTree: + replacement: 'Use the new API for adding element browsers or link handlers' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.6/Breaking-66369-RemovedElementBrowserRelatedClasses.html' + \TYPO3\CMS\Core\ElementBrowser\ElementBrowserHookInterface: + replacement: 'Use the new API for adding element browsers or link handlers' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.6/Breaking-66369-RemovedElementBrowserRelatedClasses.html' + \TYPO3\CMS\Impexp\ImportExport: + replacement: 'Use or extend one or both of the new classes (TYPO3CMSImpexpImport and TYPO3CMSImpexpExport).' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.6/Breaking-45899-SplitClassImportExportIntoClassesImportAndExport.html' From d23bc4d2215fa75500273fd8c266287eabc0b1d5 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 27 Apr 2017 17:05:02 +0200 Subject: [PATCH 6/6] TASK: Add documentation for new feature Relates: #41 --- Documentation/source/configuration.rst | 22 ++++++++++++++++++++++ Documentation/source/features.rst | 11 +++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/Documentation/source/configuration.rst b/Documentation/source/configuration.rst index 7f8ffc7..fa5fce1 100644 --- a/Documentation/source/configuration.rst +++ b/Documentation/source/configuration.rst @@ -165,6 +165,28 @@ Using ``runtime-set``: --runtime-set removedConstantConfigFiles "/Some/Absolute/Path/*.yaml" +.. _configuration-removedClassConfigFiles: + +removedClassConfigFiles +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Configure where to look for configuration files defining the removed classes. Default is +``Configuration/Removed/Classes/*.yaml`` inside the standard itself. We already try to deliver as +much as possible. Globing is used, so placeholders like ``*`` are possible, see +https://secure.php.net/manual/en/function.glob.php + +Using :file:`ruleset.xml`: + +.. code:: xml + + + +Using ``runtime-set``: + +.. code:: bash + + --runtime-set removedClassConfigFiles "/Some/Absolute/Path/*.yaml" + .. _configuration-removedTypoScriptConfigFiles: removedTypoScriptConfigFiles diff --git a/Documentation/source/features.rst b/Documentation/source/features.rst index e055e92..5955b9b 100644 --- a/Documentation/source/features.rst +++ b/Documentation/source/features.rst @@ -96,13 +96,16 @@ Check for removed calls Also we check for the following deprecated calls: -Check for usage of *removed functions* in general. The functions are configured via yaml files. The -location of them is configurable, default is inside the standard itself, and we try to deliver all -information. For configuration options see :ref:`configuration-removedFunctionConfigFiles`. +Check for usage of *removed PHP functions* in general. The functions are configured via yaml files. +The location of them is configurable, default is inside the standard itself, and we try to deliver +all information. For configuration options see :ref:`configuration-removedFunctionConfigFiles`. -Check for usage of *removed constants*. The constants are configured in same way as removed +Check for usage of *removed PHP constants*. The constants are configured in same way as removed functions. For configuration options see :ref:`configuration-removedConstantConfigFiles`. +Check for usage of *removed PHP classes*. The classes are configured in same way as removed +functions. For configuration options see :ref:`configuration-removedClassConfigFiles`. + Further checks --------------