Skip to content

feat: Throw an error when trying to listen to no longer used signals#59489

Draft
CarlSchwan wants to merge 3 commits intomasterfrom
carl/allow-list-hooks
Draft

feat: Throw an error when trying to listen to no longer used signals#59489
CarlSchwan wants to merge 3 commits intomasterfrom
carl/allow-list-hooks

Conversation

@CarlSchwan
Copy link
Copy Markdown
Member

  • Resolves: #

Summary

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

* TODO: write example
*/
public static function connect($signalClass, $signalName, $slotClass, $slotName) {
static $debug = null;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say even not on debug we should check, and log an error if not in the list.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently throwing an error but this is mostly to see if tests are failing or not, I'll change it later to just login it as an error

[Filesystem::CLASSNAME, Filesystem::signal_pre_setup],
[Filesystem::CLASSNAME, Filesystem::signal_post_init_mountpoints],
[Filesystem::CLASSNAME, 'umount'],
['\OCA\Files_Sharing\API\Server2Server', 'preLoginNameUsedAsUserName'],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add an ignore for \ at the beginning so that we can use ::class everywhere 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should still thrown if it doesn't match exactly that is emitted

Signed-off-by: Carl Schwan <carlschwan@kde.org>
@CarlSchwan CarlSchwan force-pushed the carl/allow-list-hooks branch from 22bd4d3 to cc6a8d4 Compare April 8, 2026 15:32
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>
@CarlSchwan CarlSchwan force-pushed the carl/allow-list-hooks branch from a333c8f to 707699d Compare April 8, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants