From 48d5a5e2a57216e85755e27437be1b7081f562e1 Mon Sep 17 00:00:00 2001 From: Christian Kuhn <lolli@schwarzbu.ch> Date: Sat, 2 Dec 2017 02:24:18 +0100 Subject: [PATCH] [BUGFIX] Implicit constant to string cast in unit test case An array key is not used as string but as constant in two ConfigurationManager test cases. PHP 7.2 is more picky about this an throws warnings. Fix by creating proper strings. Change-Id: I64def6cf9b5d9df7e150d137929c721558c761d7 Resolves: #83190 Releases: master, 8.7, 7.6 Reviewed-on: https://review.typo3.org/54905 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> --- .../Tests/Unit/Configuration/ConfigurationManagerTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php b/typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php index 7f0f83d2ef76..120dc3dc79e4 100644 --- a/typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php +++ b/typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php @@ -518,9 +518,9 @@ class ConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase $uniqueContentString = $this->getUniqueId('string_'); $validFactoryConfigurationFileContent = '<?php' . LF . - 'return array(' . LF . - $uniqueContentString . ' => foo,' . LF . - ');' . LF; + 'return [' . LF . + '\'' . $uniqueContentString . '\' => \'foo\',' . LF . + '];' . LF; file_put_contents( $factoryConfigurationAbsoluteFile, $validFactoryConfigurationFileContent @@ -563,7 +563,7 @@ class ConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase $validAdditionalFactoryConfigurationFileContent = '<?php' . LF . 'return [' . LF . - $uniqueContentString . ' => foo,' . LF . + '\'' . $uniqueContentString . '\' => \'foo\',' . LF . '];' . LF; file_put_contents( $additionalFactoryConfigurationAbsoluteFile, -- GitLab