Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Migrate our templating engine from Smarty to Twig #4019

Closed
mattab opened this Issue · 28 comments

2 participants

Matthieu Aubry Fabian Becker
Matthieu Aubry
Owner

Smarty was nice, but now Twig is the real deal, and we would love to migrate to Twig.

As part of Piwik 2.0, as we increase the minimum PHP version to 5.3, we can now use Twig.

Thanks to the amazing work by @halfdan this is becoming a reality!

Matthieu Aubry
Owner

In 0ddd15a: Removing final |raw from codebase
Refs #4019

Matthieu Aubry
Owner

In 7bbf305: Reverting my commit where I removed all |raw per @halfdan feedback
Instead we should manually add the missing |raw...
Refs #4019

Matthieu Aubry
Owner

In 5aa8081: adding more |raw
Refs #4019

Matthieu Aubry
Owner

In 4d57c02: adding more |raw
Refs #4019

Matthieu Aubry
Owner

In 6ac63c2: * Fixing SitesManager page

  • Enabling debug on twig so we can use {{ dump(var) }} function Refs #4019
Matthieu Aubry
Owner

In 4487ee6: * Fixing Users manager
Refs #4019

Matthieu Aubry
Owner

In 0232067: * Fixing Users manager
Refs #4019

Matthieu Aubry
Owner

In 99fa74d: * Fixing over escaping
Refs #4019

Matthieu Aubry
Owner

In 8f6d151: * Adding htaccess to allow loading SVG+PNG logos on Settings page
Refs #4019

Matthieu Aubry
Owner

In 12e81ae: * admin screens,

  • removed the remains of CDN/jquery feature Refs #4019
Matthieu Aubry
Owner

In b8b0269: * Some more fixes
Refs #4019

Matthieu Aubry
Owner

In 97149fb: * Visitor log page tooltips
Refs #4019

Matthieu Aubry
Owner

In 62bba50: * Fixing overlay
Refs #4019

Matthieu Aubry
Owner

In 55f2efd: * Live
Refs #4019

Matthieu Aubry
Owner

In b814322: Removing Smarty strings from codebase, fixing install
Adding twig to LEGALNOTICE
Refs #4019

Matthieu Aubry
Owner

In 60e3b96: * removing most mentions to "tpl"
Refs #4019

Matthieu Aubry
Owner

In a62f1c1: * Converting CLI templates to twig

  • deprecating View::factory, simplify constructor Refs #4019
Matthieu Aubry
Owner

In 6aee04b: * Fix concats
Refs #4019

Matthieu Aubry
Owner

In 6355922: * Fix the SEO widget
Refs #4019

Matthieu Aubry
Owner

In affa786: * Removing |count as I didn't notice |length was already used
Refs #4019

Matthieu Aubry
Owner

In 63aa1de: * Cell used to be "spaceless" so restoring, just in case this could cause hidden regression...
Refs #4019

Matthieu Aubry
Owner

In 28b9f12: * During the big merge I noticed some code was duplicated in userCountry.js
Refs #4019

Matthieu Aubry
Owner

In 84bf3a5: * themes or plugins should not have the php requirement in JSON, it should only be in "Piwik installation check".
... unless some non-core plugins would indeed require more recent than 5.3 (but core plugins will always work if Piwik was successfully installed)
Refs #4019

Matthieu Aubry
Owner

In 9168480: * Enabling Twig 'strict_variables' so that we write best code possible, and learn early if some tpl code is not valid. Fixing few bugs that this uncovered

  • refactoring the percent column label in getPercentVisitColumn()
  • removing indexBeforeMenu and putting directly in parent template Refs #4019
Matthieu Aubry
Owner

In 7bae344: * Restoring the cache buster output filter which was lost at some point
Refs #4019

Matthieu Aubry
Owner

In 00ef553: * Enabling templates compiled cache. @halfdan, was there any reason it was disabled?
Refs #4019

Matthieu Aubry
Owner

In 1b35b77: * Fixing some missing |raw using global search {{.<{1,}.}}
Refs #4019

Matthieu Aubry
Owner

Twig support is now fully working. awesome!

Matthieu Aubry mattab added this to the 2.0 - Piwik 2.0 milestone
Fabian Becker halfdan was assigned by mattab
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab Removing final |raw from codebase
 Refs #4019
0ddd15a
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab Reverting my commit where I removed all |raw per @halfdan feedback
Instead we should manually add the missing |raw...
Refs #4019
7bbf305
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab adding more |raw
Refs #4019
5aa8081
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab adding more |raw
Refs #4019
4d57c02
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * Fixing SitesManager page
 * Enabling debug on twig so we can use {{ dump(var) }} function
Refs #4019
6ac63c2
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * Fixing Users manager
Refs #4019
4487ee6
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * Fixing Users manager
Refs #4019
0232067
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * Fixing over escaping
Refs #4019
99fa74d
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * admin screens,
 * removed the remains of CDN/jquery feature
Refs #4019
12e81ae
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * Some more fixes
Refs #4019
b8b0269
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * Visitor log page tooltips
Refs #4019
97149fb
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * Fixing overlay
Refs #4019
62bba50
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * Live
Refs #4019
55f2efd
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab Removing Smarty strings from codebase, fixing install
Adding twig to LEGALNOTICE
Refs #4019
b814322
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * removing most mentions to "tpl"
Refs #4019
60e3b96
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * Converting CLI templates to twig
* deprecating View::factory, simplify constructor
Refs #4019
a62f1c1
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * Fix concats
Refs #4019
6aee04b
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * Fix the SEO widget
Refs #4019
6355922
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * Cell used to be "spaceless" so restoring, just in case this could c…
…ause hidden regression...

Refs #4019
63aa1de
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * themes or plugins should not have the php requirement in JSON, it s…
…hould only be in "Piwik installation check".

... unless some non-core plugins would indeed require more recent than 5.3 (but core plugins will always work if Piwik was successfully installed)
Refs #4019
84bf3a5
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * Enabling Twig 'strict_variables' so that we write best code possibl…
…e, and learn early if some tpl code is not valid. Fixing few bugs that this uncovered

* refactoring the percent column label in getPercentVisitColumn()
* removing indexBeforeMenu and putting directly in parent template
Refs #4019
9168480
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab * Enabling templates compiled cache. @halfdan, was there any reason i…
…t was disabled?

Refs #4019
00ef553
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.