Skip to content

Commit 0a51254

Browse files
committed
Use system temp dir for uml
1 parent f11e5c8 commit 0a51254

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/guides-graphs/src/Graphs/Renderer/PlantumlRenderer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
use function file_get_contents;
2020
use function file_put_contents;
21+
use function sys_get_temp_dir;
2122
use function tempnam;
2223

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

44-
$pumlFileLocation = tempnam('phpdocumentor', 'pu_');
45+
$pumlFileLocation = tempnam(sys_get_temp_dir() . '/phpdocumentor', 'pu_');
4546
file_put_contents($pumlFileLocation, $output);
4647

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

0 commit comments

Comments
 (0)