Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As Drupal Core now supports rebuilding the Twig registry has improved debugging and template reloading functionality as part of a local services.yml file, I would endorse removing this feature from Zen. One, it's fairly redundant. Two, less code to port and maintain :-)
Comment | File | Size | Author |
---|---|---|---|
#13 | 2637804-registry-rebuild-13.patch | 1.3 KB | rodrigoaguilera |
#11 | 2637804-registry-rebuild-11.patch | 1.29 KB | rodrigoaguilera |
Comments
Comment #2
kmontyComment #3
star-szrThere is no Twig registry, and the theme registry that stores which templates are in use still exists in D8. So IMO this is still a useful feature to have, but I'm curious if you are actually able to do this with only a setting.
Comment #4
kmontyI could be misinterpreting this, but there is the Twig auto-reload in services.yml (still fairly new to D8, so quite possible I don't understand exactly what this does!).
Devel also appears to have gotten rid of this feature for the 8.x release. Again, that doesn't necessarily mean Zen needs to abandon it, but it's an interesting data point.
Comment #5
kmontyI should also note, this might not be a necessary MVP feature for an functional alpha D8 release of Zen, should John + the community wish to keep it.
Comment #6
kmontyUpdating issue info to reflect that this is more of suggestion.
Comment #7
star-szrTwig auto-reload != Drupal theme registry rebuild on each page load. If you add a new template override, Twig auto-reload won't know about it until you rebuild the theme registry. So IMO this is still a potentially useful feature during theme development.
Edit: More info on Twig auto reload here: http://twig.sensiolabs.org/doc/api.html#environment-options and https://www.drupal.org/node/1903374#twig-auto-reload
Comment #8
star-szr:)
Comment #9
JohnAlbinI have a half-working version. It
rebuilds the theme registryclears the Twig cache if the setting is set, but it doesn't warn you that it is doing it. Nor does it actually rebuild the theme registry.Comment #11
rodrigoaguileraHere is a patch to solve the call to the url() undefined function
Comment #12
rodrigoaguileraComment #13
rodrigoaguileraI forgot a ->toString()