Skip to content

Commit

Permalink
Use system temp dir for uml
Browse files Browse the repository at this point in the history
  • Loading branch information
jaapio committed Jul 19, 2023
1 parent f11e5c8 commit 0a51254
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

use function file_get_contents;
use function file_put_contents;
use function sys_get_temp_dir;
use function tempnam;

class PlantumlRenderer implements DiagramRenderer
Expand All @@ -41,7 +42,7 @@ public function render(string $diagram): string|null
@enduml
PUML;

$pumlFileLocation = tempnam('phpdocumentor', 'pu_');
$pumlFileLocation = tempnam(sys_get_temp_dir() . '/phpdocumentor', 'pu_');
file_put_contents($pumlFileLocation, $output);

$process = new Process([$this->plantUmlBinaryPath, '-tsvg', $pumlFileLocation], __DIR__, null, null, 600.0);
Expand Down

0 comments on commit 0a51254

Please sign in to comment.