From 75a75343d044f8e1d3d572124a7e666a17aa24cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Fri, 1 Dec 2023 20:27:24 +0100 Subject: [PATCH] Move attributes to Twig\Attribute namespace --- src/{Extension => }/Attribute/AsTwigExtension.php | 2 +- src/{Extension => }/Attribute/AsTwigFilter.php | 2 +- src/{Extension => }/Attribute/AsTwigFunction.php | 2 +- src/{Extension => }/Attribute/AsTwigTest.php | 2 +- src/Extension/AttributeExtension.php | 6 +++--- tests/Extension/Fixtures/ExtensionWithAttributes.php | 8 ++++---- 6 files changed, 11 insertions(+), 11 deletions(-) rename src/{Extension => }/Attribute/AsTwigExtension.php (91%) rename src/{Extension => }/Attribute/AsTwigFilter.php (97%) rename src/{Extension => }/Attribute/AsTwigFunction.php (97%) rename src/{Extension => }/Attribute/AsTwigTest.php (96%) diff --git a/src/Extension/Attribute/AsTwigExtension.php b/src/Attribute/AsTwigExtension.php similarity index 91% rename from src/Extension/Attribute/AsTwigExtension.php rename to src/Attribute/AsTwigExtension.php index 41540d96968..bdbbd44f159 100644 --- a/src/Extension/Attribute/AsTwigExtension.php +++ b/src/Attribute/AsTwigExtension.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Twig\Extension\Attribute; +namespace Twig\Attribute; /** * Identifies a class that uses PHP attributes to define filters, functions, or tests. diff --git a/src/Extension/Attribute/AsTwigFilter.php b/src/Attribute/AsTwigFilter.php similarity index 97% rename from src/Extension/Attribute/AsTwigFilter.php rename to src/Attribute/AsTwigFilter.php index c14128adb68..a253ef353c2 100644 --- a/src/Extension/Attribute/AsTwigFilter.php +++ b/src/Attribute/AsTwigFilter.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Twig\Extension\Attribute; +namespace Twig\Attribute; use Twig\TwigFilter; diff --git a/src/Extension/Attribute/AsTwigFunction.php b/src/Attribute/AsTwigFunction.php similarity index 97% rename from src/Extension/Attribute/AsTwigFunction.php rename to src/Attribute/AsTwigFunction.php index b3301b80f99..c0116817c88 100644 --- a/src/Extension/Attribute/AsTwigFunction.php +++ b/src/Attribute/AsTwigFunction.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Twig\Extension\Attribute; +namespace Twig\Attribute; use Twig\TwigFunction; diff --git a/src/Extension/Attribute/AsTwigTest.php b/src/Attribute/AsTwigTest.php similarity index 96% rename from src/Extension/Attribute/AsTwigTest.php rename to src/Attribute/AsTwigTest.php index f18737089f2..e6ea0fbe151 100644 --- a/src/Extension/Attribute/AsTwigTest.php +++ b/src/Attribute/AsTwigTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Twig\Extension\Attribute; +namespace Twig\Attribute; use Twig\TwigTest; diff --git a/src/Extension/AttributeExtension.php b/src/Extension/AttributeExtension.php index 1464dcaacd4..1be38b20e18 100644 --- a/src/Extension/AttributeExtension.php +++ b/src/Extension/AttributeExtension.php @@ -11,10 +11,10 @@ namespace Twig\Extension; +use Twig\Attribute\AsTwigFilter; +use Twig\Attribute\AsTwigFunction; +use Twig\Attribute\AsTwigTest; use Twig\Environment; -use Twig\Extension\Attribute\AsTwigFilter; -use Twig\Extension\Attribute\AsTwigFunction; -use Twig\Extension\Attribute\AsTwigTest; use Twig\TwigFilter; use Twig\TwigFunction; use Twig\TwigTest; diff --git a/tests/Extension/Fixtures/ExtensionWithAttributes.php b/tests/Extension/Fixtures/ExtensionWithAttributes.php index 3cc44bc0064..f9d65153257 100644 --- a/tests/Extension/Fixtures/ExtensionWithAttributes.php +++ b/tests/Extension/Fixtures/ExtensionWithAttributes.php @@ -2,11 +2,11 @@ namespace Twig\Tests\Extension\Fixtures; +use Twig\Attribute\AsTwigExtension; +use Twig\Attribute\AsTwigFilter; +use Twig\Attribute\AsTwigFunction; +use Twig\Attribute\AsTwigTest; use Twig\Environment; -use Twig\Extension\Attribute\AsTwigExtension; -use Twig\Extension\Attribute\AsTwigFilter; -use Twig\Extension\Attribute\AsTwigFunction; -use Twig\Extension\Attribute\AsTwigTest; #[AsTwigExtension] class ExtensionWithAttributes