-
Notifications
You must be signed in to change notification settings - Fork 109
Adapt to latest changes in OCP\Color #2706
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
Conversation
|
I don't understand Psalm complaints... |
|
Psalm uses the meta package to test against the OCP namespaces and this has not been updated yet: https://github.com/ChristophWurst/nextcloud_composer (should auto-resolve after the nightly bump) |
lib/Service/SessionService.php
Outdated
| $uniqueGuestId = !empty($guestName) ? $guestName : $this->secureRandom->generate(12); | ||
| $color = $this->avatarManager->getGuestAvatar($uniqueGuestId)->avatarBackgroundColor($uniqueGuestId); | ||
| return sprintf("#%02x%02x%02x", $color->r, $color->g, $color->b); | ||
| return sprintf("#%02x%02x%02x", $color->red(), $color->green(), $color->blue()); |
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.
As now available with the new API:
| return sprintf("#%02x%02x%02x", $color->red(), $color->green(), $color->blue()); | |
| return $color->name(); |
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.
Nice!
Signed-off-by: Julien Veyssier <[email protected]>
e4324a0 to
9d80897
Compare
max-nextcloud
left a comment
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.
Tried this locally and it fixed the color issue for me. I have no idea about the static analysis failure though.
|
Retriggered static analysis since ChristophWurst/nextcloud_composer@7367ca1 is there after the nightly auto update. |
refs #2705
The r,g,b attributes are now private.