From bd71b09946bc449a70d7c0f36623617c45035bf5 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 20 Jul 2026 12:18:06 +0200 Subject: [PATCH] fix(helpers): prevent warnings when loading database helpers --- bootstrap/helpers/databases.php | 2 -- tests/Unit/HelperSyntaxTest.php | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 tests/Unit/HelperSyntaxTest.php diff --git a/bootstrap/helpers/databases.php b/bootstrap/helpers/databases.php index 8f4f373b7..03a2e4fa3 100644 --- a/bootstrap/helpers/databases.php +++ b/bootstrap/helpers/databases.php @@ -17,10 +17,8 @@ use App\Models\SwarmDocker; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; -use RuntimeException; use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; use Symfony\Component\HttpFoundation\StreamedResponse; -use Throwable; function create_standalone_postgresql($environmentId, StandaloneDocker|SwarmDocker $destination, ?array $otherData = null, string $databaseImage = 'postgres:16-alpine'): StandalonePostgresql { diff --git a/tests/Unit/HelperSyntaxTest.php b/tests/Unit/HelperSyntaxTest.php new file mode 100644 index 000000000..e4c0af235 --- /dev/null +++ b/tests/Unit/HelperSyntaxTest.php @@ -0,0 +1,20 @@ +run(); + + expect($process->isSuccessful())->toBeTrue() + ->and($process->getOutput().$process->getErrorOutput())->not->toContain('Warning'); +});