Skip to content

Commit

Permalink
Twig 3 upgrade (#15573)
Browse files Browse the repository at this point in the history
* proof of concept of Twig 3 upgrade

* some for if template fixes

* potentially fix RenderTokenParser

* comment out RenderTokenParser

* clearCompiledTemplates() using unlinkRecursive()

* macro imported in block and used in subblock is not valid

twigphp/Twig#3090

* more template fixes

* remove non existing clearTemplateCache()

* add missing parameter to unlinkRecursive

* Use custom MethodCallExpression to fix RenderTokenParser

* increase minimum php version to 7.2.5

* submodule update

* fix twig loop filter

* updates expected UI files

* fix twig loop filter

* fix twig loop filter

* fix neutral evolution check

* fix macro usage

* convert some conditions to filters

* fix macro include

* remove debug code as default logging is good enough

* submodule updates

Co-authored-by: sgiehl <stefan@matomo.org>
  • Loading branch information
Findus23 and sgiehl authored Jun 4, 2020
1 parent 2851045 commit a35070b
Show file tree
Hide file tree
Showing 27 changed files with 235 additions and 153 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
},
"config":{
"platform": {
"php": "7.2.0"
"php": "7.2.5"
},
"prepend-autoloader": false,
"sort-packages": true
},
"require": {
"php": ">=7.2.0",
"php": ">=7.2.5",
"composer/semver": "~1.3.0",
"davaxi/sparkline": "~1.2",
"geoip2/geoip2": "^2.8",
Expand All @@ -37,7 +37,7 @@
"matomo/ini": "~2.0",
"matomo/matomo-php-tracker": "dev-4.x-dev",
"matomo/network": "~2.0",
"matomo/referrer-spam-blacklist": "~3.0",
"matomo/referrer-spam-blacklist": "^3.11",
"matomo/searchengine-and-social-list": "~3.0",
"monolog/monolog": "~1.11",
"mustangostang/spyc": "~0.6.0",
Expand All @@ -51,7 +51,7 @@
"symfony/monolog-bridge": "~2.6.0",
"szymach/c-pchart": "^2.0",
"tecnickcom/tcpdf": "~6.0",
"twig/twig": "~1.0"
"twig/twig": "^3.0"
},
"require-dev": {
"lox/xhprof": "dev-master",
Expand Down
89 changes: 72 additions & 17 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/FrontController.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function dispatch($module = null, $action = null, $parameters = null)
* @param \Piwik\NoAccessException $exception The exception that was caught.
*/
Piwik::postEvent('User.isNotAuthorized', array($exception), $pending = true);
} catch (\Twig_Error_Runtime $e) {
} catch (\Twig\Error\RuntimeError $e) {
echo $this->generateSafeModeOutputFromException($e);
exit;
} catch(StylesheetLessCompileException $e) {
Expand Down
Loading

0 comments on commit a35070b

Please sign in to comment.