Skip to content

Commit

Permalink
Allow to use any symfony/process version
Browse files Browse the repository at this point in the history
  • Loading branch information
ngekoding committed May 31, 2024
1 parent 62aea83 commit 4006266
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 90 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
vendor
composer.lock

# TEST
files
Expand Down
7 changes: 1 addition & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
"name": "ngekoding/office-to-pdf",
"description": "Convert any office files to pdf format",
"type": "library",
"config": {
"platform": {
"php": "5.6"
}
},
"license": "MIT",
"authors": [
{
Expand All @@ -20,6 +15,6 @@
}
},
"require": {
"symfony/process": "^3.4"
"symfony/process": "*"
}
}
83 changes: 0 additions & 83 deletions composer.lock

This file was deleted.

7 changes: 6 additions & 1 deletion src/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ public function convert($source, $destination = NULL)

$command = sprintf($this->baseCommand, $this->libreOfficePath, $outdir, $source);

$process = new Process($command);
if (method_exists(Process::class, 'fromShellCommandline')) {
$process = Process::fromShellCommandline($command);
} else {
$process = new Process($command);
}

$process->setTimeout($this->timeout);
$process->run();

Expand Down

0 comments on commit 4006266

Please sign in to comment.