"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "8f0806c1db09f689e6499c38f58669bd",
+ "content-hash": "6f5e8d10b4a20c2586020514fcd648c6",
"packages": [
{
"name": "pear/http2",
},
{
"name": "twig/twig",
- "version": "v2.5.0",
+ "version": "v3.3.8",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "6a5f676b77a90823c2d4eaf76137b771adf31323"
+ "reference": "972d8604a92b7054828b539f2febb0211dd5945c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/6a5f676b77a90823c2d4eaf76137b771adf31323",
- "reference": "6a5f676b77a90823c2d4eaf76137b771adf31323",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c",
+ "reference": "972d8604a92b7054828b539f2febb0211dd5945c",
"shasum": ""
},
"require": {
- "php": "^7.0",
+ "php": ">=7.2.5",
"symfony/polyfill-ctype": "^1.8",
- "symfony/polyfill-mbstring": "~1.0"
+ "symfony/polyfill-mbstring": "^1.3"
},
"require-dev": {
"psr/container": "^1.0",
- "symfony/debug": "^2.7",
- "symfony/phpunit-bridge": "^3.3"
+ "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.5-dev"
+ "dev-master": "3.3-dev"
}
},
"autoload": {
- "psr-0": {
- "Twig_": "lib/"
- },
"psr-4": {
"Twig\\": "src/"
}
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
+ {
+ "name": "Twig Team",
+ "role": "Contributors"
+ },
{
"name": "Armin Ronacher",
"role": "Project Founder"
- },
- {
- "name": "Twig Team",
- "homepage": "https://twig.symfony.com/contributors",
- "role": "Contributors"
}
],
"description": "Twig, the flexible, fast, and secure template language for PHP",
"keywords": [
"templating"
],
- "time": "2018-07-13T07:18:09+00:00"
+ "support": {
+ "issues": "https://github.com/twigphp/Twig/issues",
+ "source": "https://github.com/twigphp/Twig/tree/v3.3.8"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/twig/twig",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-02-04T06:59:48+00:00"
}
],
"packages-dev": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
- "platform-dev": []
+ "platform-dev": [],
+ "plugin-api-version": "2.2.0"
}
header("Access-Control-Allow-Origin: *");
-$loader = new \Twig_Loader_Filesystem(__DIR__ . '/../data/templates/');
-$twig = new \Twig_Environment(
+$loader = new \Twig\Loader\FilesystemLoader(__DIR__ . '/../data/templates/');
+$twig = new \Twig\Environment(
$loader,
array(
//'cache' => '/path/to/compilation_cache',
function render($tplname, $vars = array(), $return = false)
{
- $template = $GLOBALS['twig']->loadTemplate($tplname . '.htm');
+ $template = $GLOBALS['twig']->load($tplname . '.htm');
if ($return) {
return $template->render($vars);
echo $template->render($vars);
}
}
-?>
\ No newline at end of file
+?>