Project

General

Profile

Actions

Feature #95307

closed

Allow glob imports in site configuration yaml files

Added by Simon Schaufelberger about 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Start date:
2021-09-21
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
On Location Sprint

Description

I have several websites in one installation which share all the same routes so I extracted them into a separate yaml file like this:

imports:
  - { resource: '../../shared/Index.yaml' }

base: 'https://www.example.de/'
#...

The Index.yaml file currently looks like this:

imports:
  - { resource: 'routeEnhancers/Plugin1.yaml' }
  - { resource: 'routeEnhancers/Plugin2.yaml' }
  - { resource: 'routeEnhancers/Plugin3.yaml' }
  - { resource: 'routeEnhancers/FeLogin.yaml' }
  - { resource: 'routeEnhancers/FormFormframework.yml' }
  - { resource: 'routeEnhancers/PageTypeSuffix.yaml' }

but it would be great if i could reduce it to just 1 line:

imports:
  - { resource: 'routeEnhancers/*.yaml'}

I thought that the same yaml file importer like the one from symfony is in use but TYPO3 has it's own implementation. See https://symfony.com/blog/new-in-symfony-3-3-import-config-files-with-glob-patterns and typo3/sysext/core/Classes/Configuration/Loader/YamlFileLoader.php in comparison with vendor/symfony/dependency-injection/Loader/YamlFileLoader.php which i though is more or less the same but the code is very different.


Related issues 6 (0 open6 closed)

Related to TYPO3 Core - Feature #90267: Custom placeholder processing in site configClosed2020-01-31

Actions
Related to TYPO3 Core - Feature #78917: Integrate Element Browser for creating linksClosedFrans Saris2016-12-08

Actions
Related to TYPO3 Core - Feature #86409: Allow usage of env vars in site configurationClosed2018-09-27

Actions
Related to TYPO3 Core - Feature #88742: Allow relative paths in Yaml file importsClosedBenni Mack2019-07-13

Actions
Related to TYPO3 Core - Feature #93112: Import whole directories in sites yaml filesClosed2020-12-19

Actions
Related to TYPO3 Core - Feature #86803: Possibility to import other yaml files into a yaml site configurationClosed2018-10-30

Actions
Actions #1

Updated by Simon Schaufelberger about 3 years ago

  • Description updated (diff)
Actions #2

Updated by Simon Schaufelberger about 3 years ago

  • Related to Feature #90267: Custom placeholder processing in site config added
Actions #3

Updated by Simon Schaufelberger about 3 years ago

  • Related to Feature #78917: Integrate Element Browser for creating links added
Actions #4

Updated by Simon Schaufelberger about 3 years ago

  • Related to Feature #86409: Allow usage of env vars in site configuration added
Actions #5

Updated by Simon Schaufelberger about 3 years ago

  • Related to Feature #88742: Allow relative paths in Yaml file imports added
Actions #6

Updated by Oliver Hader about 2 years ago

  • Sprint Focus set to On Location Sprint
Actions #7

Updated by Benni Mack about 2 years ago

Looking at the example, a simple "*.yaml" does not cut it, as it would probably use sorting based on the filename (alphabetic), so your current order would not work properly as before when manually included?

Actions #8

Updated by Benni Mack about 2 years ago

  • Status changed from New to Needs Feedback
Actions #9

Updated by Simon Schaufelberger about 2 years ago

The order doesn't matter of course when glob imports are used. It should work just the same way as symfony does it here https://symfony.com/blog/new-in-symfony-3-3-import-config-files-with-glob-patterns

Actions #10

Updated by Susanne Moog about 2 years ago

  • Related to Feature #93112: Import whole directories in sites yaml files added
Actions #11

Updated by Susanne Moog about 2 years ago

  • Status changed from Needs Feedback to Closed

Glob syntax has been implemented to solve #93112, closing this issue here - see #93112.

Actions #12

Updated by Christian Kuhn almost 2 years ago

  • Related to Feature #86803: Possibility to import other yaml files into a yaml site configuration added
Actions

Also available in: Atom PDF