Issue Bug Closed

#102993Can not load YAML File contents in typical extension development setup

Philipp Wrann 01/30/24, 10:10 updated 06/13/24, 15:00

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

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 4

  1. Philipp Wrann commented 01/30/24, 10:26

    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

  2. Philipp Wrann commented 01/30/24, 14:09

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

  3. Georg Ringer commented and changed status New Needs Feedback 06/12/24, 04:49

    hey! can we close this issue in favor of #102995?

  4. Garvin Hicking commented and changed status Needs Feedback Closed 06/13/24, 15:00

    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.