microsoftgraph / microsoftgraph/msgraph-sdk-php

ChangeType enum not handling capitalized values

Open
#1,426 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
669
Forks
150
Avg merge
15h 21m
Merged PRs (30d)
3

Description

We are using v1 (1.109.2) and are seeing problems when handling change notifications: "unhandled enum value Updated"
Model/ChangeType.php is stating that it only supports updated/deleted/created (note the lower case words).
Notifications apparently have Updated/Deleted/Created (since a new update on the Graph servers ?).

We are seeing this when calling ChangeNotification::getChangeType().
The ChangeNotification object has been created when handling the incoming request that we receive, something like this:

$notificationData = $request->getDecodedJsonContent();
$notification = new ChangeNotification($notificationData);
$changeType = $notification->getChangeType();     <===== Throws!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Model/ChangeType.php and the ChangeNotification::getChangeType() path named in the report. Reproduce the failure with a notification containing the capitalized Updated, Deleted, or Created value, then verify that each value is handled without the unhandled enum error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.