From 51cd9ffdca22750bf9e1ff630eb63cf9138740dc Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 3 Sep 2024 20:53:35 +0100 Subject: [PATCH] Split `src/` and `tests/` directories --- app/config/sculpin_kernel.yml | 4 ++-- composer.json | 8 +++++++- phpunit.xml.dist | 4 ++-- .../Experience/TwigExtension/ExperienceTwigExtension.php | 4 ++-- .../TwigExtension/PresentationTwigExtension.php | 4 ++-- .../TwigExtension/PresentationTwigExtensionTest.php | 4 ++-- 6 files changed, 17 insertions(+), 11 deletions(-) rename {modules => src}/Experience/TwigExtension/ExperienceTwigExtension.php (87%) rename {modules => src}/Presentations/TwigExtension/PresentationTwigExtension.php (91%) rename {modules/Presentations/Tests => tests}/TwigExtension/PresentationTwigExtensionTest.php (97%) diff --git a/app/config/sculpin_kernel.yml b/app/config/sculpin_kernel.yml index a073187e..37fc63d4 100644 --- a/app/config/sculpin_kernel.yml +++ b/app/config/sculpin_kernel.yml @@ -12,9 +12,9 @@ sculpin_content_types: permalink: /presentations/:basename/ services: - Modules\Experience\TwigExtension\ExperienceTwigExtension: + App\Experience\TwigExtension\ExperienceTwigExtension: tags: - {name: twig.extension} - Modules\Presentations\TwigExtension\PresentationTwigExtension: + App\Presentations\TwigExtension\PresentationTwigExtension: tags: - {name: twig.extension} diff --git a/composer.json b/composer.json index 5397a438..83f1ea95 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,13 @@ }, "autoload": { "psr-4": { - "Modules\\": "modules/" } + "App\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } }, "require-dev": { "phpunit/phpunit": "^11.1" diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e23be814..5d785540 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,8 +1,8 @@ - - modules + + tests diff --git a/modules/Experience/TwigExtension/ExperienceTwigExtension.php b/src/Experience/TwigExtension/ExperienceTwigExtension.php similarity index 87% rename from modules/Experience/TwigExtension/ExperienceTwigExtension.php rename to src/Experience/TwigExtension/ExperienceTwigExtension.php index 378e0729..56886e56 100644 --- a/modules/Experience/TwigExtension/ExperienceTwigExtension.php +++ b/src/Experience/TwigExtension/ExperienceTwigExtension.php @@ -1,6 +1,6 @@