summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-03-16 22:02:36 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2019-11-29 18:42:20 +0100
commit15e6740e12df3fa53c4b0f3e85e3d91590f0ef60 (patch)
treeab90961b0e5915f35de61518f684426410a96d05 /src
parentf8e1f8508957dfb2f4db1485f3e17358f9a72a31 (diff)
Twig update to > 2.11: Fixed namespaces, warnings and cleanup
Diffstat (limited to 'src')
-rw-r--r--src/Middleware/ErrorHandler.php2
-rw-r--r--src/Renderer/Twig/Extensions/Assets.php4
-rw-r--r--src/Renderer/Twig/Extensions/Authentication.php4
-rw-r--r--src/Renderer/Twig/Extensions/Config.php4
-rw-r--r--src/Renderer/Twig/Extensions/Csrf.php4
-rw-r--r--src/Renderer/Twig/Extensions/Globals.php4
-rw-r--r--src/Renderer/Twig/Extensions/Legacy.php4
-rw-r--r--src/Renderer/Twig/Extensions/Markdown.php4
-rw-r--r--src/Renderer/Twig/Extensions/Session.php4
-rw-r--r--src/Renderer/Twig/Extensions/Translation.php6
-rw-r--r--src/Renderer/Twig/Extensions/Url.php4
-rw-r--r--src/Renderer/TwigEngine.php8
-rw-r--r--src/Renderer/TwigLoader.php8
-rw-r--r--src/Renderer/TwigServiceProvider.php6
14 files changed, 33 insertions, 33 deletions
diff --git a/src/Middleware/ErrorHandler.php b/src/Middleware/ErrorHandler.php
index b8f8b166..46e6e5a8 100644
--- a/src/Middleware/ErrorHandler.php
+++ b/src/Middleware/ErrorHandler.php
@@ -11,7 +11,7 @@ use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
-use Twig_LoaderInterface as TwigLoader;
+use Twig\Loader\LoaderInterface as TwigLoader;
class ErrorHandler implements MiddlewareInterface
{
diff --git a/src/Renderer/Twig/Extensions/Assets.php b/src/Renderer/Twig/Extensions/Assets.php
index 2cdfb0fd..b77e4755 100644
--- a/src/Renderer/Twig/Extensions/Assets.php
+++ b/src/Renderer/Twig/Extensions/Assets.php
@@ -3,8 +3,8 @@
namespace Engelsystem\Renderer\Twig\Extensions;
use Engelsystem\Http\UrlGenerator;
-use Twig_Extension as TwigExtension;
-use Twig_Function as TwigFunction;
+use Twig\Extension\AbstractExtension as TwigExtension;
+use Twig\TwigFunction;
class Assets extends TwigExtension
{
diff --git a/src/Renderer/Twig/Extensions/Authentication.php b/src/Renderer/Twig/Extensions/Authentication.php
index 538526da..33268ee6 100644
--- a/src/Renderer/Twig/Extensions/Authentication.php
+++ b/src/Renderer/Twig/Extensions/Authentication.php
@@ -3,8 +3,8 @@
namespace Engelsystem\Renderer\Twig\Extensions;
use Engelsystem\Helpers\Authenticator;
-use Twig_Extension as TwigExtension;
-use Twig_Function as TwigFunction;
+use Twig\Extension\AbstractExtension as TwigExtension;
+use Twig\TwigFunction;
class Authentication extends TwigExtension
{
diff --git a/src/Renderer/Twig/Extensions/Config.php b/src/Renderer/Twig/Extensions/Config.php
index dbbe93e7..a82d2f73 100644
--- a/src/Renderer/Twig/Extensions/Config.php
+++ b/src/Renderer/Twig/Extensions/Config.php
@@ -3,8 +3,8 @@
namespace Engelsystem\Renderer\Twig\Extensions;
use Engelsystem\Config\Config as EngelsystemConfig;
-use Twig_Extension as TwigExtension;
-use Twig_Function as TwigFunction;
+use Twig\Extension\AbstractExtension as TwigExtension;
+use Twig\TwigFunction;
class Config extends TwigExtension
{
diff --git a/src/Renderer/Twig/Extensions/Csrf.php b/src/Renderer/Twig/Extensions/Csrf.php
index 9f77df80..6e326824 100644
--- a/src/Renderer/Twig/Extensions/Csrf.php
+++ b/src/Renderer/Twig/Extensions/Csrf.php
@@ -3,8 +3,8 @@
namespace Engelsystem\Renderer\Twig\Extensions;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
-use Twig_Extension as TwigExtension;
-use Twig_Function as TwigFunction;
+use Twig\Extension\AbstractExtension as TwigExtension;
+use Twig\TwigFunction;
class Csrf extends TwigExtension
{
diff --git a/src/Renderer/Twig/Extensions/Globals.php b/src/Renderer/Twig/Extensions/Globals.php
index ef29a819..a7914623 100644
--- a/src/Renderer/Twig/Extensions/Globals.php
+++ b/src/Renderer/Twig/Extensions/Globals.php
@@ -3,8 +3,8 @@
namespace Engelsystem\Renderer\Twig\Extensions;
use Engelsystem\Helpers\Authenticator;
-use Twig_Extension as TwigExtension;
-use Twig_Extension_GlobalsInterface as GlobalsInterface;
+use Twig\Extension\AbstractExtension as TwigExtension;
+use Twig\Extension\GlobalsInterface as GlobalsInterface;
class Globals extends TwigExtension implements GlobalsInterface
{
diff --git a/src/Renderer/Twig/Extensions/Legacy.php b/src/Renderer/Twig/Extensions/Legacy.php
index 55c095fc..41b00468 100644
--- a/src/Renderer/Twig/Extensions/Legacy.php
+++ b/src/Renderer/Twig/Extensions/Legacy.php
@@ -3,8 +3,8 @@
namespace Engelsystem\Renderer\Twig\Extensions;
use Engelsystem\Http\Request;
-use Twig_Extension as TwigExtension;
-use Twig_Function as TwigFunction;
+use Twig\Extension\AbstractExtension as TwigExtension;
+use Twig\TwigFunction;
class Legacy extends TwigExtension
{
diff --git a/src/Renderer/Twig/Extensions/Markdown.php b/src/Renderer/Twig/Extensions/Markdown.php
index 293efe91..3d523f57 100644
--- a/src/Renderer/Twig/Extensions/Markdown.php
+++ b/src/Renderer/Twig/Extensions/Markdown.php
@@ -3,8 +3,8 @@
namespace Engelsystem\Renderer\Twig\Extensions;
use Parsedown;
-use Twig_Extension as TwigExtension;
-use Twig_Filter as TwigFilter;
+use Twig\Extension\AbstractExtension as TwigExtension;
+use Twig\TwigFilter;
class Markdown extends TwigExtension
{
diff --git a/src/Renderer/Twig/Extensions/Session.php b/src/Renderer/Twig/Extensions/Session.php
index 4690f701..378e977e 100644
--- a/src/Renderer/Twig/Extensions/Session.php
+++ b/src/Renderer/Twig/Extensions/Session.php
@@ -3,8 +3,8 @@
namespace Engelsystem\Renderer\Twig\Extensions;
use Symfony\Component\HttpFoundation\Session\Session as SymfonySession;
-use Twig_Extension as TwigExtension;
-use Twig_Function as TwigFunction;
+use Twig\Extension\AbstractExtension as TwigExtension;
+use Twig\TwigFunction;
class Session extends TwigExtension
{
diff --git a/src/Renderer/Twig/Extensions/Translation.php b/src/Renderer/Twig/Extensions/Translation.php
index 929310a1..63b6fa5e 100644
--- a/src/Renderer/Twig/Extensions/Translation.php
+++ b/src/Renderer/Twig/Extensions/Translation.php
@@ -3,9 +3,9 @@
namespace Engelsystem\Renderer\Twig\Extensions;
use Engelsystem\Helpers\Translation\Translator;
-use Twig_Extension as TwigExtension;
-use Twig_Filter as TwigFilter;
-use Twig_Function as TwigFunction;
+use Twig\Extension\AbstractExtension as TwigExtension;
+use Twig\TwigFilter;
+use Twig\TwigFunction;
class Translation extends TwigExtension
{
diff --git a/src/Renderer/Twig/Extensions/Url.php b/src/Renderer/Twig/Extensions/Url.php
index 62e59782..84c6aa4d 100644
--- a/src/Renderer/Twig/Extensions/Url.php
+++ b/src/Renderer/Twig/Extensions/Url.php
@@ -3,8 +3,8 @@
namespace Engelsystem\Renderer\Twig\Extensions;
use Engelsystem\Http\UrlGenerator;
-use Twig_Extension as TwigExtension;
-use Twig_Function as TwigFunction;
+use Twig\Extension\AbstractExtension as TwigExtension;
+use Twig\TwigFunction;
class Url extends TwigExtension
{
diff --git a/src/Renderer/TwigEngine.php b/src/Renderer/TwigEngine.php
index aa51a177..2c77e54f 100644
--- a/src/Renderer/TwigEngine.php
+++ b/src/Renderer/TwigEngine.php
@@ -2,10 +2,10 @@
namespace Engelsystem\Renderer;
-use Twig_Environment as Twig;
-use Twig_Error_Loader as LoaderError;
-use Twig_Error_Runtime as RuntimeError;
-use Twig_Error_Syntax as SyntaxError;
+use Twig\Environment as Twig;
+use Twig\Error\LoaderError as LoaderError;
+use Twig\Error\RuntimeError as RuntimeError;
+use Twig\Error\SyntaxError as SyntaxError;
class TwigEngine extends Engine
{
diff --git a/src/Renderer/TwigLoader.php b/src/Renderer/TwigLoader.php
index f20a8764..3c4c8ab8 100644
--- a/src/Renderer/TwigLoader.php
+++ b/src/Renderer/TwigLoader.php
@@ -2,16 +2,16 @@
namespace Engelsystem\Renderer;
-use Twig_Error_Loader;
-use Twig_Loader_Filesystem as FilesystemLoader;
+use Twig\Error\LoaderError as ErrorLoader;
+use Twig\Loader\FilesystemLoader as FilesystemLoader;
class TwigLoader extends FilesystemLoader
{
/**
* @param string $name
* @param bool $throw
- * @return false|string
- * @throws Twig_Error_Loader
+ * @return string|false|null
+ * @throws ErrorLoader
*/
public function findTemplate($name, $throw = true)
{
diff --git a/src/Renderer/TwigServiceProvider.php b/src/Renderer/TwigServiceProvider.php
index 6cd885fd..3a365a5e 100644
--- a/src/Renderer/TwigServiceProvider.php
+++ b/src/Renderer/TwigServiceProvider.php
@@ -14,9 +14,9 @@ use Engelsystem\Renderer\Twig\Extensions\Markdown;
use Engelsystem\Renderer\Twig\Extensions\Session;
use Engelsystem\Renderer\Twig\Extensions\Translation;
use Engelsystem\Renderer\Twig\Extensions\Url;
-use Twig_Environment as Twig;
-use Twig_Extension_Core as TwigCore;
-use Twig_LoaderInterface as TwigLoaderInterface;
+use Twig\Environment as Twig;
+use Twig\Extension\CoreExtension as TwigCore;
+use Twig\Loader\LoaderInterface as TwigLoaderInterface;
class TwigServiceProvider extends ServiceProvider
{