fix: handle deprecated code related to comments app#41656
Merged
Conversation
Code paths that caused deprecation warnings in PHP 8 have been corrected.
DeepDiver1975
approved these changes
Jun 26, 2026
DeepDiver1975
left a comment
Member
There was a problem hiding this comment.
Reviewed as maintainer. LGTM — clean, minimal, behavior-preserving null-safety fixes for the three PHP 8 deprecation warnings surfaced by the apiComments acceptance scenario:
CommentNode::getProperties()—$this->properties[$property] ?? nullplus a null guard avoidsmethod_exists(null, …)when a client requests an unmapped property; unknown props are skipped exactly as before, and this also silences the related 'Undefined array key' notice.EntityCollection::setReadMarker()—new \DateTime($value ?? 'now')preserves the priornew \DateTime(null)semantics (null was always interpreted as 'now').Server.phpPROPFIND handler —strtolower((string) …)maps a missing Depth header (null) to '', which never matched 'infinity' before either, so behavior is unchanged.
All three are equivalent to the pre-PHP-8 behavior with no functional change. Changelog fragment changelog/unreleased/41656 is present and follows TEMPLATE (Bugfix: …, past-tense body, primary PR ID). CI is green including the PHP Unit matrix and the apiComments acceptance suite. Approving.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Code paths that caused deprecation warnings in PHP 8 have been corrected.
When running a comments app API acceptance test scenario locally, I got the following output:
There are 3 different deprecation warnings emitted. This PR fixes them: