
Reported in Slack by @eduardomart
This seems to be caused by a change in Twig 1.24+ … reverting to 1.23.0 doesn't cause it to occur.
Edit: I was a little too enthusiastic in my testing, it indeed occurs with 1.23.0+
Also present in Bolt 3.1.6
…and found it. It has been with us since 3.0.0.
Twig creates a hash based on the full path of the file, but in 3.x we virtualise the file system, and so rather than the hash being created on /{path}/public/theme/{theme name}/index.twig it is created on theme://index.twig (actually just index.twig, I used the mount point syntax for clarity) … so Twig assumes it is the same file and uses the cached version.
Removing as a blocker … getting some sleep …and I will have a chat with @CarsonF about bright ideas to resolve this.
Yeah, this doesn't qualify as a blocker to me. Glad you caught it, though.. I recall bumping into this behaviour before, but never enough to realise what was going on, other that "huh, something strange" that passes. :-)
Also experienced first a week ago here but felt like Bob... :)
Most helpful comment
…and found it. It has been with us since 3.0.0.
Twig creates a hash based on the full path of the file, but in 3.x we virtualise the file system, and so rather than the hash being created on
/{path}/public/theme/{theme name}/index.twigit is created ontheme://index.twig(actually justindex.twig, I used the mount point syntax for clarity) … so Twig assumes it is the same file and uses the cached version.Removing as a blocker … getting some sleep …and I will have a chat with @CarsonF about bright ideas to resolve this.