mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-13 20:28:44 +01:00
[ticket/16382] Update Twig_Environment
PHPBB3-16382
This commit is contained in:
parent
8a040f3fbc
commit
75c25556aa
@ -16,7 +16,7 @@ namespace phpbb\feed\controller;
|
||||
use phpbb\auth\auth;
|
||||
use phpbb\config\config;
|
||||
use phpbb\db\driver\driver_interface;
|
||||
use \phpbb\event\dispatcher_interface;
|
||||
use phpbb\event\dispatcher_interface;
|
||||
use phpbb\exception\http_exception;
|
||||
use phpbb\feed\feed_interface;
|
||||
use phpbb\feed\exception\feed_unavailable_exception;
|
||||
@ -28,11 +28,12 @@ use phpbb\user;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Twig\Environment;
|
||||
|
||||
class feed
|
||||
{
|
||||
/**
|
||||
* @var \Twig_Environment
|
||||
* @var Environment
|
||||
*/
|
||||
protected $template;
|
||||
|
||||
@ -89,7 +90,7 @@ class feed
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \Twig_Environment $twig
|
||||
* @param Environment $twig
|
||||
* @param symfony_request $request
|
||||
* @param controller_helper $controller_helper
|
||||
* @param config $config
|
||||
@ -101,7 +102,7 @@ class feed
|
||||
* @param dispatcher_interface $phpbb_dispatcher
|
||||
* @param string $php_ext
|
||||
*/
|
||||
public function __construct(\Twig_Environment $twig, symfony_request $request, controller_helper $controller_helper, config $config, driver_interface $db, ContainerInterface $container, feed_helper $feed_helper, user $user, auth $auth, dispatcher_interface $phpbb_dispatcher, $php_ext)
|
||||
public function __construct(Environment $twig, symfony_request $request, controller_helper $controller_helper, config $config, driver_interface $db, ContainerInterface $container, feed_helper $feed_helper, user $user, auth $auth, dispatcher_interface $phpbb_dispatcher, $php_ext)
|
||||
{
|
||||
$this->request = $request;
|
||||
$this->controller_helper = $controller_helper;
|
||||
|
@ -15,7 +15,7 @@ namespace phpbb\template\twig;
|
||||
|
||||
use phpbb\template\assets_bag;
|
||||
|
||||
class environment extends \Twig_Environment
|
||||
class environment extends \Twig\Environment
|
||||
{
|
||||
/** @var \phpbb\config\config */
|
||||
protected $phpbb_config;
|
||||
@ -169,7 +169,7 @@ class environment extends \Twig_Environment
|
||||
* Set the namespace look up order to load templates from
|
||||
*
|
||||
* @param array $namespace
|
||||
* @return \Twig_Environment
|
||||
* @return \Twig\Environment
|
||||
*/
|
||||
public function setNamespaceLookUpOrder($namespace)
|
||||
{
|
||||
|
@ -134,7 +134,7 @@ class extension extends \Twig_Extension
|
||||
/**
|
||||
* Grabs a subset of a loop
|
||||
*
|
||||
* @param \Twig_Environment $env A Twig_Environment instance
|
||||
* @param \Twig\Environment $env A Twig\Environment instance
|
||||
* @param mixed $item A variable
|
||||
* @param integer $start Start of the subset
|
||||
* @param integer $end End of the subset
|
||||
@ -142,7 +142,7 @@ class extension extends \Twig_Extension
|
||||
*
|
||||
* @return mixed The sliced variable
|
||||
*/
|
||||
public function loop_subset(\Twig_Environment $env, $item, $start, $end = null, $preserveKeys = false)
|
||||
public function loop_subset(\Twig\Environment $env, $item, $start, $end = null, $preserveKeys = false)
|
||||
{
|
||||
// We do almost the same thing as Twig's slice (array_slice), except when $end is positive
|
||||
if ($end >= 1)
|
||||
|
@ -21,7 +21,7 @@ class event extends \Twig\Node\Node
|
||||
*/
|
||||
protected $listener_directory = 'event/';
|
||||
|
||||
/** @var \Twig_Environment */
|
||||
/** @var \Twig\Environment */
|
||||
protected $environment;
|
||||
|
||||
public function __construct(\Twig\Node\Expression\AbstractExpression $expr, \phpbb\template\twig\environment $environment, $lineno, $tag = null)
|
||||
|
@ -16,7 +16,7 @@ namespace phpbb\template\twig\node;
|
||||
|
||||
class includephp extends \Twig\Node\Node
|
||||
{
|
||||
/** @var \Twig_Environment */
|
||||
/** @var \Twig\Environment */
|
||||
protected $environment;
|
||||
|
||||
public function __construct(\Twig\Node\Expression\AbstractExpression $expr, \phpbb\template\twig\environment $environment, $lineno, $ignoreMissing = false, $tag = null)
|
||||
|
@ -15,7 +15,7 @@ namespace phpbb\template\twig\node;
|
||||
|
||||
class php extends \Twig\Node\Node
|
||||
{
|
||||
/** @var \Twig_Environment */
|
||||
/** @var \Twig\Environment */
|
||||
protected $environment;
|
||||
|
||||
public function __construct(\Twig\Node\TextNode $text, \phpbb\template\twig\environment $environment, $lineno, $tag = null)
|
||||
|
@ -69,7 +69,7 @@ class twig extends \phpbb\template\base
|
||||
/**
|
||||
* Twig Environment
|
||||
*
|
||||
* @var \Twig_Environment
|
||||
* @var \Twig\Environment
|
||||
*/
|
||||
protected $twig;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user