86851[FEATURE] Read configuration from environment name based folders
Commit message
Review
-
Code review CR -1
- Garvin Hicking -1
- Benni Mack -1
-
Verified V 0
- core-ci +1 CI
Issues 1
Files 2
Review log 2029
Show 34 earlier messages
-
Marcin Sągol uploaded patch set 1 10/31/24, 22:58
-
Marcin Sągol updated the commit message in patch set 2 10/31/24, 23:03
-
Marcin Sągol updated the commit message in patch set 3 10/31/24, 23:05
-
core-ci voted on patch set 1 V -1 10/31/24, 23:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68939
-
core-ci voted on patch set 2 V -1 10/31/24, 23:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68940
-
core-ci voted on patch set 3 V -1 10/31/24, 23:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68941
-
Marcin Sągol updated the commit message in patch set 4
V -110/31/24, 23:52 -
core-ci voted on patch set 4 V -1 11/01/24, 00:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68942
-
Mathias Brodala commented on patch set 4 11/01/24, 07:28
I'd argue that this should stay the last file which is loaded, given its nature. Especially since "settings.php" and the now newly introduced env-settings are expected to return an configuration array whereas "additional.php" is just loaded and can do anything it likes, including reading of the already loaded configuration. -
Mathias Brodala commented on patch set 4 11/01/24, 07:36
I also wonder if the fileMaybe also support a "production.php" and similar for simplicity? This way one doesn't necessarily need to provide multiple files for things. -
Marcin Sągol commented on patch set 4 11/01/24, 17:20
Reply Unresolved
As i mentioned on slack, this approach is similar to what Neos does. I have some experiance there using multiple settings files per environment and they work great. You can easily separate for example caches configuration, database, per extension settings etc. If we force 1 file only, it might contain a lot of data in some scenarios. If we document well this feature, I am prerry sure developers will see benefits from having large configs splitted into a smaller chunks - they can easily find what they are looking for.Reply Unresolved
I think it could stay for some time as most of the procject - I am prerry sure - uses it right now. We should make developers familiar with the new proposed approach and then think about deprecating the `additional.php` file. I am also using the `require()` function on the env-settings files, so no, they do not return an array but can do much more stuff, just add, overwrite or extend some settings. -
Benni Mack commented on patch set 4 11/01/24, 22:18
please have a look at b13/typo3-config https://github.com/b13/typo3-config/blob/main/src/Config.php#L106-L135 which does this in a less "massive" way -
Marcin Sągol rebased onto patch set 5
V -111/02/24, 23:19 -
Marcin Sągol commented on patch set 4 11/02/24, 23:22
Reply
I see, byt it does not allow to split the configuration into multiple files. Well you can probably include more files into those defined by context, but still it is not something standarized. My proposition is to make it more flexible, standarized, and allow to organize the configuration into more files, dedicated to given configuration type. -
core-ci voted on patch set 5 V -1 11/02/24, 23:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68983
-
Marcin Sągol uploaded patch set 6
V -111/07/24, 17:55 -
core-ci voted on patch set 6 V +1 11/07/24, 18:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69199
-
Marcin Sągol uploaded patch set 7
V +111/07/24, 19:03 -
Marcin Sągol updated the commit message in patch set 8 11/07/24, 19:04
-
Marcin Sągol uploaded patch set 9 11/07/24, 19:08
-
core-ci voted on patch set 7 V +1 11/07/24, 19:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69201
-
core-ci voted on patch set 8 V +1 11/07/24, 19:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69202
-
core-ci voted on patch set 9 V +1 11/07/24, 19:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69203
-
Benni Mack commented on patch set 9 CR -1 04/11/25, 20:46
Reply
I still do not understand how the configuration type is standardized? It is not enforced in the current state. You can even see this in the RST, where one time the settings file is called "caching.php" and the other is called "caches.php". The split in multiple files seems to be a lot of overhead. AFAICS this also means that if I have shared configuration for all my production nodes, I need to replicate this? Example: I do have "Production/Live/Node01", "Production/Live/Node02" etc. But I need to configure something that is the same for all "Production/*" OR just for all "Production/Live*" environments. -
Marcin Sągol commented on patch set 9 07/02/25, 16:01
Reply
Hi @benni@typo3.org, The goal here is to standardize how users include/load configuration per different environment. So instead of doing some includes in `additional.php` file or some other custom approaches, we now offer them an option supported in the core - put the configuration related to the given environment into subfolders following the environment name. Some more examples: 1: I want to have some shared configuration for all my production (both the staging and prod) I put my config files into: {config path}/system/settings/production/ 2: I want to add/extend some configuration only for the staging environment I put my config files into: {config path}/system/settings/production/staging/ 3: For the production environment (both the staging and prod), I want to add a different config for 3 separate nodes I put my config files into: - {config path}/system/settings/production/node1/ - {config path}/system/settings/production/node2/ - {config path}/system/settings/production/node3/ 4: For Node 4, but only on the live instance, I need some custom config I put my config files into: {config path}/system/settings/production/live/node4 In general, we are going (reading configuration) from the left side to the right side based on the defined TYPO3 context. -
Benni Mack commented on patch set 9 07/24/25, 09:04
Reply
Yes. I meant the "caching.php" vs. "caches.php". and how this is separated. -
Marcin Sągol commented on patch set 9 07/24/25, 21:36
Reply Unresolved
@benni@typo3.org the standarization relates to folders/config file structure only. The docs will contain recommendation how to name the files like `caches.php`, `api.php`, but will not force users to always use the same file names - it is up to them what works best for them in this area. -
Garvin Hicking commented on patch set 9 CR -1 02/20/26, 12:36
My feeling is that the 'additional.php' layer that TYPO3 offers already provides all the flexibility that developers/integrators need to build their favoroute system on top of this. IMO we should not be more oppinionated about this and leave the details up to "consumers". I hope it's fine with you that we abandon this patch for now to perform house-cleaning before the v14 feature freeze. Please get in touch if you feel differently. -
Garvin Hicking abandoned the change 02/20/26, 12:36