mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-22 19:28:53 +00:00
Merge pull request #3028 from Nicofuma/ticket/13139
[ticket/13139] Update Twig to 1.18.0 * Nicofuma/ticket/13139: [ticket/13139] Fix tests [ticket/13139] Update Twig to 1.8.0 [ticket/13139] Update Twig to 1.16.2
This commit is contained in:
commit
ceaba8aaf9
4 changed files with 23 additions and 18 deletions
|
@ -36,7 +36,7 @@
|
|||
"symfony/routing": "2.5.*",
|
||||
"symfony/twig-bridge": "2.5.*",
|
||||
"symfony/yaml": "2.5.*",
|
||||
"twig/twig": "1.13.*"
|
||||
"twig/twig": "1.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"fabpot/goutte": "1.0.*",
|
||||
|
|
21
phpBB/composer.lock
generated
21
phpBB/composer.lock
generated
|
@ -3,7 +3,7 @@
|
|||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
|
||||
],
|
||||
"hash": "2faf4ba24774c0d51cff4b78d4a81a68",
|
||||
"hash": "372e66644eb8d1504f88471de6d6dac6",
|
||||
"packages": [
|
||||
{
|
||||
"name": "lusitanian/oauth",
|
||||
|
@ -910,16 +910,16 @@
|
|||
},
|
||||
{
|
||||
"name": "twig/twig",
|
||||
"version": "v1.13.2",
|
||||
"version": "v1.18.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fabpot/Twig.git",
|
||||
"reference": "6d6a1009427d1f398c9d40904147bf9f723d5755"
|
||||
"url": "https://github.com/twigphp/Twig.git",
|
||||
"reference": "4cf7464348e7f9893a93f7096a90b73722be99cf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fabpot/Twig/zipball/6d6a1009427d1f398c9d40904147bf9f723d5755",
|
||||
"reference": "6d6a1009427d1f398c9d40904147bf9f723d5755",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/4cf7464348e7f9893a93f7096a90b73722be99cf",
|
||||
"reference": "4cf7464348e7f9893a93f7096a90b73722be99cf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -928,7 +928,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.13-dev"
|
||||
"dev-master": "1.18-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -951,6 +951,11 @@
|
|||
"name": "Armin Ronacher",
|
||||
"email": "armin.ronacher@active-4.com",
|
||||
"role": "Project Founder"
|
||||
},
|
||||
{
|
||||
"name": "Twig Team",
|
||||
"homepage": "http://twig.sensiolabs.org/contributors",
|
||||
"role": "Contributors"
|
||||
}
|
||||
],
|
||||
"description": "Twig, the flexible, fast, and secure template language for PHP",
|
||||
|
@ -958,7 +963,7 @@
|
|||
"keywords": [
|
||||
"templating"
|
||||
],
|
||||
"time": "2013-08-03 15:35:31"
|
||||
"time": "2015-01-25 17:32:08"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
|
|
|
@ -152,6 +152,12 @@ class asset
|
|||
*/
|
||||
public function set_path($path, $urlencode = false)
|
||||
{
|
||||
// Since 1.7.0 Twig returns the real path of the file. We need it to be relative to the working directory.
|
||||
$real_root_path = realpath('.') . DIRECTORY_SEPARATOR;
|
||||
if ($real_root_path && substr($path . DIRECTORY_SEPARATOR, 0, strlen($real_root_path)) === $real_root_path) {
|
||||
$path = str_replace('\\', '/', substr($path, strlen($real_root_path)));
|
||||
}
|
||||
|
||||
if ($urlencode)
|
||||
{
|
||||
$paths = explode('/', $path);
|
||||
|
@ -161,6 +167,7 @@ class asset
|
|||
}
|
||||
$path = implode('/', $paths);
|
||||
}
|
||||
|
||||
$this->components['path'] = $path;
|
||||
}
|
||||
|
||||
|
|
|
@ -83,13 +83,6 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te
|
|||
|
||||
public function template_data()
|
||||
{
|
||||
$url_base = explode('/', dirname(__FILE__));
|
||||
foreach ($url_base as &$dir)
|
||||
{
|
||||
$dir = rawurlencode($dir);
|
||||
}
|
||||
$url_base = implode('/', $url_base);
|
||||
|
||||
return array(
|
||||
/*
|
||||
array(
|
||||
|
@ -107,11 +100,11 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te
|
|||
),
|
||||
array(
|
||||
array('TEST' => 3),
|
||||
'<link href="' . $url_base . '/ext/include/css/styles/all/theme/test.css?assets_version=1" rel="stylesheet" type="text/css" media="screen, projection" />',
|
||||
'<link href="tests/template/ext/include/css/styles/all/theme/test.css?assets_version=1" rel="stylesheet" type="text/css" media="screen, projection" />',
|
||||
),
|
||||
array(
|
||||
array('TEST' => 4),
|
||||
'<link href="' . $url_base . '/ext/include/css/styles/all/theme/child_only.css?assets_version=1" rel="stylesheet" type="text/css" media="screen, projection" />',
|
||||
'<link href="tests/template/ext/include/css/styles/all/theme/child_only.css?assets_version=1" rel="stylesheet" type="text/css" media="screen, projection" />',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue