Skip to content

Commit

Permalink
Added support for symfony process 5
Browse files Browse the repository at this point in the history
  • Loading branch information
le0daniel committed Jul 10, 2020
1 parent df51376 commit a9fc9d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"require": {
"php": "^7.2",
"laravel/framework": "^6||^7",
"symfony/process":"~3.0||~4.0"
"symfony/process":"~4.0||^5"
}
}
11 changes: 5 additions & 6 deletions src/Upload/CatFileCombiner.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ class CatFileCombiner implements FileCombiner
public function combineFiles(array $filesToCombine, string $absoluteOutputPath): bool
{
// Merge All files together
$command = sprintf(
'cat %s > %s',
implode(' ', array_map('escapeshellarg', $filesToCombine)),
escapeshellarg($absoluteOutputPath)
);
$command = ['cat'];
array_push($command, ...$filesToCombine);
$command[] = '>';
$command[] = $absoluteOutputPath;

// Set the timeout depending on the mode the app is running
// Larger files are always processed in the background
Expand All @@ -42,4 +41,4 @@ public function combineFiles(array $filesToCombine, string $absoluteOutputPath):

return file_exists($absoluteOutputPath);
}
}
}

0 comments on commit a9fc9d1

Please sign in to comment.