[TASK] Deprecate @internal annotation in extbase commands 39/58039/7
authorAlexander Schnitzler <git@alexanderschnitzler.de>
Sat, 25 Aug 2018 15:35:38 +0000 (17:35 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 12 Sep 2018 16:56:10 +0000 (18:56 +0200)
The @internal annotation – which is a regular phpDocumentor annotation
that is used to denote that associated structural elements are elements
internal to the application or library, has been misused by extbase to
tell if a command is internal and thus should not be exposed through
help texts, user documentation etc. – is deprecated without any

TYPO3 does no longer support the use of the @internal annotation to
influence the behaviour of the code.

Releases: master
Resolves: #85980
Change-Id: I7f3b998b56e270b30e5193d494d35329f5608603
Reviewed-on: https://review.typo3.org/58039
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Helmut Hummel <typo3@helhum.io>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Documentation/Changelog/master/Deprecation-85980-DeprecateInternalAnnotationInExtbaseCommands.rst [new file with mode: 0644]

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-85980-DeprecateInternalAnnotationInExtbaseCommands.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-85980-DeprecateInternalAnnotationInExtbaseCommands.rst
new file mode 100644 (file)
index 0000000..873370c
--- /dev/null
@@ -0,0 +1,39 @@
+.. include:: ../../Includes.txt
+Deprecation: #85980 - Deprecate @internal annotation in extbase commands
+See :issue:`85980`
+The :php:`@internal` annotation is deprecated without any replacement.
+This is a regular phpDocumentor annotation that is used to denote that associated structural
+elements are elements internal to the application or library. It has been misused by Extbase to tell
+if a command is internal and thus should not be exposed through help texts, user documentation etc.
+TYPO3 does no longer support the use of the :php:`@internal` annotation to influence the behaviour
+of the code.
+Using :php:`@internal` on methods of classes extending
+:php:`TYPO3\CMS\Extbase\Mvc\Controller\CommandController` will log a deprecation warning.
+Affected Installations
+All installations that make use of Extbase commands whose methods are tagged with :php:`@internal`.
+There is none.
+.. index:: NotScanned, ext:extbase
index b37d4b7..3ce0e01 100644 (file)
@@ -424,6 +424,16 @@ class ClassSchema
+                if ($tag === 'internal' && $reflectionClass->isSubclassOf(\TYPO3\CMS\Extbase\Mvc\Controller\CommandController::class)) {
+                    trigger_error(
+                        sprintf(
+                            'Command method %s::%s is tagged with @internal which is deprecated and will be removed in TYPO3 v10.0.',
+                            $reflectionClass->getName(),
+                            $reflectionMethod->getName()
+                        ),
+                        E_USER_DEPRECATED
+                    );
+                }
                 if ($tag === 'ignorevalidation') {