Feature #83819
closed
New ExtensionConfiguration: Option to set values transiently - only for current request
Added by Andreas Allacher almost 7 years ago.
Updated over 4 years ago.
Category:
System/Bootstrap/Configuration
Description
If I use the API to change values via PHP, I might not want to write those settings back to LocalConfiguration but instead just use them for the current request,
e.g. providing settings for third party extensions via AdditionalConfiguration.php so all necessary values are set after a deployment without user interaction.
Of course, one could set the values during deployment using a separate task to provide default values but admin backend users could then override those values without sourcecode changes (might not find their way back to the sourcecode and might be lost with another deployment).
- Status changed from New to Needs Feedback
Managing 'fluent' values is not what the extension configuration api is thought for. set() (which is marked as @internal anyway) shouldn't especially be used at runtime for instance in ext_* files.
To manage differences between dev/stage/production, a good .env implementation would probably be a much better choice. What do you think, Andreas?
So your idea would be to have something like this:
typo3conf/config/Production.yaml
typo3conf/config/Production/SomeSubContext.yaml
etc.
where Production/SomeSubContext would contain the values from Production.yaml and Production/SomeSubContext.yaml ? Or Production/SomeSubContext.yaml would have Production.yaml as import instead of autommatically.
However, if the specified SubContext isn't found then check the context of the system above like for Production/SomeSubContext/Foo it would be Production/SomeSubContext.yaml
Or even better do it like in Symfony where the FileLoader could also import a PHP file in case it is necessary for some settings (though for most it wouldn't be)
Do you intend to do something like this? If so I think this would be really nice. Might be a question if we would want to only do this for the EXTENSION array or for TYPO3_CONF_VARS and EXTENSION array.
Already gave feedback. Please remove corresponding Status.
- Status changed from Needs Feedback to New
- Target version changed from 9 LTS to Candidate for Major Version
- Status changed from New to Rejected
I am closing this issue as nothing is planned in the area + what christian said.
Also available in: Atom
PDF