Skip to content

Commit fc1e374

Browse files
committedOct 16, 2024
fix: wkhtmltopdf factory
1 parent dcd1046 commit fc1e374

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed
 

‎src/Backend/WkHtmlToPdf/WkHtmlToPdfFactory.php

+10-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
use KNPLabs\Snappy\Core\Backend\Adapter;
88
use KNPLabs\Snappy\Core\Backend\Factory;
99
use KNPLabs\Snappy\Core\Backend\Options;
10-
use SplFileInfo;
10+
use Psr\Http\Message\StreamFactoryInterface;
11+
use Psr\Http\Message\UriFactoryInterface;
1112

1213
/**
1314
* @implements Factory<WkHtmlToPdfAdapter>
@@ -18,9 +19,12 @@ final class WkHtmlToPdfFactory implements Factory
1819
* @param non-empty-string $binary
1920
* @param positive-int $timeout
2021
*/
21-
public function __construct(private readonly string $binary, private readonly int $timeout)
22-
{
23-
22+
public function __construct(
23+
private readonly string $binary,
24+
private readonly int $timeout,
25+
private readonly StreamFactoryInterface $streamFactory,
26+
private readonly UriFactoryInterface $uriFactory,
27+
) {
2428
}
2529

2630
public function create(Options $options): Adapter
@@ -30,6 +34,8 @@ public function create(Options $options): Adapter
3034
$this->timeout,
3135
$this,
3236
$options,
37+
$this->streamFactory,
38+
$this->uriFactory,
3339
);
3440
}
3541
}

0 commit comments

Comments
 (0)