From 2a4247684d9906a356302eccb8ae67ecb575412c Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 2 Aug 2024 18:35:36 +0100 Subject: [PATCH] Group talk classes into a `modules` directory --- app/config/sculpin_kernel.yml | 2 +- composer.json | 6 +----- .../Talk/Tests/TwigExtension/TalkTwigExtensionTest.php | 10 +++++----- .../Talk/TwigExtension/TalkTwigExtension.php | 4 ++-- phpunit.xml.dist | 4 ++-- 5 files changed, 11 insertions(+), 15 deletions(-) rename tests/Opdavies/TwigExtension/OpdaviesTwigExtensionTest.php => modules/Talk/Tests/TwigExtension/TalkTwigExtensionTest.php (94%) rename src/Opdavies/TwigExtension/OpdaviesTwigExtension.php => modules/Talk/TwigExtension/TalkTwigExtension.php (92%) diff --git a/app/config/sculpin_kernel.yml b/app/config/sculpin_kernel.yml index 66e62640..ac9664c2 100644 --- a/app/config/sculpin_kernel.yml +++ b/app/config/sculpin_kernel.yml @@ -12,6 +12,6 @@ sculpin_content_types: permalink: /talks/:basename/ services: - App\Opdavies\TwigExtension\OpdaviesTwigExtension: + Modules\Talk\TwigExtension\TalkTwigExtension: tags: - {name: twig.extension} diff --git a/composer.json b/composer.json index 6e87e2fa..5397a438 100644 --- a/composer.json +++ b/composer.json @@ -11,11 +11,7 @@ }, "autoload": { "psr-4": { - "App\\": "src" } - }, - "autoload-dev": { - "psr-4": { - "App\\Tests\\": "tests" } + "Modules\\": "modules/" } }, "require-dev": { "phpunit/phpunit": "^11.1" diff --git a/tests/Opdavies/TwigExtension/OpdaviesTwigExtensionTest.php b/modules/Talk/Tests/TwigExtension/TalkTwigExtensionTest.php similarity index 94% rename from tests/Opdavies/TwigExtension/OpdaviesTwigExtensionTest.php rename to modules/Talk/Tests/TwigExtension/TalkTwigExtensionTest.php index ebd03d46..3c8c0e25 100644 --- a/tests/Opdavies/TwigExtension/OpdaviesTwigExtensionTest.php +++ b/modules/Talk/Tests/TwigExtension/TalkTwigExtensionTest.php @@ -1,19 +1,19 @@ extension = new OpdaviesTwigExtension(); + $this->extension = new TalkTwigExtension(); } public function testNoPastEvents(): void diff --git a/src/Opdavies/TwigExtension/OpdaviesTwigExtension.php b/modules/Talk/TwigExtension/TalkTwigExtension.php similarity index 92% rename from src/Opdavies/TwigExtension/OpdaviesTwigExtension.php rename to modules/Talk/TwigExtension/TalkTwigExtension.php index 6d664998..726cd89c 100644 --- a/src/Opdavies/TwigExtension/OpdaviesTwigExtension.php +++ b/modules/Talk/TwigExtension/TalkTwigExtension.php @@ -1,12 +1,12 @@ - - tests + + modules