API Use class from new template engine module #654
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The template engine code is in its own module now, so we need to add it as a dependency and update the use statement. Going with
API
since that feels like it takes precedence overDEP
and updating ause
statement feels like aAPI
commit to me, but I'm happy to change the prefix if the reviewer wants me to.I couldn't think of a clean way to easily abstract this out, given it intentionally uses the same configuration that template partial caching uses, and that is a concept specific to ss templates that can't be abstracted to be for generic template engines.
I think it's sensible to leave this as a strict dependency for now given we have strong coupling to this template engine for all of the CMS templates anyway. If we ever make a move to decouple from the module, we can take another look here at that time - that would need to happen in a future major release anyway since it would mean (at a minimum) moving our CMS templates out of their current modules.
CI for this can't go green until silverstripe/silverstripe-framework#11451 has been merged
Issue