-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Type the \OCP\IUserManager::callForSeenUsers closure with Psalm #23746
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
Type the \OCP\IUserManager::callForSeenUsers closure with Psalm #23746
Conversation
|
/backport to stable20 |
rullzer
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.
Those double doc blocks with identical data always seem weird to me
you mean the two lines for one parameter? yeah. but that is a limitation of what the original phpdoc can express and what psalm can do. one day I'm sure the phpdoc will be updated. today is not that day. like we could also only use the |
We can also just drop it, because it adds nothing over the type hint itself. |
Here it doesn't. But many times we still have a short parameter description and then we shouldn't drop it because that influences how the API docs are rendered. |
|
I was more meaing the double stuff on the interface and the implementation... this always struck me as error prone to get out of sync. |
|
Fair enough. It's getting better with php8 and union types but without native support for generics there is still a lot you can't express with php alone. |
|
Weird that Psalm is failing now. |
c68e9be to
ffa8be4
Compare
Why weird? ;) Psalm warns you about the callable definition. server/lib/private/User/Manager.php Lines 563 to 566 in ffa8be4
Because void is defined as return type for the callable. Awesome that Psalm is also able to detect this case. |
where do you see that? I only see (unrelated?) changes of the baseline |
Signed-off-by: Christoph Wurst <[email protected]>
ffa8be4 to
7e72866
Compare
|
It seems (for nextcloud/server) that false is not returned from the callable. Don't know if an app is using this mechanism to interrupt the process. |
|
🤖 beep boop beep 🤖 Here are the logs for the failed build: Status of 34703: failuremysql8.0-php7.4Show full logmysql5.6-php7.3Show full log |

Companion of #23743, didn't see there is two methods that take a closure.