[BUGFIX] Allow writing temp files in composer mode 46/57046/3
authorBenni Mack <benni@typo3.org>
Fri, 25 May 2018 07:40:49 +0000 (09:40 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 29 May 2018 23:19:24 +0000 (01:19 +0200)
commit3e2ab899533e35a9350c637f7c8074021fa9c4ca
tree63dbeac310fc5d00c328b0e638def73894417d05
parent40d0c292659906c18dc1b047aa0b44b4a05c43bb
[BUGFIX] Allow writing temp files in composer mode

The new Environment API allows to set the project path
outside of the web root, also moving typo3temp/var/
to env:PROJECT_PATH + var/.

However, the main method GeneralUtility::writeFileToTypo3tempDir()
which is used for adding online media, charset conversion etc.
is not adapted to allow files outside of typo3temp/
which needs adaptions wo also check for PROJECT_PATH + var/
in addition.

Some generic tests were added to ensure the existing functionality
still works.

Resolves: #85077
Releases: master
Change-Id: I664e152ecba39fbb86605af12e83f3ef10f878f9
Reviewed-on: https://review.typo3.org/57046
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Petra Arentzen <typo3@pegu.de>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php