mirror of
https://github.com/opdavies/versa.git
synced 2025-02-08 18:35:03 +00:00
Ensure explode is passed a string and not null
Passing `null` to `explode()` is deprecated.
This commit is contained in:
parent
14fbbec987
commit
52d933bc5e
|
@ -64,7 +64,7 @@ final class BuildCommand extends AbstractCommand
|
||||||
if ($isDockerCompose) {
|
if ($isDockerCompose) {
|
||||||
$process = Process::create(
|
$process = Process::create(
|
||||||
command: ['docker', 'compose', 'build'],
|
command: ['docker', 'compose', 'build'],
|
||||||
extraArgs: explode(separator: ' ', string: $extraArgs),
|
extraArgs: explode(separator: ' ', string: strval($extraArgs)),
|
||||||
workingDir: $workingDir,
|
workingDir: $workingDir,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ final class BuildCommand extends AbstractCommand
|
||||||
case ProjectType::Sculpin->value:
|
case ProjectType::Sculpin->value:
|
||||||
$process = Process::create(
|
$process = Process::create(
|
||||||
command: ['./vendor/bin/sculpin', 'generate'],
|
command: ['./vendor/bin/sculpin', 'generate'],
|
||||||
extraArgs: explode(separator: ' ', string: $extraArgs),
|
extraArgs: explode(separator: ' ', string: strval($extraArgs)),
|
||||||
workingDir: $workingDir,
|
workingDir: $workingDir,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ final class BuildCommand extends AbstractCommand
|
||||||
case ProjectType::Fractal->value:
|
case ProjectType::Fractal->value:
|
||||||
$process = Process::create(
|
$process = Process::create(
|
||||||
command: ['npx', 'fractal', 'build'],
|
command: ['npx', 'fractal', 'build'],
|
||||||
extraArgs: explode(separator: ' ', string: $extraArgs),
|
extraArgs: explode(separator: ' ', string: strval($extraArgs)),
|
||||||
workingDir: $workingDir,
|
workingDir: $workingDir,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ final class InstallCommand extends AbstractCommand
|
||||||
language: $language,
|
language: $language,
|
||||||
workingDir: $workingDir,
|
workingDir: $workingDir,
|
||||||
),
|
),
|
||||||
extraArgs: explode(separator: ' ', string: $extraArgs),
|
extraArgs: explode(separator: ' ', string: strval($extraArgs)),
|
||||||
workingDir: $workingDir,
|
workingDir: $workingDir,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ final class Process
|
||||||
/**
|
/**
|
||||||
* @param non-empty-array<int, non-empty-string> $command
|
* @param non-empty-array<int, non-empty-string> $command
|
||||||
* @param string $workingDir
|
* @param string $workingDir
|
||||||
* @param non-empty-string[] $extraArgs
|
* @param string[] $extraArgs
|
||||||
*/
|
*/
|
||||||
public static function create(array $command, string $workingDir, array $extraArgs = []): SymfonyProcess
|
public static function create(array $command, string $workingDir, array $extraArgs = []): SymfonyProcess
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue