Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables #22

Open
pduersteler opened this issue Jan 13, 2022 · 2 comments · May be fixed by #28
Open

Environment variables #22

pduersteler opened this issue Jan 13, 2022 · 2 comments · May be fixed by #28
Labels
Milestone

Comments

@pduersteler
Copy link

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 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?

@instruccionesaldorso
Copy link

I had the same issue, @pduersteler .
I just sent a pull request to solve it, besides a few topics related to TSconfig and partial.

@sbusemann sbusemann added this to the 6.0 milestone May 28, 2024
@sbusemann
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants