Repository navigation
[6.x] Skip Antlers for site values that are only config - #15887
Merged
jasonvarga merged 2 commits intoNov 13, 2026
Merged
Conversation
A site's name and URL are usually nothing but a config expression, which is replaced before Antlers is asked to parse what's left. When nothing is left to parse, the value is returned as it is, sanitized as any other plain value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Every request boots the Antlers runtime to work out the site's name and URL, even though there is usually nothing in them for Antlers to do.
The default
resources/sites.yamlhasname: '{{ config:app.name }}'andurl: '{{ config:app.url }}'.Site::resolveAntlersValue()puts the config values in withParse::config()and then hands the result, by now a plain string likeMy Site, to the runtime parser.When what's left after the config values are in has no
{,@or<in it, it's now returned as it is (still throughsanitizePhp(), as before). Anything that could still be Antlers, a Blade-style directive or a component tag goes to the parser as it always did.Numbers
Two sites with three config expressions each, timed around
resolveAntlersValue():The first one is the cost that matters: on a page that doesn't otherwise use Antlers at that point, the runtime is no longer loaded during boot.
Tests
One test pins what eight shapes of value resolve to (PHP tags, HTML, an
@, numbers, empty and missing config, whitespace), and passes before and after. A value that is only config doesn't reach the parser, and a config value holding a component tag still does; both of those fail without the change or its guard.