Skip to content

Mono-repo updates for release#31

Merged
microsoft-graph-devx-bot[bot] merged 6 commits into
mainfrom
release/serialization-form
Mar 16, 2026
Merged

Mono-repo updates for release#31
microsoft-graph-devx-bot[bot] merged 6 commits into
mainfrom
release/serialization-form

Conversation

@microsoft-graph-devx-bot
Copy link
Copy Markdown
Contributor

This PR contains updates from the kiota-php monorepo. Merging these changes will trigger tagging and a GitHub release on this repository.

Copilot AI and others added 6 commits March 12, 2026 14:14
- 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>
@microsoft-graph-devx-bot microsoft-graph-devx-bot Bot requested a review from a team as a code owner March 16, 2026 12:26
@microsoft-graph-devx-bot microsoft-graph-devx-bot Bot merged commit 3d4013f into main Mar 16, 2026
8 of 14 checks passed
@microsoft-graph-devx-bot microsoft-graph-devx-bot Bot deleted the release/serialization-form branch March 16, 2026 13:28
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.

2 participants