From 692a731669e78e3cd5cb4cf7e5f87632d50a0816 Mon Sep 17 00:00:00 2001 From: Jan Dahms Date: Thu, 4 Jun 2026 18:26:49 +0200 Subject: [PATCH 1/4] Add explicit nullable types to parameters for PHP 8.4 compatibility. --- src/Parameters/DeleteRecordingsParameters.php | 2 +- src/Parameters/DocumentableTrait.php | 2 +- src/Parameters/EndMeetingParameters.php | 2 +- src/Parameters/GetRecordingTextTracksParameters.php | 2 +- src/Parameters/InsertDocumentParameters.php | 2 +- src/Parameters/IsMeetingRunningParameters.php | 2 +- src/Parameters/PutRecordingTextTrackParameters.php | 2 +- src/Parameters/UpdateRecordingsParameters.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Parameters/DeleteRecordingsParameters.php b/src/Parameters/DeleteRecordingsParameters.php index 028d13d0..deac0c7d 100644 --- a/src/Parameters/DeleteRecordingsParameters.php +++ b/src/Parameters/DeleteRecordingsParameters.php @@ -27,7 +27,7 @@ class DeleteRecordingsParameters extends BaseParameters { private ?string $recordingId = null; - public function __construct(string $recordingId = null) + public function __construct(?string $recordingId = null) { $this->recordingId = $recordingId; } diff --git a/src/Parameters/DocumentableTrait.php b/src/Parameters/DocumentableTrait.php index 501e9e6b..4cb16b08 100644 --- a/src/Parameters/DocumentableTrait.php +++ b/src/Parameters/DocumentableTrait.php @@ -37,7 +37,7 @@ public function getPresentations(): array return $this->presentations; } - public function addPresentation(string $nameOrUrl, $content = null, ?string $filename = null, DocumentOptionsStore $attributes = null): self + public function addPresentation(string $nameOrUrl, $content = null, ?string $filename = null, ?DocumentOptionsStore $attributes = null): self { $this->presentations[$nameOrUrl] = [ 'content' => !$content ?: base64_encode($content), diff --git a/src/Parameters/EndMeetingParameters.php b/src/Parameters/EndMeetingParameters.php index ea948a6c..c23c458b 100644 --- a/src/Parameters/EndMeetingParameters.php +++ b/src/Parameters/EndMeetingParameters.php @@ -32,7 +32,7 @@ class EndMeetingParameters extends BaseParameters */ private ?string $password = null; - public function __construct(string $meetingId = null, string $password = null) + public function __construct(?string $meetingId = null, ?string $password = null) { $this->password = $password; $this->meetingId = $meetingId; diff --git a/src/Parameters/GetRecordingTextTracksParameters.php b/src/Parameters/GetRecordingTextTracksParameters.php index fd5bea78..804af3b6 100644 --- a/src/Parameters/GetRecordingTextTracksParameters.php +++ b/src/Parameters/GetRecordingTextTracksParameters.php @@ -30,7 +30,7 @@ class GetRecordingTextTracksParameters extends MetaParameters /** * GetRecordingTextTracksParameters constructor. */ - public function __construct(string $recordId = null) + public function __construct(?string $recordId = null) { $this->recordId = $recordId; } diff --git a/src/Parameters/InsertDocumentParameters.php b/src/Parameters/InsertDocumentParameters.php index 722d7a3f..671e849d 100644 --- a/src/Parameters/InsertDocumentParameters.php +++ b/src/Parameters/InsertDocumentParameters.php @@ -29,7 +29,7 @@ class InsertDocumentParameters extends BaseParameters private ?string $meetingId = null; - public function __construct(string $meetingId = null) + public function __construct(?string $meetingId = null) { $this->meetingId = $meetingId; } diff --git a/src/Parameters/IsMeetingRunningParameters.php b/src/Parameters/IsMeetingRunningParameters.php index e06c8655..f7cfa7ae 100644 --- a/src/Parameters/IsMeetingRunningParameters.php +++ b/src/Parameters/IsMeetingRunningParameters.php @@ -27,7 +27,7 @@ class IsMeetingRunningParameters extends BaseParameters { private ?string $meetingId = null; - public function __construct(string $meetingId = null) + public function __construct(?string $meetingId = null) { $this->meetingId = $meetingId; } diff --git a/src/Parameters/PutRecordingTextTrackParameters.php b/src/Parameters/PutRecordingTextTrackParameters.php index eae808ba..ab8e0409 100644 --- a/src/Parameters/PutRecordingTextTrackParameters.php +++ b/src/Parameters/PutRecordingTextTrackParameters.php @@ -36,7 +36,7 @@ class PutRecordingTextTrackParameters extends BaseParameters /** * PutRecordingTextTrackParameters constructor. */ - public function __construct(string $recordId = null, string $kind = null, string $lang = null, string $label = null) + public function __construct(?string $recordId = null, ?string $kind = null, ?string $lang = null, ?string $label = null) { $this->recordId = $recordId; $this->kind = $kind; diff --git a/src/Parameters/UpdateRecordingsParameters.php b/src/Parameters/UpdateRecordingsParameters.php index b36109c1..b0fe770e 100644 --- a/src/Parameters/UpdateRecordingsParameters.php +++ b/src/Parameters/UpdateRecordingsParameters.php @@ -27,7 +27,7 @@ class UpdateRecordingsParameters extends MetaParameters { private ?string $recordingId = null; - public function __construct(string $recordingId = null) + public function __construct(?string $recordingId = null) { $this->recordingId = $recordingId; } From 083db6a43dc664ebc65d708a1787d7f1325de2e7 Mon Sep 17 00:00:00 2001 From: Jan Dahms Date: Thu, 4 Jun 2026 18:26:49 +0200 Subject: [PATCH 2/4] Remove deprecated curl_close() call for PHP 8.5 compatibility. --- src/BigBlueButton.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/BigBlueButton.php b/src/BigBlueButton.php index 414b1127..a969b36f 100644 --- a/src/BigBlueButton.php +++ b/src/BigBlueButton.php @@ -603,8 +603,10 @@ private function sendRequest(string $url, string $payload = '', string $contentT throw new BadResponseException('Bad response, HTTP code: ' . $httpCode . ', url: ' . $url); } - // CLOSE AND UNSET - curl_close($ch); + // UNSET + // Note: curl_close() is intentionally omitted. Since PHP 8.0 the curl handle is a + // CurlHandle object that is freed automatically by the garbage collector once unset, + // curl_close() has no effect and was deprecated in PHP 8.5. unset($ch); // RETURN From bc103e1ea24cab2b08b2a9300f0a330608f4fea0 Mon Sep 17 00:00:00 2001 From: Jan Dahms Date: Thu, 4 Jun 2026 18:43:40 +0200 Subject: [PATCH 3/4] Guard against missing presentation attributes in getPresentationsAsXML(). --- src/Parameters/DocumentableTrait.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Parameters/DocumentableTrait.php b/src/Parameters/DocumentableTrait.php index 4cb16b08..bf301ac2 100644 --- a/src/Parameters/DocumentableTrait.php +++ b/src/Parameters/DocumentableTrait.php @@ -73,8 +73,10 @@ public function getPresentationsAsXML(): string } // Add attributes using DocumentAttributes class - foreach ($data['attributes']->getAttributes() as $attrName => $attrValue) { - $presentation->addAttribute($attrName, $attrValue); + if ($data['attributes'] instanceof DocumentOptionsStore) { + foreach ($data['attributes']->getAttributes() as $attrName => $attrValue) { + $presentation->addAttribute($attrName, $attrValue); + } } } $result = $xml->asXML(); From b3e030e8f4d0dc623d9618ede69386c64b6cc8e0 Mon Sep 17 00:00:00 2001 From: Jan Dahms Date: Thu, 4 Jun 2026 18:45:37 +0200 Subject: [PATCH 4/4] Fix presentation content serialization for URL-only documents. --- src/Parameters/DocumentableTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Parameters/DocumentableTrait.php b/src/Parameters/DocumentableTrait.php index bf301ac2..9f7b344c 100644 --- a/src/Parameters/DocumentableTrait.php +++ b/src/Parameters/DocumentableTrait.php @@ -40,7 +40,7 @@ public function getPresentations(): array public function addPresentation(string $nameOrUrl, $content = null, ?string $filename = null, ?DocumentOptionsStore $attributes = null): self { $this->presentations[$nameOrUrl] = [ - 'content' => !$content ?: base64_encode($content), + 'content' => null !== $content ? base64_encode($content) : null, 'filename' => $filename, 'attributes' => $attributes ];