[TASK] Deprecate EnvironmentService::isEnvironmentInCliMode 59/57859/2
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 10 Aug 2018 13:09:33 +0000 (15:09 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 10 Aug 2018 13:35:42 +0000 (15:35 +0200)
Resolves: #85807
Releases: master
Change-Id: I4737a11e4e673e33553aa5ff835999bcc9a4afb5
Reviewed-on: https://review.typo3.org/57859
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Tim Schreiner <schreiner.tim@gmail.com>
Tested-by: Tim Schreiner <schreiner.tim@gmail.com>
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Documentation/Changelog/master/Deprecation-85807-DeprecateEnvironmentServiceisEnvironmentInCliMode.rst [new file with mode: 0644]
typo3/sysext/extbase/Classes/Service/EnvironmentService.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-85807-DeprecateEnvironmentServiceisEnvironmentInCliMode.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-85807-DeprecateEnvironmentServiceisEnvironmentInCliMode.rst
new file mode 100644 (file)
index 0000000..de262fa
--- /dev/null
@@ -0,0 +1,32 @@
+.. include:: ../../Includes.txt
+
+==========================================================================
+Deprecation: #85807 - Deprecate EnvironmentService::isEnvironmentInCliMode
+==========================================================================
+
+See :issue:`85807`
+
+Description
+===========
+
+The method :php:`TYPO3\CMS\Extbase\Service\EnvironmentService::isEnvironmentInCliMode()` has been deprecated.
+
+
+Impact
+======
+
+Calling the method will trigger a deprecation message.
+
+
+Affected Installations
+======================
+
+Any TYPO3 installation with a custom extension calling the method above.
+
+
+Migration
+=========
+
+Use :php:`TYPO3\CMS\Core\Core\Environment::isCli()` as replacement.
+
+.. index:: PHP-API, FullyScanned, ext:extbase
\ No newline at end of file
index b587af6..cd2d1de 100644 (file)
@@ -45,9 +45,12 @@ class EnvironmentService implements \TYPO3\CMS\Core\SingletonInterface
      * Detects if we are running a script from the command line.
      *
      * @return bool
+     * @deprecated since TYPO3 v9.4 and will be removed in TYPO3 v10
+     * @see Environment::isCli()
      */
     public function isEnvironmentInCliMode()
     {
+        trigger_error('EnvironmentService::isEnvironmentInCliMode is deprecated and will be removed in TYPO3 v10. Use Environment::isCli() instead.', E_USER_DEPRECATED);
         return Environment::isCli();
     }
 
index 3c423d9..0f333c7 100644 (file)
@@ -2563,5 +2563,12 @@ return [
         'restFiles' => [
             'Deprecation-85699-DeprecateMethodsInPageRepository.rst',
         ],
-    ]
+    ],
+    'TYPO3\CMS\Extbase\Service\EnvironmentService->isEnvironmentInCliMode' => [
+        'numberOfMandatoryArguments' => 0,
+        'maximumNumberOfArguments' => 0,
+        'restFiles' => [
+            'Deprecation-85807-DeprecateEnvironmentServiceisEnvironmentInCliMode.rst',
+        ],
+    ],
 ];