Expose filter operator on Responses\Filter#27
Merged
Conversation
Adds the required `operator` field to `Responses\Filter` so clients can
read the comparison operator that the server stored alongside the filter
field and value. The Notification API guarantees `operator` is always
present in responses (server defaults to '==' when omitted in the
request), so the property is a non-nullable string.
Tests now cover all operator values ('==', '<', '>', '<=', '>=') and a
missing-operator payload throws ClientException. Mock responses in the
functional test suite were updated to include the new field.
Contributor
Author
|
There was a problem hiding this comment.
Pull request overview
Adds an operator property to the Responses\Filter class so API consumers can read the comparison operator (e.g. ==, <, >=) returned by the Notification API alongside subscription filter fields and values.
Changes:
- Adds non-nullable
string $operatorproperty andgetOperator()accessor onResponses\Filter. - Updates existing Filter/Subscription tests to include
operatorin payloads and assert the new accessor. - Adds new tests covering all five operator values and a missing-operator failure case.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Responses/Filter.php | Adds $operator property, assigns it from $data['operator'], and exposes getOperator(). |
| tests/Responses/FilterTest.php | Updates existing cases with operator, adds testOperators data provider and testMissingOperator. |
| tests/Responses/SubscriptionTest.php | Adds operator to mock data and asserts getOperator() on the filter. |
| tests/SubscriptionClientFunctionalTest.php | Adds operator to functional test payloads and asserts getOperator() for single and list endpoints. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
odinuv
approved these changes
May 15, 2026
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.
Summary
Adds the required
operatorfield toResponses\Filterso clients can read the comparison operator that the server stored alongside the filter field and value.The Notification API guarantees
operatoris always present in subscription filter responses — the server defaults to==when the field is omitted in the request — so the property is a non-nullablestring.Changes
src/Responses/Filter.php— newstring $operatorproperty assigned from$data['operator'], newgetOperator(): stringaccessor.tests/Responses/FilterTest.php— existing test datasets updated to includeoperator, newtestOperatorsdata provider covering all five values (==,<,>,<=,>=), and a newtestMissingOperatorasserting that a payload withoutoperatorraisesClientException.tests/Responses/SubscriptionTest.php— mock data extended withoperatorplus an assertion ongetOperator().tests/SubscriptionClientFunctionalTest.php—operatoradded to the two response payloads andgetOperator()asserted in both the single-subscription and list endpoints.