Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Ready for review Orphaned

92259[FEATURE] Add context-specific YAML loading for SiteSet settings

Timo Webler CR 0 V -1 Hard +543 −37 updated 02/27/26, 11:30

Commit message

SiteSet Settings allow to define values for extension-specific,
site-specific attributes (like storage PIDs, page UIDs,
template paths).

They have strong defaults and are meant as a reliable, central source
of truth.

However, in reality a site can have a context (Production, Staging,
Development, ...) which may require different values for
each setting in each context.

Often, the resulting resulting `config/sites/xxx/settings.yaml`
files are not kept in a project's version control and instead
are created environment/content-specific on each target
system.

This does not work in scenarios where "infrastructure-as-code"
maintenance is wanted. There, it is not convenient to have
"foreign" files live on systems that are beyond version control
and influence a site's behavior.

This feature patch approaches the problem with a solution
that allows to have context-specific values, but does not
break the aforementioned intentional conceptual gates:

* The most important idea is: If you use this `when@` syntax,
  your intention is to NOT have GUI-managed settings, but
  version-controlled ones. You are NOT forced to use `when@`
  syntax, it is an opt-in for scenarios where it is useful
  to manage infrastructure as code.
* On extension-level (think "sitepackage"), a bundled site set
  can now define content-specific variables. This can be
  done either inside the central YAML file like
  `EXT:my_extension/Configuration/Sets/MySet/settings.yaml`
  with a syntax like `when@<context>:` (see ChangeLog),
  or it can be done by specific file overlays like
  `EXT:my_extension/Configuration/Sets/MySet/<context>/settings.yaml`.
* A sitepackage can now contain and version-control the source of
  truth for all possible contexts of SiteSet settings, as long as
  the GUI is not used to create overriding global `config/sites/XXX/settings.yaml`
  values. That would take the highest instance priority.
* The central `config/sites/XXX/settings.yaml` site
  setting values work as before; they cannot be content-specific,
  no `when@` syntax is provided here.

Implementation details:

* Introduced `PROCESS_CONTEXT_SPECIFIC` flag in `YamlFileLoader` to
  resolve inline `when@<context>` blocks and merge context-specific
  override files based on `Environment::getContext()`.
* Implemented `processContextSpecific()` to apply the active context,
  remove remaining `when@…` blocks and load
  `<context>/<original-filename>.yml` overrides.
* Enabled the new flag for `YamlSetDefinitionProvider` (SiteSets in
  `EXT:my_extension/Configuration/Sets/MySet`).
* Added tests covering inline context blocks and context/subcontext
  override files.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 25
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/59/92259/25 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/59/92259/25 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V -1 Blocked
    • core-ci -1 CI

Issues 1

Files 15

Review log 6694

Show 4769 earlier messages
  1. Timo Webler uploaded patch set 1 01/07/26, 14:03

  2. core-ci voted on patch set 1 V -1 01/07/26, 14:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93059

  3. Timo Webler uploaded patch set 2 V -1 01/07/26, 14:42

  4. core-ci voted on patch set 2 V +1 01/07/26, 14:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93060

  5. Timo Webler uploaded patch set 3 V +1 01/07/26, 15:34

  6. Timo Webler updated the commit message in patch set 4 01/07/26, 15:37

  7. core-ci voted on patch set 3 V +1 01/07/26, 15:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93063

  8. core-ci voted on patch set 4 V +1 01/07/26, 15:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93064

  9. Timo Webler uploaded patch set 5 V +1 01/07/26, 15:55

  10. Timo Webler marked it ready for review 01/07/26, 15:56

  11. core-ci voted on patch set 5 V +1 01/07/26, 16:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93065

  12. Josef Glatz commented on patch set 6 V +1 01/07/26, 16:16

    Published edit on patch set 5.
  13. Josef Glatz commented on patch set 7 01/07/26, 16:16

    Published edit on patch set 6.
  14. Josef Glatz commented on patch set 8 01/07/26, 16:16

    Published edit on patch set 7.
  15. Georg Ringer commented on patch set 8 01/07/26, 16:20

    Feature-105819-AllowContextualConfigurationForSiteSettings.rst:26

    please provide working examples, thanks!
  16. core-ci voted on patch set 6 V +1 01/07/26, 16:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93066

  17. core-ci voted on patch set 7 V +1 01/07/26, 16:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93067

  18. core-ci voted on patch set 8 V +1 01/07/26, 16:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93068

  19. Timo Webler uploaded patch set 9 V +1 01/08/26, 09:20

  20. Timo Webler uploaded patch set 10 01/08/26, 09:22

  21. Timo Webler commented on patch set 10 01/08/26, 09:27

    Feature-105819-AllowContextualConfigurationForSiteSettings.rst:26 Reply

    Done
  22. core-ci voted on patch set 9 V +1 01/08/26, 09:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93099

  23. core-ci voted on patch set 10 V +1 01/08/26, 09:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93100

  24. Timo Webler uploaded patch set 11 V +1 01/08/26, 09:55

  25. core-ci voted on patch set 11 V +1 01/08/26, 10:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93101

  26. Simon Schaufelberger voted on patch set 11 CR +1 V +1 01/12/26, 20:34

  27. Guido Schmechel commented on patch set 11 01/29/26, 15:07

    Feature-105819-AllowContextualConfigurationForSiteSettings.rst:1

    14.2 folder :-)
  28. Timo Webler uploaded patch set 12 CR +1 V +1 01/29/26, 15:17

  29. Timo Webler commented on patch set 12 01/29/26, 15:20

    Feature-105819-AllowContextualConfigurationForSiteSettings.rst:1 Reply

    Done
  30. core-ci voted on patch set 12 V +1 01/29/26, 15:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94589

  31. Nikita Hovratov commented on patch set 12 01/29/26, 15:59

    I'm not sure if the YamlFileLoader is the correct place for this feature. It has now a dependency to the Environment of TYPO3, making it less generic. The environment should at least be provided from the outside. In general I do like the idea of separate YAML files per context more. This would allow to override settings on specific servers / environments, without having to put them into vcs and we could scope this feature for site settings only.
  32. Timo Webler commented on patch set 12 01/30/26, 10:24

    Reply

    This is the same approach used by Symfony. Take a look at https://github.com/symfony/dependency-injection/blob/7.3/Loader/YamlFileLoader.php#L119. Could you give me a hint on how to add the environment via dependency injection in TYPO3?
  33. Mathias Brodala commented on patch set 12 02/09/26, 08:13

    Feature-105819-AllowContextualConfigurationForSiteSettings.rst:43

    You should add at least one example with a subcontext. And mention if wildcards or similar are supported or not. Often the things not explicitly said matter a lot. ;-)
  34. Timo Webler uploaded patch set 13 V +1 02/09/26, 08:43

  35. Timo Webler commented on patch set 13 02/09/26, 08:45

    Feature-105819-AllowContextualConfigurationForSiteSettings.rst:43 Reply

    Done. I also added unit tests for the sub-context.
  36. core-ci voted on patch set 13 V -1 02/09/26, 08:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95446

  37. Timo Webler uploaded patch set 14 V -1 02/09/26, 08:57

  38. core-ci voted on patch set 14 V -1 02/09/26, 09:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95448

  39. Timo Webler rebased onto patch set 15 V -1 02/12/26, 09:52

  40. Timo Webler commented on patch set 15 02/12/26, 09:53

    Reply

    @nikita.h@live.de Do you have any feedback on my question?
  41. core-ci voted on patch set 15 V -1 02/12/26, 10:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95698

  42. Timo Webler uploaded patch set 16 V -1 02/13/26, 12:19

  43. Timo Webler commented on patch set 16 02/13/26, 12:21

    Reply

    I found a solution.
  44. core-ci voted on patch set 16 V +1 02/13/26, 12:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95827

  45. Josua Vogel voted on patch set 16 CR +1 02/13/26, 15:13

  46. Nikita Hovratov commented on patch set 16 02/13/26, 15:44

    Reply

    Thanks, that's much better!
  47. Garvin Hicking commented on patch set 16 02/13/26, 16:31

    I was not able to deduce this from reading and had no time to check it out, so honest question: What happens with the settings GUI. It interprets the value depending on current context I assume, but how will it indicate to the editor that the current value differs? And when using the GUI to save a new value, will it only update the current when@ context and leave the others intact? If this feature is only meant for people who edit the yaml file manually (and version it) then the GUI might better be locked to not edit these when@ settings? Also the GUI won't allow to insert/maintain the contexts, right?
  48. Anja Leichsenring commented on patch set 16 V -1 02/13/26, 19:57

    I tested around quite a bit, and Garvins concerns are realized: The GUI does not care at all about any overrides, '@when's or context depending file loading. So while the feature itself is nice, the GUI issue must be adressed somehow.
  49. Josua Vogel voted on patch set 16 CR 0 02/13/26, 20:44

  50. Timo Webler commented on patch set 16 02/16/26, 06:44

    Reply

    Yes, the site's context-specific configurations are visible in the GUI, but it is not possible to overwrite them there. I understand that this could cause problems. However, the issue #105819 only requested that this feature be implemented for SiteSets. I implemented it for all Sites because there was a similar ticket for it. #107814 If I remove this feature for Sites and leave it only for SiteSets, the GUI problem will be solved for now. A context-specific configuration can then be deployed via SiteSets using a site package. This means that the GUI remains unaffected and values can continue to be written via the TYPO3 backend. These values are written into the Site and not to the SiteSets. A solution to the GUI problem can then be developed in ticket #107814. @garvin@hick.ing @aleichsenring@ab-softlab.de: Is that ok for you, to remove this feature for Sites? I would be delighted if we could merge the feature before the freeze.
  51. Garvin Hicking commented on patch set 16 02/17/26, 13:16

    Reply

    At this time this is a bit hard for me to judge as I still haven't really wrapped my head around how the GUI could not be "left behind" in this. Can you describe more in depth what you mean with "and leave it only for SiteSets, the GUI problem will be solved for now", I don't fully understand that. So I need to spell this out for me, and maybe you can point out what I might get wrong. Use case: ~~~~~~~~~ A multi-site instance. Site A is comic-related. Associated domains: - "comics.example.com" (Production/Production context) - "staging.comics.example.com" (Production/Staging) - "testing.comics.example.com" (Production/Testing) - "comics.ddev.site" (Development/Development) local development Site B is politics-related. Associated domains: - "politics.example.com" (Production/Production context) - "staging.politics.example.com" (Production/Staging) - "testing.politics.example.com" (Production/Testing) - "politics.ddev.site" (Development/Development) local development So, two site configs. Both sites have baseVariants to match the context to the domains. Now want to have specific values for certain keys (rootPageId, websiteTitle) depending on the context. Also, both sites make use of EXT:seo and its site settings. The setting "seo.sitemap.view.templateRootPath" is different for each site, but should now also be different depending on each context. . Site Config config/sites/comics/config.yaml: ``` rootPageId: 1 when@Development/Development: rootPageId: 2 ``` This would have the following consequences: - When in Development context, in the TYPO3 backend rootPageId: 2 will be shown for the site config (and resolved). - When in Development context in the frontend, rootPageId: 2 will be used for `comics.ddev.site` - When entering the GUI site configuration to adjust the website title, I will only see rootPageId 2 filled in. As a maintainer I would see these issues: - I would not see that in other contexts, another root Page ID would be used (probably page IDs that are not set up in my instance) - When picking a different root page ID, what happens? The "rootPageId: 1" default will then be overwritten with my Development root page ID setting 2. Deploying the config would render the production site unusable then? - If I want to specify the different when@ settings, I would need to know that I could only do this with pure file editing, but the GUI does not hint me at this? - What happens if I use the `when@` syntax for the `dependencies` to Site Sets? Would it properly read (and cache) site set dependnecies for my site depending on the context? If I define a set of dependencies for Development context, and then enter the Site settings, would I only see the values for those sets, and what happens to site settings that are set for another set of dependencies? They will proably be persisted as "unknown" settings? . Site Settings A similar situation could come up when I want to define my different site-specific settings. So Site A should set Template A for the EXT:seo site setting (`seo.sitemap.view.templateRootPath`), and Site B should set Template B there. So far so good - now I'll do it with the `when@` syntax. Entering the GUI for Site Settings on Development context would then show these values. If I change that setting to Templates C, would it not alter the "default" setting (without "when@" prefix) in the site's settings.yaml file? And again I would not be able to see that Context "Production" has another template set than "Development" which I'm currently viewing. What I'm trying to say is that while I see the need for this feature, it really only seems to me to work if you are working totally on file-editing basis and do not use the GUI. Once you use the GUI, I see this falling apart for both Site Config and Site Settings. And I see potential problems with the dependency resolving and introducing variability for settings that were meant to be static (looking at rootPageId, base, baseVariants in config.yaml).
  52. Timo Webler commented on patch set 16 02/17/26, 13:56

    Reply

    Firstly, this feature only works with 'settings.yaml' and not 'config.yaml'. In my opinion, you should only use the file configuration or the GUI. If you use the file configuration, you can only view the configuration for the current instance. However, if we remove the feature from 'site/x/settings.yaml' and only allow it for 'EXT:my_extension/Configuration/Sets/x/settings.yaml', the editor will work as before.
  53. Garvin Hicking commented on patch set 16 02/17/26, 14:07

    Reply

    Ah, thanks for clarifying! It's a bit hard for me still to judge scope and impact and I don't feel authoritative enough for this myself - but: Having this only work for EXT:... type imports I see now that this would be beyond the scope of the GUI and only be "merged" and thus be file-based. I think that would make it far less dangerous, and still be powerful enough for the skilled developer to utilize it. Your current changelog already has a few restrictions listed, so we could add that statement there, and mention that this is a conscious restriction.
  54. Anja Leichsenring commented on patch set 16 V 0 02/17/26, 14:31

    please make very clear what this means for people using the GUI with context specific parts being present. I won't block this, but I am very concerned. This will lead to bug reports and frustration if not handled with utmost care.
  55. Timo Webler uploaded patch set 17 V +1 02/18/26, 06:59

  56. core-ci voted on patch set 17 V -1 02/18/26, 07:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96100

  57. core-ci commented on patch set 17 02/18/26, 07:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96100

  58. Timo Webler rebased onto patch set 18 V -1 02/18/26, 09:52

  59. core-ci voted on patch set 18 V +1 02/18/26, 10:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96114

  60. Garvin Hicking commented on patch set 18 02/18/26, 16:39

    I get problems if I mix the syntax of "linear" and "array" specifications, like this: ``` camino.garvin4: 'garvin6a' when@Development: camino: garvin4: 'garvin7b' ``` This would not override the key "garvin4" with value "garvin7b", but instead retain "garvin6a". Only with this syntax: ``` camino: garvin4: 'garvin6a' when@Development: camino: garvin4: 'garvin7b' ``` it would be compatible, or this: ``` camino.garvin4: 'garvin6a' when@Development: camino.garvin4: 'garvin7b' ``` However, I think it needs to take both cases into consideration.

    YamlFileLoader.php:307

    typo, "applicationContext"

    YamlFileLoader.php:327

    ```suggestion // remove recursive load of context specific files and allow non existing or empty files ```
  61. Garvin Hicking commented on patch set 18 02/18/26, 16:56

    Reply

    Another thing: If I remove a definition from `settings.definitions.yaml` (to prevent the GUI setting showing up, and to be able to maintain definitions without them getting persisted to `config/sites/xxx/settings.yaml`) then the whole config loading does not seem to work. The keys just disappear from the configuration output array. So I currently would be required to have the keys show up in the GUI and saving the values while my "Development" context is active, would persist that setting to EVERY context (if my settings.yaml is version controlled). What would be your expectation / point of view here? I guess it would need documentation that in this case one should not put settings.yaml under version control....? This gets back to my initial point, if we need to modify the SiteSet Configuration GUI and remove the ability to alter any keys to which a `when@` definition was made. Or at least give an indicator there for people to recognize "Warning: If I make a change here, this will apply to every context, and bypass any context-specific values you currently seem to have configured". Adding that is of course a bit more complex and invasive, and also a bit of "defeating" the GUI.
  62. Timo Webler commented on patch set 18 02/19/26, 07:16

    Reply

    > I get problems if I mix the syntax of "linear" and "array" This patch only merges arrays. The same merge is also used for importing files. I did not change that. So I don't think this should be part of this change. --- > Another thing: If I remove a definition from settings.definitions.yaml (to prevent the GUI setting showing up, and to be able to maintain definitions without them getting persisted to I didn't change anything in the configuration handling process. The configuration process was completed after the YAML configuration had been loaded. However, in my tests, the values were loaded without a definition in `settings.definitions.yaml`. Could there be some caching issues? > So I currently would be required to have the keys show up in the GUI and saving > the values while my "Development" context is active, would persist that setting > to EVERY context (if my settings.yaml is version controlled). If you save the value within the editor, that value is used. This is because the editor saves the values to `config/sites/xxx/settings.yaml`, and these values are loaded after the settings within the SiteSets. > What would be your expectation / point of view here? I guess it would need documentation that in this case one should not put settings.yaml under version control....? Why shouldn't we put settings.yaml under version control? This is a use case decision. If you want to use the editor in your setup, you should not add the file to version control. If you add the file to version control, you should not use the editor. > This gets back to my initial point, if we need to modify the SiteSet Configuration GUI and remove the ability to alter any keys to which a `when@` definition was made. I don't think this is necessary. You should not mix the two. With the last change, the editor always wins on the current instance. This behaviour has not changed. And if you use the editor on the instance, you want to change the value of the current instance. The other context configuration does not matter here for the current user. As I mentioned earlier, however, I wouldn't recommend combining these two configuration behaviours. I don't think it's possible to implement a GUI that is 100% foolproof for this purpose. This is because the editor is unaware of the existence of a context-specific configuration. In order to parse this information for the editor, a second logic is required to determine the context configuration. This is not just the `when@` logic. You also need to check for additional files.
  63. Timo Webler uploaded patch set 19 V +1 02/19/26, 07:18

  64. core-ci voted on patch set 19 V +1 02/19/26, 07:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96215

  65. Garvin Hicking commented on patch set 19 02/19/26, 10:10

    Reply

    I understand your reasoning, but I am a bit unsure how "we" communicate this to the users/integrators. I see this causing confusion. But let me think a bit about this. I'd also really love some more feedback from others how they view this.

    YamlFileLoader.php:307 Reply

    Done

    YamlFileLoader.php:327 Reply

    Done
  66. Timo Webler uploaded patch set 20 V +1 02/20/26, 07:02

  67. core-ci voted on patch set 20 V -1 02/20/26, 07:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96304

  68. Timo Webler uploaded patch set 21 V -1 02/20/26, 07:22

  69. core-ci voted on patch set 21 V -1 02/20/26, 07:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96306

  1. core-ci commented on patch set 21 02/20/26, 07:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96306

  2. core-ci commented on patch set 21 02/20/26, 07:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96306

  3. Timo Webler rebased onto patch set 22 V -1 02/20/26, 07:57

  4. core-ci voted on patch set 22 V -1 02/20/26, 08:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96310

  5. Timo Webler rebased onto patch set 23 V -1 02/20/26, 10:36

  6. core-ci voted on patch set 23 V +1 02/20/26, 10:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96334

  7. Garvin Hicking commented on patch set 23 CR +1 V +1 02/20/26, 12:50

    Reply

    Acknowledged
    OK so here are my thoughts on this and why I feel okay with voting on it: * I recognize this has edge cases and needs to be properly reflected if and how to be utilized. * It being an opt-in, operating on a very specific set of syntax (that is known in the Symfony world) feels like not breaking down barriers "too much". * I can see that people want to have their context-specific settings in one central source of truth, and this can help them achieve that. * The documentation is straight enough about the implications and caveats and reasoning. * If utilizing this feature gains traction and people want to tighten the GUI aspects around that, we could iterate on it.
  8. Garvin Hicking commented on patch set 23 02/20/26, 12:51

    Reply

    Done

    Reply

    Done
  9. Simon Schaufelberger voted on patch set 23 CR +1 02/20/26, 22:36

  10. Stefan Froemken commented on patch set 23 02/21/26, 22:44

    Feature-105819-AllowContextualConfigurationForSiteSetSettings.rst:16

    "provide" is wrong here. A settings definition can provide the configuration. With a setting you only can override the provided default

    Feature-105819-AllowContextualConfigurationForSiteSetSettings.rst:39

    No. An extension provides SiteSet Settings via settings.definitions.yaml. Please try adding "sf.invalid: 'Na Na'" in a settings.yaml WITHOUT a definition for that settings. This setting will NOT be rendered in Site Settings module.

    Feature-105819-AllowContextualConfigurationForSiteSetSettings.rst:65

    I have added a Development/DEV-1/settings.definitions.yaml file with content: settings: sf.test: category: site_package type: string default: 'DEFINITION DEVELOPMENT/DEV-1' The default of this context will not be taken. It still uses the default of the original settings.definitions.yaml
  11. Timo Webler rebased onto patch set 24 CR +1 V +1 02/23/26, 13:20

  12. Timo Webler uploaded patch set 25 02/23/26, 13:23

  13. Timo Webler commented on patch set 25 02/23/26, 13:26

    Feature-105819-AllowContextualConfigurationForSiteSetSettings.rst:16 Reply

    Done

    Feature-105819-AllowContextualConfigurationForSiteSetSettings.rst:39 Reply

    What needs to be updated here? The 'settings.definitions.yaml' file has not been updated at all.

    Feature-105819-AllowContextualConfigurationForSiteSetSettings.rst:65 Reply

    Yes, because only the 'settings.yaml' file has activated this feature. I have added more information about this to the changelog.
  14. core-ci voted on patch set 25 V -1 02/23/26, 13:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96578

  15. core-ci voted on patch set 24 V +1 02/23/26, 13:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96577

  16. Garvin Hicking commented on patch set 25 CR +1 V +1 02/23/26, 14:51

    Feature-105819-AllowContextualConfigurationForSiteSetSettings.rst:39 Reply

    Thanks, I believe your changelog enhancement now covers this.
  17. Benjamin Franzke commented on patch set 25 02/23/26, 19:33

    Feature-105819-AllowContextualConfigurationForSiteSetSettings.rst:54

    I do not understand this justification. Environment variables can be used in `config/sites/xxx/settings.yaml`, that means any environment specific configuration value can be applied here and it is perfectly fine to store `config/sites/xxx/settings.yaml` in version control – it is actually desired(!) Sets from extensions are on the other hand explicitly designed to be immutable and static, to ensure that when you *load* a set, you *get* exactly that set. Introducing environment support, will lead to situation, where sets are loaded in development, but behave completely different in production. This is against the design of reliable shared components. Maybe we need to introduce a concept of "final" sets, that are extendable, that means they are not usable as dependencies to other sets and therefore could be allowed to contain such environment specific code, which is currently only allowed in :file:`config/sites/xxx/settings.yaml` But then again, the question remains, why not ship `:file:`config/sites/xxx/settings.yaml` in version control?
  18. Timo Webler commented on patch set 25 02/24/26, 07:30

    Feature-105819-AllowContextualConfigurationForSiteSetSettings.rst:54 Reply

    This section does not imply that the config/sites/xxx/settings.yaml file should generally be excluded from version control; it should only be excluded when data is saved using an editor. In that case, there are two versions: one in version control and one on the system. A lot of context has been added here for @garvin@hick.ing. However, there is now some confusion. It is not possible for me to satisfy all opinions at the same time. I am happy to adjust the text, but I need to know how.
  19. Garvin Hicking commented on patch set 25 CR 0 V 0 02/24/26, 08:32

    Feature-105819-AllowContextualConfigurationForSiteSetSettings.rst:54 Reply

    TL;DR: I think I agree we likely need to addres the "GUI lockdown" for settings.yaml and make it available only for the central config/sites/xxx/settings.yaml, but not for extensions. My reasoning here was this: We cannot (=should not) add the "when@" logic to the core config/sites/xxx/settings.yaml. Because that file is managed by the GUI. And the GUI cannot handle this "when@logic" with this version of the patch. That was my understanding and why we did not utilize it for the central site/config/ file. But my understanding also was that we DO allow it for a "sitepackage"-like extension. I do understand Benjamins feedback however, because I only thought about "sitepackage" extensions it is a problem that "regular" extensions could now also utilize this. And we have no way to distinguish a "project specific sitepackage" and "a regular extension". Benjamins idea to make this kind of "locked" set (that is only available for file-based editing) is the best way out of this, but would of course enlarge the scope of this patch.
  20. Timo Webler commented on patch set 25 02/25/26, 07:10

    Feature-105819-AllowContextualConfigurationForSiteSetSettings.rst:54 Reply

    I find that really frustrating. I partly understand why this should not be activated for site settings. But it should not be activated for site settings (config/sites/xxx/settings.yaml) either. Because the GUI has no information about that. However, as @ben@bnf.dev wrote, you can currently use an environment variable here. This is not reflected in the GUI either. If you change a value in the editor, the environment placeholder is removed. Putting everything in an environment variable is not really a solution to this problem. Why are placeholders OK for config/sites/xxx/settings.yaml, but environment overrides are not? If the TYPO3 team decide not to implement this, then please give me a clear indication. I don't want to invest time here if this is not going to be part of the core.
  21. Garvin Hicking commented on patch set 25 02/26/26, 13:45

    Feature-105819-AllowContextualConfigurationForSiteSetSettings.rst:54 Reply Unresolved

    I understand your frustration (as said via DM), but also I'm just only one voice and I cannot offer a "this is how it must be done" way for this. I have asked the other core mergers for feedback on this. This is also a structural problem that we face and need to work on. You may want to talk about frustrations like this to the Association Board. As they are the caretakers of our governance process and restructurization, your feedback may be valuable in shaping the future of contributions.
  22. Stefan Froemken commented on patch set 25 02/27/26, 08:32

    Hello everyone, First of all, this is a really great feature and it definitely should make it into TYPO3 14.3. I have already tested it locally, and it works perfectly! Regarding the recent comments, Benjamin came up with the idea of adding something like "final". It took me a little while to fully grasp what he meant by that. To provide some context on the matter: The settings.yaml in the config folder acts as a baseline and can always be overwritten by various other configurations. Since TYPO3 13.4 introduced SiteSets, TYPO3 extensions that act as SitePackages have become incredibly powerful. It is exactly here, in these SitePackages, where we as a community strongly desire the additional ability to use environment variables. However, there is a significant problem with the current state of this patch: It also allows the use of environment variables in other TYPO3 extensions with SiteSets that do NOT act as SitePackages. Under no circumstances should $_ENV and similar variables be allowed in regular extensions. Just imagine a scenario where you install 25 TYPO3 extensions, and 3 of them happen to require the exact same environment variable for 3 completely different purposes. It would result in a complete mess and unpredictable behavior. We should find a way to restrict this to prevent such conflicts. Thank you for your hard work on this patch!
  23. Garvin Hicking commented on patch set 25 02/27/26, 09:11

    Reply

    This could mean we would first need to tackle a change in our composer.json's: ``` "type": "typo3-cms-framework", # core extensions "type": "typo3-cms-extension", # public extensions "type": "typo3-cms-sitepackage", # a sitepackage "type": "typo3-cms-project", # a root project ``` so that a patch like this could build upon it. We could introduce a temporary hack to indicate a sitepackage with the presence of a specific file or directory structure, but since that would then be needed to utilize this patch, the hack would be locking us down pretty much for a "proper" implementation. The change above would be quite impactful for our ecosystem of the `typo3/cms-composer-installers` package. I vaguely remember Helmut Hummel and Benjamin already discussed some kind of `app` project package and scoping already, but would have to dive deeper.
  24. Timo Webler commented on patch set 25 02/27/26, 11:20

    Reply

    Thank you for the good feedback. > However, there is a significant problem with the current state of this patch: It also allows the use of environment variables in other TYPO3 extensions with SiteSets that do NOT act as SitePackages. Under no circumstances should $_ENV and similar variables be allowed in regular extensions. This is incorrect. This patch allows different configuration values for each application context. Environment variable not allowed at site sets. This patch does not change this. Environment variables are allowed at the site level (config/sites/xxx/settings.yaml).
  25. Timo Webler commented on patch set 25 02/27/26, 11:30

    Reply Unresolved

    OK, is there anything I can do here? If the architectural decision is to make site sets immutable, that's fine by me. However, we need the ability to change values for an application context. Using environment variables in config/sites/xxx/settings.yaml alone is not enough. There were some solutions for that. - Wait for non-immutable site sets. - I do not know how long this will take to develop. - Allow context-specific configuration on config/sites/xxx/settings.yaml, rather than on EXT:my_extension/Configuration/Sets/SomeSet/settings.yaml. - There is a problem with the editor. This is described here: https://review.typo3.org/c/Packages/TYPO3.CMS/+/92259/comments/fa76f9b6_b531c59c - In my personal opinion, this is not really a problem. If you manually edit the file to add context-specific configuration, you should be aware of this. - Add an event to YamlLoader or Site Settings. - Each developer can add their own behaviour.