Skip to content

PCBC-1052: Initialize timeout to null in search/collection mgmt options blocks#247

Merged
DemetrisChr merged 1 commit intocouchbase:mainfrom
DemetrisChr:PCBC-1052-timeout-option-search-coll-mgmt
Mar 11, 2026
Merged

PCBC-1052: Initialize timeout to null in search/collection mgmt options blocks#247
DemetrisChr merged 1 commit intocouchbase:mainfrom
DemetrisChr:PCBC-1052-timeout-option-search-coll-mgmt

Conversation

@DemetrisChr
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a minor but important initialization issue: in 18 Options classes under Couchbase/Management/, the private ?int $timeoutMilliseconds property was declared without an explicit default value. While PHP implicitly treats uninitialized properties as unset (which can trigger deprecation warnings or errors in strict contexts), the fix aligns these classes with the rest of the codebase and ensures consistent, predictable behavior.

Changes:

  • Adds = null to the $timeoutMilliseconds property declaration in 11 search index management options classes and 7 collection/scope management options classes.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Couchbase/Management/AllowQueryingSearchIndexOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/AnalyzeDocumentOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/CreateCollectionOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/CreateScopeOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/DisallowQueryingSearchIndexOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/DropCollectionOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/DropScopeOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/DropSearchIndexOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/FreezePlanSearchIndexOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/GetAllScopesOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/GetAllSearchIndexesOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/GetIndexedSearchIndexOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/GetSearchIndexOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/PauseIngestSearchIndexOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/ResumeIngestSearchIndexOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/UnfreezePlanSearchIndexOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/UpdateCollectionOptions.php Initialize $timeoutMilliseconds = null
Couchbase/Management/UpsertSearchIndexOptions.php Initialize $timeoutMilliseconds = null

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DemetrisChr DemetrisChr merged commit ed42583 into couchbase:main Mar 11, 2026
151 checks passed
@DemetrisChr DemetrisChr deleted the PCBC-1052-timeout-option-search-coll-mgmt branch March 11, 2026 10:17
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.

3 participants