Commit 1b24a617 authored by Benni Mack's avatar Benni Mack Committed by Susanne Moog
Browse files

[TASK] Replace further usages with Environment API

Most of the occurrences have been replaced by using
Environment API.

On top, labels are now moved into "var/labels"
for existing composer-based installations, moving
XLF files out of the document root when the environment
is configured to allow files outside of the document
root.

For non-composer-based installations, labels are still
available under "typo3conf/l10n".

Resolves: #85560
Releases: master
Change-Id: Ib0a9e8e3dcd685109b9d922aee1970e68b265179
Reviewed-on: https://review.typo3.org/57600


Reviewed-by: Frank Nägler's avatarFrank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Nägler's avatarFrank Naegler <frank.naegler@typo3.org>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
parent d66dd1ee
......@@ -83,7 +83,7 @@ class QueryInformation extends AbstractSubModule implements DataProviderInterfac
{
$view = new StandaloneView();
$view->setTemplatePathAndFilename(
'typo3/sysext/adminpanel/Resources/Private/Templates/Modules/Debug/QueryInformation.html'
'EXT:adminpanel/Resources/Private/Templates/Modules/Debug/QueryInformation.html'
);
$this->getLanguageService()->includeLLFile('EXT:adminpanel/Resources/Private/Language/locallang_debug.xlf');
$view->assignMultiple($data->getArrayCopy());
......
......@@ -40,32 +40,32 @@ class ConfigurationManager
/**
* @var string Path to default TYPO3_CONF_VARS file, relative to the public web folder
*/
protected $defaultConfigurationFile = 'typo3/sysext/core/Configuration/DefaultConfiguration.php';
protected $defaultConfigurationFile = 'core/Configuration/DefaultConfiguration.php';
/**
* @var string Path to description file for TYPO3_CONF_VARS, relative to the public web folder
*/
protected $defaultConfigurationDescriptionFile = 'typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml';
protected $defaultConfigurationDescriptionFile = 'core/Configuration/DefaultConfigurationDescription.yaml';
/**
* @var string Path to local overload TYPO3_CONF_VARS file, relative to the public web folder
*/
protected $localConfigurationFile = 'typo3conf/LocalConfiguration.php';
protected $localConfigurationFile = 'LocalConfiguration.php';
/**
* @var string Path to additional local file, relative to the public web folder
*/
protected $additionalConfigurationFile = 'typo3conf/AdditionalConfiguration.php';
protected $additionalConfigurationFile = 'AdditionalConfiguration.php';
/**
* @var string Path to factory configuration file used during installation as LocalConfiguration boilerplate
*/
protected $factoryConfigurationFile = 'typo3/sysext/core/Configuration/FactoryConfiguration.php';
protected $factoryConfigurationFile = 'core/Configuration/FactoryConfiguration.php';
/**
* @var string Path to possible additional factory configuration file delivered by packages
*/
protected $additionalFactoryConfigurationFile = 'typo3conf/AdditionalFactoryConfiguration.php';
protected $additionalFactoryConfigurationFile = 'AdditionalFactoryConfiguration.php';
/**
* Writing to these configuration paths is always allowed,
......@@ -101,7 +101,7 @@ class ConfigurationManager
*/
public function getDefaultConfigurationFileLocation()
{
return Environment::getPublicPath() . '/' . $this->defaultConfigurationFile;
return Environment::getFrameworkBasePath() . '/' . $this->defaultConfigurationFile;
}
/**
......@@ -113,7 +113,7 @@ class ConfigurationManager
*/
public function getDefaultConfigurationDescriptionFileLocation()
{
return Environment::getPublicPath() . '/' . $this->defaultConfigurationDescriptionFile;
return Environment::getFrameworkBasePath() . '/' . $this->defaultConfigurationDescriptionFile;
}
/**
......@@ -135,7 +135,7 @@ class ConfigurationManager
*/
public function getLocalConfigurationFileLocation()
{
return Environment::getPublicPath() . '/' . $this->localConfigurationFile;
return Environment::getLegacyConfigPath() . '/' . $this->localConfigurationFile;
}
/**
......@@ -159,7 +159,7 @@ class ConfigurationManager
*/
public function getAdditionalConfigurationFileLocation()
{
return Environment::getPublicPath() . '/' . $this->additionalConfigurationFile;
return Environment::getLegacyConfigPath() . '/' . $this->additionalConfigurationFile;
}
/**
......@@ -169,7 +169,7 @@ class ConfigurationManager
*/
protected function getFactoryConfigurationFileLocation()
{
return Environment::getPublicPath() . '/' . $this->factoryConfigurationFile;
return Environment::getFrameworkBasePath() . '/' . $this->factoryConfigurationFile;
}
/**
......@@ -321,7 +321,7 @@ class ConfigurationManager
public function canWriteConfiguration()
{
$fileLocation = $this->getLocalConfigurationFileLocation();
return @is_writable(file_exists($fileLocation) ? $fileLocation : Environment::getPublicPath() . '/typo3conf/');
return @is_writable(file_exists($fileLocation) ? $fileLocation : Environment::getLegacyConfigPath() . '/');
}
/**
......
......@@ -33,12 +33,12 @@ class ClassLoadingInformation
/**
* Base directory storing all autoload information
*/
const AUTOLOAD_INFO_DIR = 'typo3conf/autoload/';
const AUTOLOAD_INFO_DIR = 'autoload/';
/**
* Base directory storing all autoload information in testing context
*/
const AUTOLOAD_INFO_DIR_TESTS = 'typo3conf/autoload-tests/';
const AUTOLOAD_INFO_DIR_TESTS = 'autoload-tests/';
/**
* Name of file that contains all classes-filename mappings
......@@ -167,9 +167,9 @@ class ClassLoadingInformation
protected static function getClassLoadingInformationDirectory()
{
if (self::isTestingContext()) {
return Environment::getPublicPath() . '/' . self::AUTOLOAD_INFO_DIR_TESTS;
return Environment::getLegacyConfigPath() . '/' . self::AUTOLOAD_INFO_DIR_TESTS;
}
return Environment::getPublicPath() . '/' . self::AUTOLOAD_INFO_DIR;
return Environment::getLegacyConfigPath() . '/' . self::AUTOLOAD_INFO_DIR;
}
/**
......
......@@ -56,7 +56,7 @@ class PharStreamWrapperInterceptor implements \TYPO3\PharStreamWrapper\Assertabl
if (GeneralUtility::validPathStr($path)
&& GeneralUtility::isFirstPartOfStr(
$path,
Environment::getPublicPath() . '/typo3conf/ext/'
Environment::getExtensionsPath()
)
) {
return true;
......
......@@ -86,7 +86,7 @@ abstract class AbstractXmlParser implements LocalizationParserInterface
}
/**
* Checks if a localized file is found in typo3conf/l10n/ (e.g. a language pack was downloaded in the backend)
* Checks if a localized file is found in labels pack (e.g. a language pack was downloaded in the backend)
* or if $sameLocation is set, then checks for a file located in "{language}.locallang.xlf" at the same directory
*
* @param string $fileRef Absolute file reference to locallang file
......@@ -107,15 +107,15 @@ abstract class AbstractXmlParser implements LocalizationParserInterface
}
// Analyse file reference
if (GeneralUtility::isFirstPartOfStr($fileRef, Environment::getPublicPath() . '/typo3/sysext/')) {
if (GeneralUtility::isFirstPartOfStr($fileRef, Environment::getFrameworkBasePath() . '/')) {
// Is system
$validatedPrefix = Environment::getPublicPath() . '/typo3/sysext/';
} elseif (GeneralUtility::isFirstPartOfStr($fileRef, Environment::getPublicPath() . '/typo3/ext/')) {
$validatedPrefix = Environment::getFrameworkBasePath() . '/';
} elseif (GeneralUtility::isFirstPartOfStr($fileRef, Environment::getBackendPath() . '/ext/')) {
// Is global
$validatedPrefix = Environment::getPublicPath() . '/typo3/ext/';
} elseif (GeneralUtility::isFirstPartOfStr($fileRef, Environment::getPublicPath() . '/typo3conf/ext/')) {
$validatedPrefix = Environment::getBackendPath() . '/ext/';
} elseif (GeneralUtility::isFirstPartOfStr($fileRef, Environment::getExtensionsPath() . '/')) {
// Is local
$validatedPrefix = Environment::getPublicPath() . '/typo3conf/ext/';
$validatedPrefix = Environment::getExtensionsPath() . '/';
} else {
$validatedPrefix = '';
}
......@@ -129,7 +129,7 @@ abstract class AbstractXmlParser implements LocalizationParserInterface
// Add empty first-entry if not there.
list($file_extPath, $file_fileName) = $temp;
// The filename is prefixed with "[language key]." because it prevents the llxmltranslate tool from detecting it.
return Environment::getPublicPath() . '/typo3conf/l10n/' . $language . '/' . $extensionKey . '/' . ($file_extPath ? $file_extPath . '/' : '') . $language . '.' . $file_fileName;
return Environment::getLabelsPath() . '/' . $language . '/' . $extensionKey . '/' . ($file_extPath ? $file_extPath . '/' : '') . $language . '.' . $file_fileName;
}
return null;
}
......
......@@ -108,7 +108,7 @@ class PackageManager implements SingletonInterface
public function __construct(DependencyOrderingService $dependencyOrderingService = null)
{
$this->packagesBasePath = Environment::getPublicPath() . '/';
$this->packageStatesPathAndFilename = Environment::getPublicPath() . '/typo3conf/PackageStates.php';
$this->packageStatesPathAndFilename = Environment::getLegacyConfigPath() . '/PackageStates.php';
if ($dependencyOrderingService === null) {
trigger_error(self::class . ' without constructor based dependency injection has been deprecated in v9.2 and will not work in TYPO3 v10.', E_USER_DEPRECATED);
$dependencyOrderingService = GeneralUtility::makeInstance(DependencyOrderingService::class);
......@@ -1075,13 +1075,13 @@ class PackageManager implements SingletonInterface
{
if (count($this->packagesBasePaths) < 3) {
// Check if the directory even exists and if it is not empty
if (is_dir(Environment::getPublicPath() . '/typo3conf/ext') && $this->hasSubDirectories(Environment::getPublicPath() . '/typo3conf/ext')) {
$this->packagesBasePaths['local'] = Environment::getPublicPath() . '/typo3conf/ext/*/';
if (is_dir(Environment::getExtensionsPath()) && $this->hasSubDirectories(Environment::getExtensionsPath())) {
$this->packagesBasePaths['local'] = Environment::getExtensionsPath() . '/*/';
}
if (is_dir(Environment::getPublicPath() . '/typo3/ext') && $this->hasSubDirectories(Environment::getPublicPath() . '/typo3/ext')) {
$this->packagesBasePaths['global'] = Environment::getPublicPath() . '/typo3/ext/*/';
if (is_dir(Environment::getBackendPath() . '/ext') && $this->hasSubDirectories(Environment::getBackendPath() . '/ext')) {
$this->packagesBasePaths['global'] = Environment::getBackendPath() . '/ext/*/';
}
$this->packagesBasePaths['system'] = Environment::getPublicPath() . '/typo3/sysext/*/';
$this->packagesBasePaths['system'] = Environment::getFrameworkBasePath() . '/*/';
}
return $this->packagesBasePaths;
}
......
......@@ -85,7 +85,7 @@ class ResourceCompressor
$this->gzipCompressionLevel = (int)$compressionLevel;
}
}
$this->setRootPath(TYPO3_MODE === 'BE' ? Environment::getPublicPath() . '/typo3/' : Environment::getPublicPath() . '/');
$this->setRootPath(TYPO3_MODE === 'BE' ? Environment::getBackendPath() . '/' : Environment::getPublicPath() . '/');
}
/**
......@@ -462,14 +462,14 @@ class ResourceCompressor
return $fileNameWithoutSlash;
}
// if the file is from a special TYPO3 internal directory, add the missing typo3/ prefix
if (is_file(realpath(Environment::getPublicPath() . '/typo3/' . $filename))) {
if (is_file(realpath(Environment::getBackendPath() . '/' . $filename))) {
$filename = 'typo3/' . $filename;
}
// build the file path relative to the public web path
if (strpos($filename, 'EXT:') === 0) {
$file = GeneralUtility::getFileAbsFileName($filename);
} elseif (strpos($filename, '../') === 0) {
$file = GeneralUtility::resolveBackPath(Environment::getPublicPath() . '/typo3/' . $filename);
$file = GeneralUtility::resolveBackPath(Environment::getBackendPath() . '/' . $filename);
} else {
$file = Environment::getPublicPath() . '/' . $filename;
}
......
......@@ -10,9 +10,9 @@ Description
===========
The language module in the backend offers the possibility to activate and deactivate language packs.
If deactivating a language pack that previously had been loaded, the data stays in `typo3conf/l10n/<locale>/`.
If deactivating a language pack that previously had been loaded, the data stays in `<labels-path>/<locale>/`.
A remove button has been added to the actions. With the remove action the language is disabled and the data is removed
from the `typo3conf/l10n/<locale>/` directory.
from the `<labels-path>/<locale>/` directory.
Impact
......@@ -20,4 +20,4 @@ Impact
The language data can now be removed from the installation file system using the backend user interface.
.. index:: Backend
\ No newline at end of file
.. index:: Backend
.. include:: ../../Includes.txt
=====================================================
Important: #85560 - Location of XLF labels downloaded
=====================================================
See :issue:`85560`
Description
===========
Downloaded files for XLF language files are usually stored within `typo3conf/l10n`, however, if the environment
variable `TYPO3_PATH_ROOT` is set, which is common for all composer-based installations, the XLF language files
are now found outside the document root, available under `var/labels/`.
The Environment API :php:`Environment::getLabelsPath()` resolves the correct full location path prefix.
.. index:: PHP-API
\ No newline at end of file
......@@ -380,8 +380,8 @@ class ConfigurationManagerTest extends UnitTestCase
/** @var $subject ConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface */
$subject = $this->getAccessibleMock(ConfigurationManager::class, ['dummy']);
$file = 'typo3temp/var/tests/' . $this->getUniqueId('test_');
$absoluteFile = Environment::getPublicPath() . '/' . $file;
$file = '../typo3temp/var/tests/' . $this->getUniqueId('test_');
$absoluteFile = Environment::getLegacyConfigPath() . '/' . $file;
touch($absoluteFile);
$this->testFilesToDelete[] = $absoluteFile;
chmod($absoluteFile, 0444);
......@@ -473,8 +473,8 @@ class ConfigurationManagerTest extends UnitTestCase
/** @var $subject ConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface */
$subject = $this->getAccessibleMock(ConfigurationManager::class, ['dummy']);
$file = 'typo3temp/var/tests/' . $this->getUniqueId('test_');
$absoluteFile = Environment::getPublicPath() . '/' . $file;
$file = '../typo3temp/var/tests/' . $this->getUniqueId('test_');
$absoluteFile = Environment::getLegacyConfigPath() . '/' . $file;
touch($absoluteFile);
$this->testFilesToDelete[] = $absoluteFile;
$subject->_set('localConfigurationFile', $file);
......@@ -489,10 +489,10 @@ class ConfigurationManagerTest extends UnitTestCase
{
/** @var $subject ConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface */
$subject = $this->getAccessibleMock(ConfigurationManager::class, ['writeLocalConfiguration']);
$subject->_set('localConfigurationFile', 'typo3temp/var/tests/' . $this->getUniqueId('dummy_'));
$subject->_set('localConfigurationFile', '../../typo3temp/var/tests/' . $this->getUniqueId('dummy_'));
$factoryConfigurationFile = 'typo3temp/var/tests/' . $this->getUniqueId('test_') . '.php';
$factoryConfigurationAbsoluteFile = Environment::getPublicPath() . '/' . $factoryConfigurationFile;
$factoryConfigurationFile = '../../typo3temp/var/tests/' . $this->getUniqueId('test_') . '.php';
$factoryConfigurationAbsoluteFile = Environment::getFrameworkBasePath() . '/' . $factoryConfigurationFile;
$uniqueContentString = $this->getUniqueId('string_');
$validFactoryConfigurationFileContent =
'<?php' . LF .
......@@ -521,10 +521,10 @@ class ConfigurationManagerTest extends UnitTestCase
{
/** @var $subject ConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface */
$subject = $this->getAccessibleMock(ConfigurationManager::class, ['writeLocalConfiguration']);
$subject->_set('localConfigurationFile', 'typo3temp/var/tests/' . $this->getUniqueId('dummy_'));
$subject->_set('localConfigurationFile', '../../typo3temp/var/tests/' . $this->getUniqueId('dummy_'));
$factoryConfigurationFile = 'typo3temp/var/tests/' . $this->getUniqueId('test_') . '.php';
$factoryConfigurationAbsoluteFile = Environment::getPublicPath() . '/' . $factoryConfigurationFile;
$factoryConfigurationFile = '../../typo3temp/var/tests/' . $this->getUniqueId('test_') . '.php';
$factoryConfigurationAbsoluteFile = Environment::getFrameworkBasePath() . '/' . $factoryConfigurationFile;
$validFactoryConfigurationFileContent =
'<?php' . LF .
'return [];' . LF;
......
......@@ -58,7 +58,7 @@ class LocallangXmlParserTest extends UnitTestCase
protected static function getFixtureFilePath($filename)
{
// We have to take the whole relative path as otherwise this test fails on Windows systems
return Environment::getPublicPath() . '/typo3/sysext/core/Tests/Unit/Localization/Parser/Fixtures/' . $filename;
return Environment::getFrameworkBasePath() . '/core/Tests/Unit/Localization/Parser/Fixtures/' . $filename;
}
/**
......
......@@ -39,7 +39,7 @@ class XliffParserTest extends UnitTestCase
protected function setUp()
{
// We have to take the whole relative path as otherwise this test fails on Windows systems
$fixturePath = Environment::getPublicPath() . '/typo3/sysext/core/Tests/Unit/Localization/Parser/Fixtures/';
$fixturePath = Environment::getFrameworkBasePath() . '/core/Tests/Unit/Localization/Parser/Fixtures/';
$this->xliffFileNames = [
'locallang' => $fixturePath . 'locallang.xlf',
'locallang_override' => $fixturePath . 'locallang_override.xlf',
......
......@@ -2736,8 +2736,8 @@ class GeneralUtilityTest extends UnitTestCase
'"/dummy/path/" was not within directory Environment::getPublicPath() + "/typo3temp/"'
],
[
Environment::getPublicPath() . '/typo3conf/path',
'"' . Environment::getPublicPath() . '/typo3conf/" was not within directory Environment::getPublicPath() + "/typo3temp/"',
Environment::getLegacyConfigPath() . '/path',
'"' . Environment::getLegacyConfigPath() . '/" was not within directory Environment::getPublicPath() + "/typo3temp/"',
],
[
Environment::getPublicPath() . '/typo3temp/táylor/swíft',
......@@ -3835,12 +3835,12 @@ class GeneralUtilityTest extends UnitTestCase
Environment::getPublicPath() . '/fileadmin/foo.txt'
],
'Public web path . typo3/sysext/core/Resources/Public/Icons/Extension.png' => [
Environment::getPublicPath() . '/typo3/sysext/core/Resources/Public/Icons/Extension.png',
Environment::getPublicPath() . '/typo3/sysext/core/Resources/Public/Icons/Extension.png'
Environment::getFrameworkBasePath() . '/core/Resources/Public/Icons/Extension.png',
Environment::getFrameworkBasePath() . '/core/Resources/Public/Icons/Extension.png'
],
'EXT:foo/Resources/Public/Icons/Extension.png' => [
'EXT:foo/Resources/Public/Icons/Extension.png',
Environment::getPublicPath() . '/typo3/sysext/foo/Resources/Public/Icons/Extension.png'
Environment::getFrameworkBasePath() . '/foo/Resources/Public/Icons/Extension.png'
]
];
}
......
......@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Debug;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Utility\PathUtility;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
......@@ -105,8 +106,16 @@ class RenderViewHelper extends AbstractViewHelper
$debugInfo = [];
if (isset($this->arguments['partial'])) {
$path = $this->renderingContext->getTemplatePaths()->getPartialPathAndFilename($partial);
$path = str_replace(
[
Environment::getBackendPath() . '/ext/',
Environment::getExtensionsPath() . '/',
Environment::getFrameworkBasePath() . '/'
],
'EXT:',
$path
);
$path = PathUtility::stripPathSitePrefix($path);
$path = str_replace(['typo3conf/ext/', 'typo3/sysext/'], 'EXT:', $path);
$debugInfo['Partial'] = 'Partial: ' . $path;
}
if (isset($this->arguments['section'])) {
......
......@@ -4182,15 +4182,15 @@ class TypoScriptFrontendController implements LoggerAwareInterface
}
$search = [
'"typo3temp/',
'"typo3conf/ext/',
'"' . TYPO3_mainDir . 'ext/',
'"' . TYPO3_mainDir . 'sysext/'
'"' . PathUtility::stripPathSitePrefix(Environment::getExtensionsPath()) . '/',
'"' . PathUtility::stripPathSitePrefix(Environment::getBackendPath()) . '/ext/',
'"' . PathUtility::stripPathSitePrefix(Environment::getFrameworkBasePath()) . '/',
];
$replace = [
'"' . $this->absRefPrefix . 'typo3temp/',
'"' . $this->absRefPrefix . 'typo3conf/ext/',
'"' . $this->absRefPrefix . TYPO3_mainDir . 'ext/',
'"' . $this->absRefPrefix . TYPO3_mainDir . 'sysext/'
'"' . $this->absRefPrefix . PathUtility::stripPathSitePrefix(Environment::getExtensionsPath()) . '/',
'"' . $this->absRefPrefix . PathUtility::stripPathSitePrefix(Environment::getBackendPath()) . '/ext/',
'"' . $this->absRefPrefix . PathUtility::stripPathSitePrefix(Environment::getFrameworkBasePath()) . '/',
];
/** @var StorageRepository $storageRepository */
$storageRepository = GeneralUtility::makeInstance(StorageRepository::class);
......@@ -4417,7 +4417,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
} else {
$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
// This is a hack to work around ___FILE___ resolving symbolic links
$realWebPath = PathUtility::dirname(realpath(Environment::getPublicPath() . '/typo3')) . '/';
$realWebPath = PathUtility::dirname(realpath(Environment::getBackendPath())) . '/';
$file = $trace[0]['file'];
if (strpos($file, $realWebPath) === 0) {
$file = str_replace($realWebPath, '', $file);
......
......@@ -53,9 +53,9 @@ class FilePathSanitizer
$GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'],
'uploads/',
'typo3temp/',
TYPO3_mainDir . 'ext/',
TYPO3_mainDir . 'sysext/',
'typo3conf/ext/'
PathUtility::stripPathSitePrefix(Environment::getBackendPath()) . '/ext/',
PathUtility::stripPathSitePrefix(Environment::getFrameworkBasePath()) . '/',
PathUtility::stripPathSitePrefix(Environment::getExtensionsPath()) . '/',
];
if (!empty($GLOBALS['TYPO3_CONF_VARS']['FE']['addAllowedPaths'])) {
$paths = GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['FE']['addAllowedPaths'], true);
......
......@@ -180,7 +180,7 @@ class FluidTemplateContentObjectTest extends UnitTestCase
$this->standaloneView
->expects($this->any())
->method('setTemplatePathAndFilename')
->with(Environment::getPublicPath() . '/typo3/sysext/core/bar.html');
->with(Environment::getFrameworkBasePath() . '/core/bar.html');
$this->subject->render(['file' => 'EXT:core/bar.html']);
}
......
......@@ -157,7 +157,7 @@ class PagesAndTtContentWithImagesInEmptyDatabaseTest extends AbstractImportExpor
$subject->loadFile(
// Files are parallel to the fixture .xml file in a folder - impexp tests for /../ not allowed in path, so we set an absolute path here
Environment::getPublicPath() . '/typo3/sysext/impexp/Tests/Functional/Fixtures/XmlImports/pages-and-ttcontent-with-image-but-not-included.xml',
Environment::getFrameworkBasePath() . '/impexp/Tests/Functional/Fixtures/XmlImports/pages-and-ttcontent-with-image-but-not-included.xml',
1
);
$subject->importData(0);
......
......@@ -291,7 +291,7 @@ class EnvironmentController extends AbstractController
return $this->getImageTestResponse([
'fileExists' => $fileExists,
'outputFile' => $outputFile,
'referenceFile' => Environment::getPublicPath() . '/typo3/sysext/install/Resources/Public/Images/TestReference/Font.gif',
'referenceFile' => Environment::getFrameworkBasePath() . '/install/Resources/Public/Images/TestReference/Font.gif',
]);
}
......@@ -397,7 +397,7 @@ class EnvironmentController extends AbstractController
'status' => $messages,
'fileExists' => true,
'outputFile' => $imResult[3],
'referenceFile' => Environment::getPublicPath() . '/typo3/sysext/install/Resources/Public/Images/TestReference/Write-gif.gif',
'referenceFile' => Environment::getFrameworkBasePath() . '/install/Resources/Public/Images/TestReference/Write-gif.gif',
'command' => $imageProcessor->IM_commands,
];
} else {
......@@ -430,7 +430,7 @@ class EnvironmentController extends AbstractController
$result = [
'fileExists' => true,
'outputFile' => $imResult[3],
'referenceFile' => Environment::getPublicPath() . '/typo3/sysext/install/Resources/Public/Images/TestReference/Write-png.png',
'referenceFile' => Environment::getFrameworkBasePath() . '/install/Resources/Public/Images/TestReference/Write-png.png',
'command' => $imageProcessor->IM_commands,
];
} else {
......@@ -463,7 +463,7 @@ class EnvironmentController extends AbstractController
$result = [
'fileExists' => true,
'outputFile' => $imResult[3],
'referenceFile' => Environment::getPublicPath() . '/typo3/sysext/install/Resources/Public/Images/TestReference/Scale-gif.gif',
'referenceFile' => Environment::getFrameworkBasePath() . '/install/Resources/Public/Images/TestReference/Scale-gif.gif',
'command' => $imageProcessor->IM_commands,
];
} else {
......@@ -496,7 +496,7 @@ class EnvironmentController extends AbstractController
$result = [
'fileExists' => true,
'outputFile' => $imResult[3],
'referenceFile' => Environment::getPublicPath() . '/typo3/sysext/install/Resources/Public/Images/TestReference/Scale-png.png',
'referenceFile' => Environment::getFrameworkBasePath() . '/install/Resources/Public/Images/TestReference/Scale-png.png',
'command' => $imageProcessor->IM_commands,
];
} else {
......@@ -529,7 +529,7 @@ class EnvironmentController extends AbstractController
$result = [
'fileExists' => true,
'outputFile' => $imResult[3],
'referenceFile' => Environment::getPublicPath() . '/typo3/sysext/install/Resources/Public/Images/TestReference/Scale-jpg.jpg',
'referenceFile' => Environment::getFrameworkBasePath() . '/install/Resources/Public/Images/TestReference/Scale-jpg.jpg',
'command' => $imageProcessor->IM_commands,
];
} else {
......@@ -566,7 +566,7 @@ class EnvironmentController extends AbstractController
$result = [
'fileExists' => true,
'outputFile' => $imResult[3],
'referenceFile' => Environment::getPublicPath() . '/typo3/sysext/install/Resources/Public/Images/TestReference/Combine-1.jpg',
'referenceFile' => Environment::getFrameworkBasePath() . '/install/Resources/Public/Images/TestReference/Combine-1.jpg',
'command' => $imageProcessor->IM_commands,
];
} else {
......@@ -603,7 +603,7 @@ class EnvironmentController extends AbstractController
$result = [
'fileExists' => true,
'outputFile' => $imResult[3],
'referenceFile' => Environment::getPublicPath() . '/typo3/sysext/install/Resources/Public/Images/TestReference/Combine-2.jpg',
'referenceFile' => Environment::getFrameworkBasePath() . '/install/Resources/Public/Images/TestReference/Combine-2.jpg',
'command' => $imageProcessor->IM_commands,
];
} else {
......@@ -639,7 +639,7 @@ class EnvironmentController extends AbstractController
$result = [
'fileExists' => true,
'outputFile' => $imResult[3],
'referenceFile' => Environment::getPublicPath() . '/typo3/sysext/install/Resources/Public/Images/TestReference/Gdlib-simple.' . $gifOrPng,
'referenceFile' => Environment::getFrameworkBasePath() . '/install/Resources/Public/Images/TestReference/Gdlib-simple.' . $gifOrPng,
'command' => $imageProcessor->IM_commands,
];
return $this->getImageTestResponse($result);
......@@ -669,7 +669,7 @@ class EnvironmentController extends AbstractController
$result = [
'fileExists' => true,
'outputFile' => $imResult[3],
'referenceFile' => Environment::getPublicPath() . '/typo3/sysext/install/Resources/Public/Images/TestReference/Gdlib-box.' . $gifOrPng,
'referenceFile' => Environment::getFrameworkBasePath() . '/install/Resources/Public/Images/TestReference/Gdlib-box.' . $gifOrPng,
'command' => $imageProcessor->IM_commands,
];
return $this->getImageTestResponse($result);
......@@ -706,7 +706,7 @@ class EnvironmentController extends AbstractController
$result = [
'fileExists' => true,
'outputFile' => $imResult[3],
'referenceFile' => Environment::getPublicPath() . '/typo3/sysext/install/Resources/Public/Images/TestReference/Gdlib-text.' . $gifOrPng,
'referenceFile' => Environment::getFrameworkBasePath() . '/install/Resources/Public/Images/TestReference/Gdlib-text.' . $gifOrPng,
'command' => $imageProcessor->IM_commands,
];
return $this->getImageTestResponse($result);
......@@ -753,7 +753,7 @@ class EnvironmentController extends AbstractController
$result = [
'fileExists' => true,