-
Notifications
You must be signed in to change notification settings - Fork 19
feat(generated): Authorization (batch c64ce1e7) #447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| * [#447](https://github.com/workos/workos-php/pull/447) feat(generated): regenerate from spec | ||
|
|
||
| **Features** | ||
| * **[user_management](https://workos.com/docs/reference/authkit/user)**: | ||
| * Added model `UserRoleAssignmentSourceGroup` | ||
| * Added `group` to `UserRoleAssignmentSource` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 13ba15b32754d2d635b7799ab779867df2b611d6 | ||
| 6f037208ce812063908f97744b4aaf4fdf570351 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| // This file is auto-generated by oagen. Do not edit. | ||
|
|
||
| namespace WorkOS\Resource; | ||
|
|
||
| readonly class UserRoleAssignmentSourceGroup implements \JsonSerializable | ||
| { | ||
| use JsonSerializableTrait; | ||
|
|
||
| public function __construct( | ||
| /** The unique ID of the Group the role was derived from. */ | ||
| public string $id, | ||
| /** The name of the Group the role was derived from. */ | ||
| public string $name, | ||
| ) { | ||
| } | ||
|
|
||
| public static function fromArray(array $data): self | ||
| { | ||
| return new self( | ||
| id: $data['id'], | ||
| name: $data['name'], | ||
| ); | ||
| } | ||
|
|
||
| public function toArray(): array | ||
| { | ||
| return [ | ||
| 'id' => $this->id, | ||
| 'name' => $this->name, | ||
| ]; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,8 @@ | |
| }, | ||
| "source": { | ||
| "type": "direct", | ||
| "group_role_assignment_id": null | ||
| "group_role_assignment_id": null, | ||
| "group": null | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The assignment fixtures contain only Prompt To Fix With AIThis is a comment left during a code review.
Path: tests/Fixtures/list_user_role_assignment.json
Line: 18
Comment:
**Group assignments lack test coverage**
The assignment fixtures contain only `"group": null`, and no test uses the new fixture with a non-null group. Add a group-derived assignment case that checks decoding and serialization through `UserRoleAssignmentSource`; otherwise a regression in the new nested-group path could pass the test suite.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
| }, | ||
| "created_at": "2026-01-15T12:00:00.000Z", | ||
| "updated_at": "2026-01-15T12:00:00.000Z" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| { | ||
| "type": "direct", | ||
| "group_role_assignment_id": null | ||
| "group_role_assignment_id": null, | ||
| "group": null | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "id": "group_01HXYZ123456789ABCDEFGHIJ", | ||
| "name": "Marketing team" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a consumer constructs
UserRoleAssignmentSourcewith the previously valid two arguments, the new$groupparameter is required even when there is no group. Upgrading will cause that call to throw anArgumentCountError. Defaulting the nullable parameter tonullwould preserve those calls.Prompt To Fix With AI