Skip to content

bump version and resolve deprecations #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
*
*/

$app = new \OCA\WorkflowScript\AppInfo\Application();
$app = \OC::$server->query(\OCA\WorkflowScript\AppInfo\Application::class);
5 changes: 2 additions & 3 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<name>Workflow external scripts</name>
<summary>Rule based processing of files through specified external scripts</summary>
<description>Pass files on to external scripts depending on a defined set of rules.</description>
<version>1.3.0</version>
<version>1.3.1</version>
<licence>agpl</licence>
<author mail="blizzz@arthur-schiwon.de">Arthur Schiwon</author>
<namespace>WorkflowScript</namespace>
Expand All @@ -19,8 +19,7 @@
<website>https://github.com/nextcloud/workflow_script</website>
<bugs>https://github.com/nextcloud/workflow_script/issues</bugs>
<repository type="git">https://github.com/nextcloud/workflow_script.git</repository>
<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>
<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>
<screenshot>https://raw.githubusercontent.com/nextcloud/workflow_script/master/screenshots/flow-ui.png</screenshot>
<dependencies>
<nextcloud min-version="18" max-version="18" />
</dependencies>
Expand Down
9 changes: 6 additions & 3 deletions lib/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use OCA\WorkflowScript\BackgroundJobs\Launcher;
use OCP\BackgroundJob\IJobList;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\GenericEvent;
use OCP\Files\Folder;
use OCP\Files\InvalidPathException;
use OCP\Files\IRootFolder;
Expand All @@ -40,7 +41,7 @@
use OCP\WorkflowEngine\IManager;
use OCP\WorkflowEngine\IRuleMatcher;
use OCP\WorkflowEngine\ISpecificOperation;
use Symfony\Component\EventDispatcher\GenericEvent;
use Symfony\Component\EventDispatcher\GenericEvent as LegacyGenericEvent;

class Operation implements ISpecificOperation {

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

public function onEvent(string $eventName, Event $event, IRuleMatcher $ruleMatcher): void {
if (!$event instanceof GenericEvent && !$event instanceof MapperEvent) {
if (!$event instanceof GenericEvent
&& !$event instanceof LegacyGenericEvent
&& !$event instanceof MapperEvent) {
return;
}
try {
Expand Down Expand Up @@ -202,7 +205,7 @@ public function onEvent(string $eventName, Event $event, IRuleMatcher $ruleMatch
return;
}

$matches = $ruleMatcher->getMatchingOperations(Operation::class, false);
$matches = $ruleMatcher->getFlows(false);
foreach ($matches as $match) {
$command = $this->buildCommand($match['operation'], $node, $eventName, $extra);
$args = ['command' => $command];
Expand Down
Binary file removed screenshots/example_rule-small.png
Binary file not shown.
Binary file removed screenshots/example_rule.png
Binary file not shown.
Binary file added screenshots/flow-ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/settings-small.png
Binary file not shown.
Binary file removed screenshots/settings.png
Binary file not shown.