Merge branch 'feature/41-check-removed-classes' into 'develop'

Feature/41 check removed classes

Closes #41

See merge request !80
This commit is contained in:
Daniel Hürtgen 2017-05-02 22:08:19 +02:00
commit cbef72b318
9 changed files with 145 additions and 5 deletions

View file

@ -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
<config name="removedClassConfigFiles" value="/Some/Absolute/Path/*.yaml"/>
Using ``runtime-set``:
.. code:: bash
--runtime-set removedClassConfigFiles "/Some/Absolute/Path/*.yaml"
.. _configuration-removedTypoScriptConfigFiles:
removedTypoScriptConfigFiles

View file

@ -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`.
Check for usage of *removed TypoScript*. The TypoScript objects are configured in same way as
removed functions. For configuration options see :ref:`configuration-removedTypoScriptConfigFiles`.
This will check whether you are using already removed TypoScript parts, supported are:

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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