Skip to content

Fix PHP 8.4 / 8.5 deprecations (implicit nullable params, curl_close)#293

Open
jpxd wants to merge 4 commits into
bigbluebutton:masterfrom
jpxd:fix/php84-85-deprecations
Open

Fix PHP 8.4 / 8.5 deprecations (implicit nullable params, curl_close)#293
jpxd wants to merge 4 commits into
bigbluebutton:masterfrom
jpxd:fix/php84-85-deprecations

Conversation

@jpxd
Copy link
Copy Markdown

@jpxd jpxd commented Jun 4, 2026

This makes the library clean under PHP 8.4 and 8.5 with a minimal, behaviour-preserving diff (the curl transport is otherwise untouched).

PHP 8.4 — implicit nullable parameters

Parameters typed string $x = null are implicitly nullable, which is deprecated in PHP 8.4. Added an explicit ? to all affected signatures:

  • EndMeetingParameters::__construct()
  • IsMeetingRunningParameters::__construct()
  • DeleteRecordingsParameters::__construct()
  • UpdateRecordingsParameters::__construct()
  • InsertDocumentParameters::__construct()
  • GetRecordingTextTracksParameters::__construct()
  • PutRecordingTextTrackParameters::__construct()
  • DocumentableTrait::addPresentation() ($attributes)

PHP 8.5 — curl_close()

curl_close() is deprecated as of PHP 8.5 (it has had no effect since PHP 8.0, where the curl handle became a CurlHandle object freed by the garbage collector). Removed the call in sendRequest().

Bonus: presentation serialization fixes

While adding ? to addPresentation() I noticed getPresentationsAsXML() was broken for presentations added without attributes/content (the existing tests/Parameters cases for URL/file presentations errored):

  • null->getAttributes() fatal when no DocumentOptionsStore was passed → now guarded.
  • URL-only documents serialized as <document url="...">1</document>, because !$content ?: base64_encode($content) yields true for null content → now stored as null.

These two one-liners turn the previously red tests/Parameters presentation tests green. Happy to split them into a separate PR if preferred.

Verification

  • php -l clean on all files (PHP 8.5)
  • Deprecation reproduction: emitted before, clean after
  • tests/Parameters + tests/Responses: 18/18 green

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant