Skip to content

Allow to modify configuration before usage #382

@d-s-codappix

Description

@d-s-codappix

We have the situation that we are upgrading from TYPO3 v11 to v13.
We have a database table with location. Each of them can optionally have a URL, stored inside the DB, with a URL of appointments.
These appointments should be imported through EXT:external_import.

This worked fine before v13. But now TYPO3 doesn't allow using the Database Connection before finishing the TYPO3 boot process. This makes sense to me.

The issue now is that we used the connection to fetch all the URLs and modify the TCA for EXT:external_import. This is no longer possible.

My proposal would be to encapsulate the access of $GLOBALS['TCA'] within the extension, e.g. inside a repository or service class. This one could trigger a PSR-14 Event to modify the TCA to use before returning it.
Also the extension could just wrap the TCA in such a class, without any events. Developers would be able to replace the implementation via DI, and decorate the original implementation.
That way the Extension wouldn't have much extra logic to cover. Still developers would have maximum freedom.

That way one would have maximum flexibility to modify the configuration (aka TCA) only for the extension.
That would also ease the migration to TCA Schema in the future, as there is only a single code location to touch. The schema is readonly. So there would be another struggle for our use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions