88474[TASK] Use GeneralUtility::writeFile consistently
Commit message
Review
-
Code review CR +2 Done
- Georg Ringer +2
- Mathias Brodala +1
-
Verified V +2 Done
- Georg Ringer +2
- Mathias Brodala +1
- core-ci +1 CI
Issues 1
Files 21
- typo3/sysext/backend/Classes/Authentication/BackendLocker.php+1 −1
- typo3/sysext/core/Classes/Cache/Backend/FileBackend.php+1 −2
- typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php+1 −2
- typo3/sysext/core/Classes/Configuration/ConfigurationManager.php+2 −1
- typo3/sysext/core/Classes/Configuration/SiteWriter.php+2 −2
- typo3/sysext/core/Classes/Core/ClassLoadingInformation.php+3 −3
- typo3/sysext/core/Classes/Log/Writer/FileWriter.php+2 −2
- typo3/sysext/core/Classes/Resource/OnlineMedia/Helpers/VimeoHelper.php+1 −2
- typo3/sysext/core/Classes/Resource/OnlineMedia/Helpers/YouTubeHelper.php+1 −2
- typo3/sysext/core/Classes/Resource/Processing/SvgImageProcessor.php+1 −1
- typo3/sysext/core/Classes/Resource/ResourceCompressor.php+5 −5
- typo3/sysext/core/Classes/Utility/GeneralUtility.php+1 −1
- typo3/sysext/core/Tests/Unit/Configuration/SiteConfigurationTest.php+1 −1
- typo3/sysext/extensionmanager/Classes/Utility/FileHandlingUtility.php+0 −1
- typo3/sysext/fluid/Classes/Command/SchemaCommand.php+1 −1
- typo3/sysext/impexp/Classes/Export.php+1 −1
- typo3/sysext/impexp/Classes/Import.php+3 −3
- typo3/sysext/indexed_search/Classes/Indexer.php+1 −1
- typo3/sysext/install/Classes/Service/Session/FileSessionHandler.php+2 −2
- typo3/sysext/install/Classes/Service/LanguagePackService.php+0 −1
Review log 1011
-
Benni Mack uploaded patch set 1 03/04/25, 09:28
-
core-ci voted on patch set 1 V +1 03/04/25, 09:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75084
-
Mathias Brodala commented on patch set 1 03/04/25, 10:11
How about making this the default and deprecate the parameter? Of course, the usual deprecation/migration paths are possible. -
Benni Mack commented on patch set 1 03/04/25, 10:27
Reply
Yes. I want to make this change as a followup for v14-only. -
Mathias Brodala commented on patch set 1 03/04/25, 10:44
Is there a reason not all file_put_contents() calls have been replaced with this? > ± rgrep file_put_contents typo3/sysext/ | grep -v Test.php > typo3/sysext/install/Classes/FolderStructure/FileNode.php: $result = @file_put_contents($absolutePath, $this->targetContent); > typo3/sysext/install/Classes/Service/CoreUpdateService.php: $fileStoreResult = file_put_contents($fileLocation, $fileContent); > typo3/sysext/install/Classes/Service/WebServerConfigurationFileService.php: return $count > 0 && file_put_contents($configurationFilename, $configurationFileContent); > typo3/sysext/install/Classes/Service/WebServerConfigurationFileService.php: return $count > 0 && file_put_contents($configurationFilename, $configurationFileContent); > typo3/sysext/extbase/Tests/Functional/Validation/Validator/AbstractUploadedFileTestCase.php: file_put_contents($testFilename, $content); > typo3/sysext/form/Classes/Mvc/Configuration/YamlSource.php: $byteCount = @file_put_contents($fileToSave, $header . LF . $yaml); > typo3/sysext/core/Classes/Cache/Backend/FileBackend.php: file_put_contents($this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension, $this->get($entryIdentifier)); > typo3/sysext/core/Classes/Cache/Backend/FileBackend.php: file_put_contents($this->cacheDirectory . 'FrozenCache.data', serialize($this->cacheEntryIdentifiers)); > typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php: $result = file_put_contents($filePath, $contents); > typo3/sysext/core/Classes/Resource/Security/SvgSanitizer.php: file_put_contents($targetPath, $sanitizedSvg); > typo3/sysext/core/Classes/Package/Cache/ComposerPackageArtifact.php: file_put_contents($this->packageArtifactsFile, '<?php' . PHP_EOL . 'return ' . PHP_EOL . $cacheEntry->withIdentifier($this->cacheIdentifier)->serialize() . ';'); -
Benni Mack commented on patch set 1 03/04/25, 12:04
Reply
yes. one at time... the other changes might have impact and might be taken separately (there is a patch from Georg that touches a similar area). -
Mathias Brodala commented on patch set 1 CR +1 V +1 03/04/25, 13:58
Thanks for the clarification! -
Mathias Brodala commented on patch set 1 03/04/25, 13:58
Reply
Done -
Georg Ringer voted on patch set 1 CR +1 V +1 03/04/25, 14:56
-
Georg Ringer voted on patch set 1 CR +2 V +2 03/04/25, 14:58
-
Georg Ringer merged patch set 2 03/04/25, 14:58