Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Sep 28, 2024

Summary

I have overseen this while implementing the zip folder DAV plugin.
This is required to not break behavior on zip download (apps should be able to react to zip download especially for shares).

(the event in server is pretty useless but apps might rely on it, also there is room for cleanup of all of that logic where I did now some preparation while touching it, will do in a followup the full cleanup soon).

Checklist

@susnux susnux added this to the Nextcloud 31 milestone Sep 28, 2024
}

$folder = $node->getNode();
$event = new BeforeZipCreatedEvent($folder, $files);

Check notice

Code scanning / Psalm

ArgumentTypeCoercion

Argument 2 of OCP\Files\Events\BeforeZipCreatedEvent::__construct expects list<string>, but parent type array<array-key, mixed|string> provided
@susnux susnux force-pushed the fix/bring-back-zip-event branch from 6a7890e to 05505f9 Compare September 28, 2024 21:06
// allow setup of additional auth backends
$event = new SabrePluginEvent($this->server);
$dispatcher->dispatch('OCA\DAV\Connector\Sabre::authInit', $event);
$eventDispatcher->dispatch('OCA\DAV\Connector\Sabre::authInit', $event);

Check notice

Code scanning / Psalm

DeprecatedMethod

The method OCP\EventDispatcher\IEventDispatcher::dispatch has been marked as deprecated

// allow setup of additional plugins
$dispatcher->dispatch('OCA\DAV\Connector\Sabre::addPlugin', $event);
$eventDispatcher->dispatch('OCA\DAV\Connector\Sabre::addPlugin', $event);

Check notice

Code scanning / Psalm

DeprecatedMethod

The method OCP\EventDispatcher\IEventDispatcher::dispatch has been marked as deprecated
This is required to not break behavior on zip download (apps should be able to react to zip download especially for shares).

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux force-pushed the fix/bring-back-zip-event branch from 05505f9 to e0c00af Compare September 29, 2024 11:30
@susnux susnux requested a review from come-nc September 30, 2024 16:22
@susnux susnux enabled auto-merge September 30, 2024 16:22
@susnux susnux merged commit 02f3c88 into master Oct 7, 2024
@susnux susnux deleted the fix/bring-back-zip-event branch October 7, 2024 09:58
@skjnldsv skjnldsv mentioned this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants