feat: Throw an error when trying to listen to no longer used signals#59489
Draft
CarlSchwan wants to merge 6 commits intomasterfrom
Draft
feat: Throw an error when trying to listen to no longer used signals#59489CarlSchwan wants to merge 6 commits intomasterfrom
CarlSchwan wants to merge 6 commits intomasterfrom
Conversation
come-nc
reviewed
Apr 7, 2026
a333c8f to
707699d
Compare
come-nc
reviewed
Apr 9, 2026
come-nc
reviewed
Apr 9, 2026
come-nc
reviewed
Apr 9, 2026
Contributor
come-nc
left a comment
There was a problem hiding this comment.
The commit comment about ::class says "Only works if the class actually exists", I think that’s not true, PHP allows using ::class for any class even if it does not exists.
Only issue is that psalm usually complains.
2ab48d7 to
0e70391
Compare
come-nc
reviewed
Apr 9, 2026
come-nc
reviewed
Apr 9, 2026
come-nc
reviewed
Apr 9, 2026
come-nc
reviewed
Apr 9, 2026
64857ac to
6007b46
Compare
0c266da to
60a5d58
Compare
Signed-off-by: Carl Schwan <carlschwan@kde.org>
Signed-off-by: Carl Schwan <carlschwan@kde.org>
Allow to use ::class as class names. Only works if the class actually exists, which in many case, isn't the case anymore. Signed-off-by: Carl Schwan <carlschwan@kde.org>
And replace the few remaining by converting the event to hooks instead of the other way around. Signed-off-by: Carl Schwan <carlschwan@kde.org>
Signed-off-by: Carl Schwan <carlschwan@kde.org>
Allow to get rid of more legacy code and make sure UserSessionTest is also in psalm Signed-off-by: Carl Schwan <carlschwan@kde.org>
60a5d58 to
62a3ef5
Compare
CarlSchwan
commented
May 5, 2026
| private function callForRegistrations(): void { | ||
| static $eventSent = false; | ||
| if (!$eventSent) { | ||
| Server::get(IEventDispatcher::class)->dispatch( |
Member
Author
There was a problem hiding this comment.
We need to keep the legacy event for https://github.com/nextcloud/sharepoint/blob/cd1d241a57c6faede7e34b298c2374597832cee2/lib/AppInfo/Application.php#L27
come-nc
reviewed
May 5, 2026
| /** | ||
| * @since 34.0.0 | ||
| */ | ||
| interface IGetUserNameFromLoginNameBackend { |
Contributor
There was a problem hiding this comment.
Missing attribute Implementable
come-nc
reviewed
May 5, 2026
| } | ||
|
|
||
| Server::get(IEventDispatcher::class)->addListener(UserLoggedInEvent::class, function (UserLoggedInEvent $event) { | ||
| if ($event instanceof UserLoggedInEvent) { |
Contributor
There was a problem hiding this comment.
Should be elseif in case an event implements both interfaces
come-nc
reviewed
May 5, 2026
Comment on lines
+82
to
+83
| private ContainerInterface $container, | ||
| private IRootFolder $rootFolder, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)