Support from Acquia helps fund testing for Drupal Acquia logo

Comments

c4rl’s picture

Issue tags: +Twig

Tagging

joelpittet’s picture

Assigned: Unassigned » joelpittet
joelpittet’s picture

Status: Active » Needs review
FileSize
1.6 KB

Here's a rough one:)

Status: Needs review » Needs work

The last submitted patch, drupal-twig-common_test-1898456-3.patch, failed testing.

joelpittet’s picture

Status: Needs work » Needs review
FileSize
1.4 KB
1.4 KB

Removed the unnecessary template_preprocess and added some white space modifiers to help it pass the simpletests.

star-szr’s picture

Nice! The only thing I see is we should remove the unnecessary preprocess from the Twig file's docblock too.

joelpittet’s picture

Good call.

joelpittet’s picture

Removed the front whitespace modifier because @steveoliver suggested it is unnessasry and the twig docs mention the newline after the docblock is removed automatically.

http://twig.sensiolabs.org/doc/templates.html#whitespace-control

Crosses fingers.

tlattimore’s picture

It seems like our tests should be ignore whitespace that shows up when checking against stuff - rather than the *exact string. But thats a whole other discussion..

The patch from #8 looks good to me. Always glad to see where we can drop a theme/preprocess altogether. I have heard some various opinions in irc on the whitespace control for these conversions, but I personally am okay with it. Especially if whitespace is the only thing keeping the test from passing.

star-szr’s picture

star-szr’s picture

Status: Needs review » Reviewed & tested by the community

RTBC if it comes back green. Good work @joelpittet :)

star-szr’s picture

Issue summary: View changes

Add conversion summary table

c4rl’s picture

Title: Convert common_test module to Twig » common_test.module - Convert theme_ functions to Twig

Per #1757550-44: [Meta] Convert core theme functions to Twig templates, retitling to indicate this issue applies to theme_ functions, which are lower in priority than PHPTemplate conversion issues.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +needs profiling
epersonae2’s picture

Status: Needs work » Needs review
Issue tags: -needs profiling, -Twig

Status: Needs review » Needs work
Issue tags: +needs profiling, +Twig

The last submitted patch, drupal-twig-common_test-1898456-8.patch, failed testing.

joshmiller’s picture

About to re-roll

johannez’s picture

Status: Needs work » Needs review
rwohleb’s picture

Running profile on drupal-twig-common_test-1898456-8.patch

rwohleb’s picture

Issue tags: -needs profiling

=== 8.x..8.x compared (519fff4bc13bf..519fffaed3821):

ct : 610,847|610,847|0|0.0%
wt : 5,733,916|5,732,281|-1,635|-0.0%
cpu : 5,638,489|5,631,327|-7,162|-0.1%
mu : 58,147,712|58,147,712|0|0.0%
pmu : 58,361,520|58,361,520|0|0.0%

=== 8.x..issue-1898456 compared (519fff4bc13bf..519fffcb3a4b0):

ct : 610,847|610,847|0|0.0%
wt : 5,733,916|5,788,314|54,398|0.9%
cpu : 5,638,489|5,684,892|46,403|0.8%
mu : 58,147,712|58,149,264|1,552|0.0%
pmu : 58,361,520|58,362,504|984|0.0%

Status: Needs review » Needs work
Issue tags: -Twig

The last submitted patch, drupal-twig-common_test-1898456-8.patch, failed testing.

joelpittet’s picture

Status: Needs work » Needs review
Issue tags: +Twig
joelpittet’s picture

Assigned: joelpittet » Unassigned

@rwohleb could you post your scenario in the summary for testing so someone can try to reproduce your results? Also, thanks for doing those! They don't look all that bad coming from a theme to template conversion.

ezeedub’s picture

Assigned: Unassigned » ezeedub
Issue tags: +needs profiling

Looks like same number of function calls in the 8.x..issue-1898456 comparison. I'll redo this one.

ezeedub’s picture

Assigned: ezeedub » Unassigned

I couldn't figure out how to hit the template.

star-szr’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -needs profiling

I'm going to go ahead and say we don't need profiling on this because it's only used for automated testing, and set back to RTBC. Thanks for your efforts everyone :)

star-szr’s picture

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed c5cecfd and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Remove sandbox link