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

@mattab
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!

@mattab
Owner

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

@mattab
Owner

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

@mattab
Owner

In 5aa8081: adding more |raw
Refs #4019

@mattab
Owner

In 4d57c02: adding more |raw
Refs #4019

@mattab
Owner

In 6ac63c2: * Fixing SitesManager page

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

In 4487ee6: * Fixing Users manager
Refs #4019

@mattab
Owner

In 0232067: * Fixing Users manager
Refs #4019

@mattab
Owner

In 99fa74d: * Fixing over escaping
Refs #4019

@mattab
Owner

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

@mattab
Owner

In 12e81ae: * admin screens,

  • removed the remains of CDN/jquery feature Refs #4019
@mattab
Owner

In b8b0269: * Some more fixes
Refs #4019

@mattab
Owner

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

@mattab
Owner

In 62bba50: * Fixing overlay
Refs #4019

@mattab
Owner

In 55f2efd: * Live
Refs #4019

@mattab
Owner

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

@mattab
Owner

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

@mattab
Owner

In a62f1c1: * Converting CLI templates to twig

  • deprecating View::factory, simplify constructor Refs #4019
@mattab
Owner

In 6aee04b: * Fix concats
Refs #4019

@mattab
Owner

In 6355922: * Fix the SEO widget
Refs #4019

@mattab
Owner

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

@mattab
Owner

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

@mattab
Owner

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

@mattab
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

@mattab
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
@mattab
Owner

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

@mattab
Owner

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

@mattab
Owner

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

@mattab
Owner

Twig support is now fully working. awesome!

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

Refs #4019
63aa1de
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@mattab 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
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@mattab 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
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@mattab 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.