diff --git a/core/composer.json b/core/composer.json index 0835d4c..fd7223c 100644 --- a/core/composer.json +++ b/core/composer.json @@ -17,7 +17,7 @@ "symfony/validator": "2.7.*", "symfony/process": "2.7.*", "symfony/yaml": "2.7.*", - "twig/twig": "~1.20", + "twig/twig": "~1.22", "doctrine/common": "2.5.*", "doctrine/annotations": "1.2.*", "guzzlehttp/guzzle": "~6.1", diff --git a/core/composer.lock b/core/composer.lock index 972ab7b..98186db 100644 --- a/core/composer.lock +++ b/core/composer.lock @@ -4,8 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "29476e978819bb447be96d99cbfc7ca1", - "content-hash": "de562c8b7c841b7a9560684a3f93ed61", + "hash": "73c9bbe9f22815a79f6d63f9b9afa772", "packages": [ { "name": "doctrine/annotations", @@ -1779,16 +1778,16 @@ }, { "name": "twig/twig", - "version": "v1.22.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "204a6c94907c2c2225322c267e09adbb2b1c04fd" + "reference": "b7fc2469fa009897871fb95b68237286fc54a5ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/204a6c94907c2c2225322c267e09adbb2b1c04fd", - "reference": "204a6c94907c2c2225322c267e09adbb2b1c04fd", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/b7fc2469fa009897871fb95b68237286fc54a5ad", + "reference": "b7fc2469fa009897871fb95b68237286fc54a5ad", "shasum": "" }, "require": { @@ -1836,7 +1835,7 @@ "keywords": [ "templating" ], - "time": "2015-09-13 17:12:38" + "time": "2015-09-15 06:50:16" }, { "name": "zendframework/zend-diactoros", diff --git a/core/vendor/composer/installed.json b/core/vendor/composer/installed.json index d2f92d7..0655b5b 100644 --- a/core/vendor/composer/installed.json +++ b/core/vendor/composer/installed.json @@ -3418,17 +3418,17 @@ }, { "name": "twig/twig", - "version": "v1.22.0", - "version_normalized": "1.22.0.0", + "version": "v1.22.1", + "version_normalized": "1.22.1.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "204a6c94907c2c2225322c267e09adbb2b1c04fd" + "reference": "b7fc2469fa009897871fb95b68237286fc54a5ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/204a6c94907c2c2225322c267e09adbb2b1c04fd", - "reference": "204a6c94907c2c2225322c267e09adbb2b1c04fd", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/b7fc2469fa009897871fb95b68237286fc54a5ad", + "reference": "b7fc2469fa009897871fb95b68237286fc54a5ad", "shasum": "" }, "require": { @@ -3438,7 +3438,7 @@ "symfony/debug": "~2.7", "symfony/phpunit-bridge": "~2.7" }, - "time": "2015-09-13 17:12:38", + "time": "2015-09-15 06:50:16", "type": "library", "extra": { "branch-alias": { diff --git a/core/vendor/twig/twig/CHANGELOG b/core/vendor/twig/twig/CHANGELOG index bd84c40..7e33437 100644 --- a/core/vendor/twig/twig/CHANGELOG +++ b/core/vendor/twig/twig/CHANGELOG @@ -1,3 +1,7 @@ +* 1.22.1 (2015-09-15) + + * fixed regression in template_from_string + * 1.22.0 (2015-09-13) * made Twig_Test_IntegrationTestCase more flexible diff --git a/core/vendor/twig/twig/ext/twig/php_twig.h b/core/vendor/twig/twig/ext/twig/php_twig.h index 240bf63..50f5b45 100644 --- a/core/vendor/twig/twig/ext/twig/php_twig.h +++ b/core/vendor/twig/twig/ext/twig/php_twig.h @@ -15,7 +15,7 @@ #ifndef PHP_TWIG_H #define PHP_TWIG_H -#define PHP_TWIG_VERSION "1.22.0" +#define PHP_TWIG_VERSION "1.22.1" #include "php.h" diff --git a/core/vendor/twig/twig/lib/Twig/Environment.php b/core/vendor/twig/twig/lib/Twig/Environment.php index 4290251..cd167bd 100644 --- a/core/vendor/twig/twig/lib/Twig/Environment.php +++ b/core/vendor/twig/twig/lib/Twig/Environment.php @@ -16,7 +16,7 @@ */ class Twig_Environment { - const VERSION = '1.22.0'; + const VERSION = '1.22.1'; protected $charset; protected $loader; @@ -647,7 +647,7 @@ public function compileSource($source, $name = null) $compiled = $this->compile($this->parse($this->tokenize($source, $name)), $source); if (isset($source[0])) { - $compiled .= '/* '.str_replace(array('*/', "\r\n", "\n", "\r"), array('*//*', "\n", "*/\n/* ", "*/\n/* "), $source)."*/\n"; + $compiled .= '/* '.str_replace(array('*/', "\r\n", "\r", "\n"), array('*//* ', "\n", "\n", "*/\n/* "), $source)."*/\n"; } return $compiled; diff --git a/core/vendor/twig/twig/lib/Twig/Extension/StringLoader.php b/core/vendor/twig/twig/lib/Twig/Extension/StringLoader.php index 4e1a546..d96673c 100644 --- a/core/vendor/twig/twig/lib/Twig/Extension/StringLoader.php +++ b/core/vendor/twig/twig/lib/Twig/Extension/StringLoader.php @@ -37,11 +37,11 @@ public function getName() * * * @param Twig_Environment $env A Twig_Environment instance - * @param string $template A template as a string + * @param string $template A template as a string or object implementing __toString() * * @return Twig_Template A Twig_Template instance */ function twig_template_from_string(Twig_Environment $env, $template) { - return $env->createTemplate($template); + return $env->createTemplate((string) $template); } diff --git a/core/vendor/twig/twig/lib/Twig/Template.php b/core/vendor/twig/twig/lib/Twig/Template.php index a854138..36d4162 100644 --- a/core/vendor/twig/twig/lib/Twig/Template.php +++ b/core/vendor/twig/twig/lib/Twig/Template.php @@ -323,7 +323,7 @@ public function getSource() $i = 0; while (isset($source[$i]) && '/* */' === substr_replace($source[$i], '', 3, -2)) { - $source[$i] = str_replace('*//*', '*/', substr($source[$i], 3, -2)); + $source[$i] = str_replace('*//* ', '*/', substr($source[$i], 3, -2)); ++$i; } array_splice($source, $i); diff --git a/core/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php b/core/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php index 7d78179..83a98ef 100644 --- a/core/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php +++ b/core/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php @@ -142,10 +142,12 @@ public function testCompileSourceInlinesSource() { $twig = new Twig_Environment($this->getMock('Twig_LoaderInterface')); - $source = "\r\nbar\n"; - $expected = "/* */\n/* bar*/\n/* */\n"; + $source = "\r\nbar\n"; + $expected = "/* */\n/* bar*/\n/* */\n"; + $compiled = $twig->compileSource($source, 'index'); - $this->assertContains($expected, $twig->compileSource($source, 'index')); + $this->assertContains($expected, $compiled); + $this->assertNotContains('/**', $compiled); } public function testExtensionsAreNotInitializedWhenRenderingACompiledTemplate() diff --git a/core/vendor/twig/twig/test/Twig/Tests/TemplateTest.php b/core/vendor/twig/twig/test/Twig/Tests/TemplateTest.php index eb27dc3..37836fd 100644 --- a/core/vendor/twig/twig/test/Twig/Tests/TemplateTest.php +++ b/core/vendor/twig/twig/test/Twig/Tests/TemplateTest.php @@ -88,7 +88,7 @@ public function testGetSource() { $template = new Twig_TemplateTest(new Twig_Environment($this->getMock('Twig_LoaderInterface')), false); - $this->assertSame("\n", $template->getSource()); + $this->assertSame("\n", $template->getSource()); } /** @@ -470,7 +470,7 @@ public function getAttribute($object, $item, array $arguments = array(), $type = } } } -/* */ +/* */ /* */ class Twig_TemplateArrayAccessObject implements ArrayAccess