Mono-repo updates for release#31
Merged
Merged
Conversation
- Add private static getter helpers in JsonParseNode that accept raw values directly, avoiding intermediate parse node allocation - Optimize getCollectionOfPrimitiveValues in JsonParseNode to use static helpers for common primitive types (bool, string, int, float, Date, Time) - Optimize getCollectionOfEnumValues in JsonParseNode to create enum instances directly without intermediate parse nodes - Simplify getCollectionOfObjectValues in JsonParseNode to use single pass instead of double array_map - Add private static getter helpers in FormParseNode that accept raw values - Extract isNull() logic to static isNullRaw() helper in FormParseNode - Optimize getCollectionOfPrimitiveValues in FormParseNode to use static helpers - Optimize getCollectionOfEnumValues in FormParseNode to avoid intermediate nodes Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
- Add JsonParseNodeTest: GetCollectionOfEnumValues (happy path, filters nulls, returns null for non-array, throws for invalid class) - Add JsonParseNodeTest: getCollectionOfPrimitiveValues for strings, booleans, floats, nulls, Date, Time and Enum types; null for non-array - Add FormParseNodeTest: getChildNode (non-array, missing key, existing key, url-encoded key) - Add FormParseNodeTest: getObjectValue defensive paths (invalid type, undefined method, null node, null-string node) - Add FormParseNodeTest: getCollectionOfPrimitiveValues for strings, booleans, floats, Date, Time and Enum types; null for non-array Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Use unambiguously true values ('true', '1', 'yes') instead of testing
the 'false' edge case where filter_var returns false-as-falsy and the
current implementation maps it to null
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
getBooleanValueFromRaw used a plain filter_var boolean check which
evaluates 'false' → PHP false and then the ternary returned null instead
of false. Switch to FILTER_NULL_ON_FAILURE so filter_var returns null
only for unrecognised strings ('invalid') and returns the correct
bool(false) for 'false', '0', 'no', 'off'.
Update the collection-of-booleans unit test to use ['true','true','false']
and assert [true, true, false].
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
1. testGetChildNodeWithUrlEncodedKey: sanitizeKey() URL-decodes the identifier before array lookup, so the array must use the *decoded* key. Change the node array from ['first%20name' => 'Alice'] to ['first name' => 'Alice'] so the lookup succeeds. 2. testGetObjectValueThrowsForUndefinedMethod: is_callable($type, true) uses syntax-only checking and always returns true for [Class, 'any']. Change to is_callable($type, false) to perform a real runtime check that validates the method actually exists, allowing the InvalidArgumentException to be thrown as expected. Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
baywet
approved these changes
Mar 16, 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.
This PR contains updates from the kiota-php monorepo. Merging these changes will trigger tagging and a GitHub release on this repository.