Project

General

Profile

Actions

Feature #89410

closed

Placeholders for YAML import statement

Added by Grigory Rechkin about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2019-10-14
Due date:
% Done:

0%

Estimated time:
PHP Version:
7.3
Tags:
Complexity:
Sprint Focus:

Description

Regarding this concept:
https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/SiteHandling/UsingEnvVars.html
https://github.com/TYPO3/TYPO3.CMS/blob/9.5/typo3/sysext/core/Classes/Configuration/Loader/YamlFileLoader.php

It seems not possible to use an environment variable in an imports block.

Description:
The main idea that installing TYPO3 via composer creates "public" folder (that should be an entry point for a web server) and "config" folder (with sites yaml configuration) on the same level. Import starts search from a server root directory so I can't get into that config folder by relative path. Using something like env(TYPO3_PATH_APP)/config/includes/<filename.yaml> should do the trick but it is not replaced by the environment variable in the import block as in the other places.

Solution:
Swap the order of processPlaceholders (first) and processImports (second) in the load function so it will replace before import. Since processImports calls the same load function and processes the placeholders in the including file it will also prevent the second placeholder convert on the same content.

Impact:
Current configurations should work as is, imports block should support placeholders/environment variables


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #89398: YAML import missing support for environment variables placeholdersClosed2019-10-11

Actions
Actions

Also available in: Atom PDF