Project

General

Profile

Actions

Bug #89398

closed

YAML import missing support for environment variables placeholders

Added by Stig Nørgaard Færch 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-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 #1

Updated by Stig Nørgaard Færch about 5 years ago

  • Description updated (diff)
Actions #2

Updated by Stig Nørgaard Færch about 5 years ago

  • Category set to Site Handling, Site Sets & Routing
Actions #3

Updated by Stig Nørgaard Færch about 5 years ago

  • Tracker changed from Bug to Feature
Actions #4

Updated by Stig Nørgaard Færch about 5 years ago

Changed form bug to feature. But actually I'm now not sure which it should be, as the docs does not describe that it should not work on import definitions.

Actions #5

Updated by Andreas Kienast about 5 years ago

I think "Bug" is fine since I'd expect this as well.

Actions #6

Updated by Stig Nørgaard Færch about 5 years ago

  • Tracker changed from Feature to Bug
  • TYPO3 Version set to 9

Changing back to bug from feature.

Actions #7

Updated by Stig Nørgaard Færch about 5 years ago

Andreas Fernandez wrote:

I think "Bug" is fine since I'd expect this as well.

I would like to know from some core team member, if this something that I can expect being fixed at some point for 9LTS?
If yes, I will patch for now. If not, I need to find some other (probably not as nice) solution.

Actions #8

Updated by Gerrit Code Review about 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61955

Actions #9

Updated by Gerrit Code Review about 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61955

Actions #10

Updated by Gerrit Code Review about 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61955

Actions #11

Updated by Gerrit Code Review about 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61955

Actions #12

Updated by Gerrit Code Review about 5 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61955

Actions #13

Updated by Gerrit Code Review almost 5 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61955

Actions #14

Updated by Andreas Fernandez almost 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #15

Updated by Stig Nørgaard Færch almost 5 years ago

Andreas Fernandez wrote:

Applied in changeset ba50c94e87746fbcccf9f10e4e14f5de22fefba3.

I can see that this has been fixed for CMS 10, but not CMS 9. Will this not be applied for CMS 9 as well?

Actions #16

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions #17

Updated by Susanne Moog almost 5 years ago

  • Has duplicate Feature #89410: Placeholders for YAML import statement added
Actions

Also available in: Atom PDF