Project

General

Profile

Actions

Bug #102993

open

Can not load YAML File contents in typical extension development setup

Added by Philipp Wrann 3 months ago. Updated 3 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-01-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

Actions #1

Updated by Philipp Wrann 3 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

Actions #2

Updated by Philipp Wrann 3 months ago ยท Edited

i created a merge request for the missing support of lockRootPath, a new issue has been opened here: #102995

Actions

Also available in: Atom PDF