Bug #89398
closedYAML import missing support for environment variables placeholders
100%
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);
Updated by Stig Nørgaard Færch about 5 years ago
- Category set to Site Handling, Site Sets & Routing
Updated by Stig Nørgaard Færch about 5 years ago
- Tracker changed from Bug to Feature
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.
Updated by Andreas Kienast about 5 years ago
I think "Bug" is fine since I'd expect this as well.
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.
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.
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
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
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
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
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
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
Updated by Andreas Fernandez almost 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ba50c94e87746fbcccf9f10e4e14f5de22fefba3.
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?
Updated by Benni Mack almost 5 years ago
- Status changed from Resolved to Closed
Updated by Susanne Moog almost 5 years ago
- Has duplicate Feature #89410: Placeholders for YAML import statement added