You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While implementing this extension into a project, we found that the current way of handling the configurations could be improved.
Right now, the defaults are in ext_typoscript_constants.txt and ext_typoscript_setup.txt (for which I could not find any documentation btw, are these following any core convention?). The problem with the current loading of configuration is that the loading order can't be affected in any way as the extension configuration itself is always loaded "at the end"; One can't override the settings in a custom project-specific extension's configuration that is being loaded through \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(). It only works so far if we put the configuration directly into a db-based sys_template record.
Additionally, as credentials should not be in a VCS anyway, we thought that we might be able to load the configuration via .env, as the API keys might be environment-specific. This would allow changing them without touching the database.
Maybe a nice improvement step would be to actually use ext_emconf_template.txt / get the configuration from the EXTENSIONS array from e. g. LocalConfiguration.php / AdditionalConfiguration.php which then would allow to set the API keys via .env, and it would also allow to override configuration in a project extension as described above, without it ignoring the desired loading order.
What do you think?
The text was updated successfully, but these errors were encountered:
Hi
While implementing this extension into a project, we found that the current way of handling the configurations could be improved.
Right now, the defaults are in
ext_typoscript_constants.txt
andext_typoscript_setup.txt
(for which I could not find any documentation btw, are these following any core convention?). The problem with the current loading of configuration is that the loading order can't be affected in any way as the extension configuration itself is always loaded "at the end"; One can't override the settings in a custom project-specific extension's configuration that is being loaded through\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup()
. It only works so far if we put the configuration directly into a db-based sys_template record.Additionally, as credentials should not be in a VCS anyway, we thought that we might be able to load the configuration via
.env
, as the API keys might be environment-specific. This would allow changing them without touching the database.Maybe a nice improvement step would be to actually use
ext_emconf_template.txt
/ get the configuration from theEXTENSIONS
array from e. g.LocalConfiguration.php
/AdditionalConfiguration.php
which then would allow to set the API keys via.env
, and it would also allow to override configuration in a project extension as described above, without it ignoring the desired loading order.What do you think?
The text was updated successfully, but these errors were encountered: