Project

General

Profile

Actions

Bug #89398

closed

YAML import missing support for environment variables placeholders

Added by Stig Nørgaard Færch over 4 years ago. Updated over 4 years ago.

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

100%

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

Description

The docs describe (https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/SiteHandling/UsingEnvVars.html) the possibility of using environment variables placeholders in YAML configuration files.
It works fine expect on imports definitions, as it is processed before the placeholders. On simple addition, would fix this though.

The use case for us, is that we set a custom environment variable CONFIG_KEY which will load a specific YAML file, depending on the value.

Index: staging3s/public/typo3/sysext/core/Classes/Configuration/Loader/YamlFileLoader.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- staging/public/typo3/sysext/core/Classes/Configuration/Loader/YamlFileLoader.php    (date 1570787062004)
+++ staging/public/typo3/sysext/core/Classes/Configuration/Loader/YamlFileLoader.php    (date 1570787062004)
@@ -112,6 +112,7 @@
     {
         if (isset($content['imports']) && is_array($content['imports'])) {
             foreach ($content['imports'] as $import) {
+                $import  = $this->processPlaceholders($import, $import);
                 $importedContent = $this->load($import['resource']);
                 // override the imported content with the one from the current file
                 $content = $this->merge($importedContent, $content);


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Feature #89410: Placeholders for YAML import statementClosed2019-10-14

Actions
Actions

Also available in: Atom PDF