[TASK] Remove a common set of false positives from extension scanner 60/58360/4
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 20 Sep 2018 19:32:27 +0000 (21:32 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Sat, 22 Sep 2018 16:51:25 +0000 (18:51 +0200)
The patch removes a set of common methods and properties from
the extension scanner to show less weak matches:
* method init()
* class properties ->config, ->tmpl, ->id, ->returnUrl
Remember this only kicks methods and properties that are so common
that many extensions use them and there are more false positives
than actual matches.
Remember a green file does not mean nothing breaks and a red file does not
mean nothing works. It is not goal of the extension scanner to find
everything, and matches do not mean they are valid.
The above matcher configurations have only been removed since they
use a naming that is often also used in extension. The places where they are
used in core are usually deep in the API and it is rather unlikely a match found
by the scanner does really mean the deprecated / removed method or property
rather than just a false positive due to the common naming.
Other matchers should still be kept, even if they show false
positives in specific cases.
It should not be a goal of an extension developer to make the
extension scanner green.

Change-Id: Ifc27974fe9e854a93661cd1814f044f50a552119
Resolves: #86340
Releases: master
Reviewed-on: https://review.typo3.org/58360
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/core/Documentation/Changelog/9.0/Breaking-55298-DecoupledHistoryFunctionality.rst
typo3/sysext/core/Documentation/Changelog/9.2/Deprecation-84307-ProtectedMethodsAndPropertiesInNewContentElementController.rst
typo3/sysext/core/Documentation/Changelog/9.4/Deprecation-85902-IMGMENUGMENU.rst
typo3/sysext/core/Documentation/Changelog/9.4/Deprecation-85978-GraphicalFunctions-init.rst
typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyProtectedMatcher.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php

index 862ede8..dc36bcd 100644 (file)
@@ -57,7 +57,7 @@ The following public PHP methods have now been removed or made protected.
 * :php:`TYPO3\CMS\Backend\History\RecordHistory->showInsertDelete` (moved into controller)
 * :php:`TYPO3\CMS\Backend\History\RecordHistory->element`
 * :php:`TYPO3\CMS\Backend\History\RecordHistory->lastSyslogId`
-* :php:`TYPO3\CMS\Backend\History\RecordHistory->returnUrl`
+* [not scanned] :php:`TYPO3\CMS\Backend\History\RecordHistory->returnUrl`
 * :php:`TYPO3\CMS\Backend\History\RecordHistory->showMarked`
 * :php:`TYPO3\CMS\Backend\History\RecordHistory->main()` (logic moved into controller)
 * :php:`TYPO3\CMS\Backend\History\RecordHistory->toggleHighlight()`
index 9f7d388..9daa751 100644 (file)
@@ -23,7 +23,7 @@ They will throw deprecation warnings if called public from outside:
 * [not scanned] :php:`doc`
 * [not scanned] :php:`content`
 * :php:`access`
-* :php:`config`
+* [not scanned] :php:`config`
 
 All methods not used as entry points by :php:`TYPO3\CMS\Backend\Http\RouteDispatcher` will be
 removed or set to protected in v10 and throw deprecation warnings if used from a third party:
index 2d2d20c..2f785a9 100644 (file)
@@ -68,9 +68,9 @@ due to the highly connected functionality within the PHP classes:
 * :php:`TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->MP_array`
 * :php:`TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->conf`
 * :php:`TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->mconf`
-* :php:`TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->tmpl`
+* [not scanned] :php:`TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->tmpl`
 * :php:`TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->sys_page`
-* :php:`TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->id`
+* [not scanned] :php:`TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->id`
 * :php:`TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->nextActive`
 * :php:`TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->menuArr`
 * :php:`TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->hash`
index 58a320d..67372f9 100644 (file)
@@ -29,4 +29,4 @@ Migration
 
 No migration is needed, the constructor of :php:`GraphicalFunctions/Gifbuilder` takes care of the initalization of all settings.
 
-.. index:: PHP-API, FullyScanned, ext:core
+.. index:: PHP-API, NotScanned, ext:core
index 9f92e36..b57452c 100644 (file)
@@ -3208,20 +3208,6 @@ return [
             'Deprecation-85960-CompareUidentDeprecated.rst'
         ],
     ],
-    'TYPO3\CMS\Core\Imaging\GraphicalFunctions->init' => [
-        'numberOfMandatoryArguments' => 0,
-        'maximumNumberOfArguments' => 0,
-        'restFiles' => [
-            'Deprecation-85978-GraphicalFunctions-init.rst'
-        ],
-    ],
-    'TYPO3\CMS\Frontend\Imaging\GifBuilder->init' => [
-        'numberOfMandatoryArguments' => 0,
-        'maximumNumberOfArguments' => 0,
-        'restFiles' => [
-            'Deprecation-85978-GraphicalFunctions-init.rst'
-        ],
-    ],
     'TYPO3\CMS\Frontend\Page\PageRepository->getFirstWebPage' => [
         'numberOfMandatoryArguments' => 1,
         'maximumNumberOfArguments' => 1,
index 2e157cf..3de0627 100644 (file)
@@ -342,11 +342,6 @@ return [
             'Deprecation-84307-ProtectedMethodsAndPropertiesInNewContentElementController.rst',
         ],
     ],
-    'TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController->config' => [
-        'restFiles' => [
-            'Deprecation-84307-ProtectedMethodsAndPropertiesInNewContentElementController.rst',
-        ],
-    ],
     'TYPO3\CMS\Backend\Controller\File\FileUploadController->title' => [
         'restFiles' => [
             'Deprecation-84326-ProtectedMethodsAndPropertiesInFileUploadController.rst',
@@ -752,21 +747,11 @@ return [
             'Deprecation-85902-IMGMENUGMENU.rst',
         ],
     ],
-    'TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->tmpl' => [
-        'restFiles' => [
-            'Deprecation-85902-IMGMENUGMENU.rst',
-        ],
-    ],
     'TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->sys_page' => [
         'restFiles' => [
             'Deprecation-85902-IMGMENUGMENU.rst',
         ],
     ],
-    'TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->id' => [
-        'restFiles' => [
-            'Deprecation-85902-IMGMENUGMENU.rst',
-        ],
-    ],
     'TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->nextActive' => [
         'restFiles' => [
             'Deprecation-85902-IMGMENUGMENU.rst',
index cba54ef..dff38a7 100644 (file)
@@ -159,11 +159,6 @@ return [
             'Breaking-55298-DecoupledHistoryFunctionality.rst',
         ],
     ],
-    'TYPO3\CMS\Backend\History\RecordHistory->returnUrl' => [
-        'restFiles' => [
-            'Breaking-55298-DecoupledHistoryFunctionality.rst',
-        ],
-    ],
     'TYPO3\CMS\Backend\History\RecordHistory->showMarked' => [
         'restFiles' => [
             'Breaking-55298-DecoupledHistoryFunctionality.rst',