diff --git a/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php b/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php index e2a5a48f8bce1ed14f5673dc119fafce0324eee6..2ed868d234b56f8248401b7ab3783412a373d575 100644 --- a/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php +++ b/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php @@ -381,7 +381,7 @@ class SystemEnvironmentBuilder } // Find out if path is relative or not $isRelativePath = false; - if (TYPO3_OS === 'WIN') { + if (self::getTypo3Os() === 'WIN') { if (!preg_match('/^([a-zA-Z]:)?\\\\/', $scriptPath)) { $isRelativePath = true; } diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-85285-DeprecatedSystemConstants.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-85285-DeprecatedSystemConstants.rst index f45734c482d8be7ffdf535ce5736253c3f384e21..969228cfc972ee9f048cf32ae496782f6c122f55 100644 --- a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-85285-DeprecatedSystemConstants.rst +++ b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-85285-DeprecatedSystemConstants.rst @@ -23,6 +23,9 @@ The following constants have been deprecated and should not be used any longer: * :php:`PATH_typo3conf` Use :php:`Environment::getPublicPath() . '/typo3conf'` instead +* :php:`TYPO3_OS` + Use :php:`Environment::isWindows()` and :php:`Environment::isUnix()` instead + Impact ====== @@ -48,4 +51,4 @@ Migration Usages of the above constants should be switched to the Environment class methods instead. -.. index:: PHP-API, FullyScanned \ No newline at end of file +.. index:: PHP-API, FullyScanned diff --git a/typo3/sysext/core/Tests/Unit/Resource/ResourceCompressorTest.php b/typo3/sysext/core/Tests/Unit/Resource/ResourceCompressorTest.php index 1f65b42f6fdbe7001c6f416a262b93ff258e5df4..404fdda093f434812b5d82deacf221376e05c9e2 100644 --- a/typo3/sysext/core/Tests/Unit/Resource/ResourceCompressorTest.php +++ b/typo3/sysext/core/Tests/Unit/Resource/ResourceCompressorTest.php @@ -618,7 +618,7 @@ class ResourceCompressorTest extends BaseTestCase Environment::getVarPath(), Environment::getConfigPath(), PATH_site . 'index.php', - TYPO3_OS === 'WIN' ? 'WINDOWS' : 'UNIX' + Environment::isWindows() ? 'WINDOWS' : 'UNIX' ); $_SERVER['ORIG_SCRIPT_NAME'] = '/index.php'; $this->subject = $this->getAccessibleMock(ResourceCompressor::class, ['dummy']); diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ConstantMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ConstantMatcher.php index c16ac744988a01a80c6b40d31448a665a8fe52cb..ec4f4a4b75a7100384ffb8fe961f3d728d642935 100644 --- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ConstantMatcher.php +++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ConstantMatcher.php @@ -83,4 +83,10 @@ return [ 'Deprecation-85285-DeprecatedSystemConstants.rst', ], ], + 'TYPO3_OS' => [ + 'restFiles' => [ + 'Feature-84153-IntroduceAGenericEnvironmentClass.rst', + 'Deprecation-85285-DeprecatedSystemConstants.rst', + ], + ], ];