From ecf7fa329400f8c0a33281e7230f180e0a984980 Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Fri, 16 Oct 2015 20:09:26 +0200 Subject: [PATCH 1/3] :octocat: Updated `.gitignore` --- .gitattributes | 17 ----------------- .gitignore | 3 +-- 2 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index bdb0cab..0000000 --- a/.gitattributes +++ /dev/null @@ -1,17 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Custom for Visual Studio -*.cs diff=csharp - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore index 3767929..485dee6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -assets/logo.svg -*.xcf +.idea From 7e5d1e2627c4f197a248e3084341c12b98c556fd Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Fri, 16 Oct 2015 20:10:31 +0200 Subject: [PATCH 2/3] Addresses #2 (TraceableTwigEnvironment not found) --- README.md | 2 +- themer.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b2adbc1..19e867c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ * [Installation and Updates](#installation-and-updates) * [Usage](#usage) * [Contributing](#contributing) -* [Licencse](#license) +* [License](#license) ## About diff --git a/themer.php b/themer.php index 2851755..f6980de 100644 --- a/themer.php +++ b/themer.php @@ -91,8 +91,9 @@ public function onPageInitialized() $twig->twig_paths = []; $twig->init(); - // Update TwigCollector for DebugBar - if ($enabled && $debug) { + // Update TwigCollector for DebugBar (deprecated since Grav v0.9.43+) + $deprecated = version_compare(GRAV_VERSION, '0.9.43', '<'); + if ($deprecated && $enabled && $debug) { $twig->twig = new TraceableTwigEnvironment($twig->twig); $collector = $this->grav['debugger']->getCollector('twig'); $collector->twig = $twig->twig; From 7bd1e13630cdfb313ba066b6a5b978e85d540b74 Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Fri, 16 Oct 2015 20:12:07 +0200 Subject: [PATCH 3/3] :maple_leaf: Version Update - Release v1.0.3 --- CHANGELOG.md | 6 ++++++ blueprints.yaml | 2 +- themer.php | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73405c5..943c2a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.0.3 +## 10/16/2015 + +2. [](#improved) + * Disable `TraceableTwigEnvironment` for **Grav v0.9.43+** by default and added backwards-compatibility check [#2](https://github.com/Sommerregen/grav-plugin-themer/issues/2) (TraceableTwigEnvironment not found) + # v1.0.2 ## 09/08/2015 diff --git a/blueprints.yaml b/blueprints.yaml index 1d1b63f..928cc48 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,5 +1,5 @@ name: Themer -version: 1.0.2 +version: 1.0.3 description: "This plugin enables you to use different themes on one site individual set per page or collection." icon: magic author: diff --git a/themer.php b/themer.php index f6980de..dae0244 100644 --- a/themer.php +++ b/themer.php @@ -1,6 +1,6 @@ * @author Benjamin Regler * @copyright 2015, Benjamin Regler