Bug #102993
closedCan not load YAML File contents in typical extension development setup
0%
Description
When developing your extension, you typically do the following:
composer.json
{
"config": {
"vendor-dir": ".Build/vendor",
"bin-dir": ".Build/bin"
},
"scripts": {
"post-autoload-dump": [
"cd .Build/vendor && mkdir -p my_vendor && rm -f my_vendor/my_package && ln -s ../../.. my_vendor/my_package && cd -; fi",
"mkdir -p .Build/config/system && cd .Build/config/system && ln -sf ../../../Resources/Private/Build/additional.php && cd -; fi"
]
},
"extra": {
"typo3/cms": {
"web-dir": ".Build/Web",
"cms-package-dir": "${vendor-dir}/typo3/cms",
"extension-key": "your_key"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^8.2",
"ext-SimpleXML": "*",
"ext-json": "*",
"typo3/minimal": "^12.4"
},
"require-dev": {
"typo3/testing-framework": "^7",
"typo3/cms-setup": "^12.4"
}
}
As well as defining the following Environment:
Assuming you have a docker environment with your files mounted on /app
TYPO3_PATH_APP=/app/.Build
However - when dealing with yaml files located inside your project directory structure - the Yaml File loader will not load its contents because its neither located in the `/app/.Build/Web`, nor in `/app/.Build`.
I dont know when/how the behaviour changed but i had no issues in V11 and V12 wont even boot up.
I cant find a working configuration and every workaround i come up with feels wrong.
May be related to #101911
Updated by Philipp Wrann 10 months ago
It seems there is a setting, that should be an option:
$GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath'] = '/app/';
That setting will be asserted by GeneralUtility::isAllowedAbsPath();
BUT it wont be asserted by the YamlFileLoader
I suspect this change to cause the problem:
https://github.com/TYPO3/typo3/commit/b221f6cc90937d2505740c70807f4f45da0bff85
Updated by Philipp Wrann 10 months ago · Edited
i created a merge request for the missing support of lockRootPath, a new issue has been opened here: #102995
Updated by Georg Ringer 6 months ago · Edited
- Status changed from New to Needs Feedback
hey! can we close this issue in favor of #102995?
Updated by Garvin Hicking 6 months ago
- Status changed from Needs Feedback to Closed
I would like to close this as Georg has suggested; the other issue has a patch attached and is linked with this issue. Also I pinged Oliver Hader again about this and see if we can get it under more review.