Task
Convert core themes to use Twig instead of PHPTemplate
Remaining
- #2004826: bartik.theme - Convert theme_ functions to Twig
- #1987424: seven.theme - Convert theme_ functions to Twig
- #1938840: bartik.theme - Convert PHPTemplate templates to Twig
- #1938848: seven.theme - Convert PHPTemplate templates to Twig
- Determine the best way to handle automated and manual testing for these patches - see #2 and on.
Related issues
#1938948: Temporarily allow PHPTemplate themes to use .html.twig templates during Twig conversion
#1757550: [Meta] Convert core theme functions to Twig templates
Comments
Comment #0.0
jenlamptonlink
Comment #1
mgiffordLooking forward to seeing this. Want to know if patches like this should be pushed RTBC now or after you've done this work? #1913692: Convert Seven to HTML5
Comment #2
star-szrI talked to @jenlampton and we'll convert any template files in core themes as part of their respective issues, now that #1938948: Temporarily allow PHPTemplate themes to use .html.twig templates during Twig conversion is in. So Bartik's comment.tpl.php should be converted in #1898054: comment.module - Convert PHPTemplate templates to Twig.
But we'll still use these sub-issues to add 'engine: twig' in the .info.yml file and (if we can) convert any theme function overrides to template overrides. We're not yet sure if that will work. If we're not able to do that, then the theme function overrides will need to be part of their respective conversion issues or the conversion issues will need to get committed before these theme conversion patches get committed.
Edit: added link.
Comment #3
star-szrI see three main options for handling the core theme conversions and manual testing:
I'm leaning towards #2. Any other opinions?
Comment #4
star-szr#1 is happening on its own in some cases though, #1898054: comment.module - Convert PHPTemplate templates to Twig and #1898038: custom_block.module - Convert theme_ functions to Twig. If we go with #1 then "converting all the core themes" would just be a matter of patching all the .info.yml files.
So that might be simplest of all, and less issues to perform manual testing on.
Comment #4.0
star-szrAdd related issues
Comment #4.1
star-szrUpdate summary
Comment #4.2
jenlamptonremove stark conversion, since it is not related.
Comment #5
mgiffordNow that this is in Core, would be good to get a pointer to the documentation which explains the conversion.
What was now X, now looks like Y.
I'm sure I'll come to love twig in time, but right now frustrated that I can find the theme functions any more.
Where's the stub for the documentation page on the D7->D8 upgrade?
Comment #6
star-szr@mgifford - sorry for the delayed response, the stub has not been created yet.
https://drupal.org/update/theme would be the place to create it. I had originally volunteered to get those docs started but haven't had the time unfortunately.
Comment #6.0
star-szrbartik
Comment #7
star-szrAll core themes have been using Twig for quite some time, now :)