Skip to content

refactor(workflowengine): Port away from old events - #58600

Open
CarlSchwan wants to merge 1 commit into
masterfrom
carl/workflow-outdated-events
Open

refactor(workflowengine): Port away from old events#58600
CarlSchwan wants to merge 1 commit into
masterfrom
carl/workflow-outdated-events

Conversation

@CarlSchwan

Copy link
Copy Markdown
Member

Summary

And enforce via static analysis that only new event classes are used.

TODO

  • ...

Checklist

AI (if applicable)

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

@CarlSchwanCarlSchwan added this to the Nextcloud 34 milestone Feb 26, 2026
@CarlSchwanCarlSchwan self-assigned this Feb 26, 2026
@CarlSchwanCarlSchwan added 3. to review Waiting for reviews technical debt 🧱 🤔🚀 labels Feb 26, 2026
@CarlSchwan
CarlSchwan requested review from artonge, leftybournes, nfebe and sorbaugh and removed request for a teamFebruary 26, 2026 21:54
@CarlSchwan
CarlSchwanforce-pushed the carl/workflow-outdated-events branch 2 times, most recently from 640c4bf to 0d5c71cCompareFebruary 26, 2026 23:25
@susnux

Copy link
Copy Markdown
Contributor

Ci looks unhappy

@CarlSchwan
CarlSchwanforce-pushed the carl/workflow-outdated-events branch 2 times, most recently from faf9ea9 to 554eaf5CompareMarch 2, 2026 11:35
nickvergessen added a commit to nextcloud/files_accesscontrol that referenced this pull request Mar 2, 2026
Signed-off-by: Joas Schilling <coding@schilljs.com>
And enforce via static analysis that only new event classes are used.
We have to also create a new private event for the workflowengine as the
rule matcher is not able to handle multiple nodes at the same time.
Signed-off-by: Carl Schwan <carlschwan@kde.org>
@CarlSchwan
CarlSchwanforce-pushed the carl/workflow-outdated-events branch from 554eaf5 to b707513CompareMarch 10, 2026 17:40
new GenericEntityEvent($this->l10n->t('File copied'), self::EVENT_NAMESPACE . 'postCopy'),
new GenericEntityEvent($this->l10n->t('Tag assigned'), MapperEvent::EVENT_ASSIGN),
new GenericEntityEvent($this->l10n->t('File created'), NodeCreatedEvent::class),
new GenericEntityEvent($this->l10n->t('File updated'), NodeUpdatedEvent::class),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Isn't it rather the already existing NodeWrittenEvent?

Suggested change
newGenericEntityEvent($this->l10n->t('File updated'), NodeUpdatedEvent::class),
newGenericEntityEvent($this->l10n->t('File updated'), NodeWrittenEvent::class),

* @since 34.0.0
*/
#[Consumable(since: '34.0.0')]
final class NodeUpdatedEvent extends AbstractNodeEvent {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Might be a duplicate of NodeWrittenEvent.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If we keep both, we better document what is the purpose of each event.

Util::connectHook('OC_Filesystem', 'post_create', $this, 'postCreate');

Util::connectHook('OC_Filesystem', 'update', $this, 'update');
Util::connectHook('OC_Filesystem', 'post_update', $this, 'postUpdate');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I wonder if it was left out on purpose.

@nextcloud-botnextcloud-bot mentioned this pull request May 27, 2026
@nextcloud-botnextcloud-bot mentioned this pull request Jun 4, 2026
This was referenced Jun 5, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewstechnical debt🧱 🤔🚀

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@CarlSchwan@susnux@artonge@joshtrichards@nextcloud-bot