Skip to content

Commit c75ad18

Browse files
authored
Merge pull request #33 from nextcloud/enh/noid/deprecations+bump
bump version and resolve deprecations
2 parents 8cf3f8c + 2dff6c0 commit c75ad18

File tree

8 files changed

+9
-7
lines changed

8 files changed

+9
-7
lines changed

appinfo/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
*
2222
*/
2323

24-
$app = new \OCA\WorkflowScript\AppInfo\Application();
24+
$app = \OC::$server->query(\OCA\WorkflowScript\AppInfo\Application::class);

appinfo/info.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<name>Workflow external scripts</name>
66
<summary>Rule based processing of files through specified external scripts</summary>
77
<description>Pass files on to external scripts depending on a defined set of rules.</description>
8-
<version>1.3.0</version>
8+
<version>1.3.1</version>
99
<licence>agpl</licence>
1010
<author mail="blizzz@arthur-schiwon.de">Arthur Schiwon</author>
1111
<namespace>WorkflowScript</namespace>
@@ -19,8 +19,7 @@
1919
<website>https://github.com/nextcloud/workflow_script</website>
2020
<bugs>https://github.com/nextcloud/workflow_script/issues</bugs>
2121
<repository type="git">https://github.com/nextcloud/workflow_script.git</repository>
22-
<screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/workflow_script/master/screenshots/settings-small.png">https://raw.githubusercontent.com/nextcloud/workflow_script/master/screenshots/settings.png</screenshot>
23-
<screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/workflow_script/master/screenshots/example_rule-small.png">https://raw.githubusercontent.com/nextcloud/workflow_script/master/screenshots/example_rule.png</screenshot>
22+
<screenshot>https://raw.githubusercontent.com/nextcloud/workflow_script/master/screenshots/flow-ui.png</screenshot>
2423
<dependencies>
2524
<nextcloud min-version="18" max-version="18" />
2625
</dependencies>

lib/Operation.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
use OCA\WorkflowScript\BackgroundJobs\Launcher;
2929
use OCP\BackgroundJob\IJobList;
3030
use OCP\EventDispatcher\Event;
31+
use OCP\EventDispatcher\GenericEvent;
3132
use OCP\Files\Folder;
3233
use OCP\Files\InvalidPathException;
3334
use OCP\Files\IRootFolder;
@@ -40,7 +41,7 @@
4041
use OCP\WorkflowEngine\IManager;
4142
use OCP\WorkflowEngine\IRuleMatcher;
4243
use OCP\WorkflowEngine\ISpecificOperation;
43-
use Symfony\Component\EventDispatcher\GenericEvent;
44+
use Symfony\Component\EventDispatcher\GenericEvent as LegacyGenericEvent;
4445

4546
class Operation implements ISpecificOperation {
4647

@@ -172,7 +173,9 @@ public function isAvailableForScope(int $scope): bool {
172173
}
173174

174175
public function onEvent(string $eventName, Event $event, IRuleMatcher $ruleMatcher): void {
175-
if (!$event instanceof GenericEvent && !$event instanceof MapperEvent) {
176+
if (!$event instanceof GenericEvent
177+
&& !$event instanceof LegacyGenericEvent
178+
&& !$event instanceof MapperEvent) {
176179
return;
177180
}
178181
try {
@@ -202,7 +205,7 @@ public function onEvent(string $eventName, Event $event, IRuleMatcher $ruleMatch
202205
return;
203206
}
204207

205-
$matches = $ruleMatcher->getMatchingOperations(Operation::class, false);
208+
$matches = $ruleMatcher->getFlows(false);
206209
foreach ($matches as $match) {
207210
$command = $this->buildCommand($match['operation'], $node, $eventName, $extra);
208211
$args = ['command' => $command];

screenshots/example_rule-small.png

-7.54 KB
Binary file not shown.

screenshots/example_rule.png

-10.4 KB
Binary file not shown.

screenshots/flow-ui.png

70.2 KB
Loading

screenshots/settings-small.png

-51 KB
Binary file not shown.

screenshots/settings.png

-101 KB
Binary file not shown.

0 commit comments

Comments
 (0)