Skip to content

Commit 067eecf

Browse files
authored
Support PHP 8.5 (#79)
### PHP 8.4 changes: - Function parameters that are null by default must be declared nullable. ### Other changes: - Remove unused patches (the patched library is no longer in use). - Cleanup phpstan baseline.
2 parents 4d588fe + 53f546a commit 067eecf

3 files changed

Lines changed: 122 additions & 150 deletions

File tree

library/Pdfexport/HeadlessChrome.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use React\Promise\ExtendedPromiseInterface;
1919
use Throwable;
2020
use WebSocket\Client;
21-
use WebSocket\ConnectionException;
2221

2322
class HeadlessChrome
2423
{
@@ -535,7 +534,7 @@ private function printToPDF($socket, $browserId, array $parameters)
535534

536535
try {
537536
$browser->close();
538-
} catch (ConnectionException $e) {
537+
} catch (Throwable $e) {
539538
// For some reason, the browser doesn't send a response
540539
Logger::debug(sprintf('Failed to close browser connection: ' . $e->getMessage()));
541540
}
@@ -637,7 +636,7 @@ private function communicate(Client $ws, $method, $params = null)
637636
return $response['result'];
638637
}
639638

640-
private function waitFor(Client $ws, $eventName, array $expectedParams = null)
639+
private function waitFor(Client $ws, $eventName, ?array $expectedParams = null)
641640
{
642641
if ($eventName !== self::WAIT_FOR_NETWORK) {
643642
Logger::debug(

patches/iio-libmergepdf-support-php82.patch

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)