fix(helpers): prevent warnings when loading database helpers

This commit is contained in:
Andras Bacsai
2026-07-20 12:18:06 +02:00
parent ee36124300
commit bd71b09946
2 changed files with 20 additions and 2 deletions
-2
View File
@@ -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
{
+20
View File
@@ -0,0 +1,20 @@
<?php
use Symfony\Component\Process\Process;
it('loads the database helper without PHP warnings', function () {
$process = new Process([
PHP_BINARY,
'-d',
'display_errors=1',
'-d',
'error_reporting=E_ALL',
'-l',
__DIR__.'/../../bootstrap/helpers/databases.php',
]);
$process->run();
expect($process->isSuccessful())->toBeTrue()
->and($process->getOutput().$process->getErrorOutput())->not->toContain('Warning');
});