Skip to content

Commit 52ce67b

Browse files
authored
Merge pull request #59543 from nextcloud/chore/remove-workflowengine-deprecated-stuff
chore: Remove long-time deprecated things from workflowengine
2 parents 3c3cbd1 + f445c14 commit 52ce67b

4 files changed

Lines changed: 2 additions & 26 deletions

File tree

apps/workflowengine/lib/Service/RuleMatcher.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,8 @@ public function getFlows(bool $returnFirstMatchingOperationOnly = true): array {
8888
if (!$this->operation) {
8989
throw new RuntimeException('Operation is not set');
9090
}
91-
return $this->getMatchingOperations(get_class($this->operation), $returnFirstMatchingOperationOnly);
92-
}
93-
94-
public function getMatchingOperations(string $class, bool $returnFirstMatchingOperationOnly = true): array {
95-
$scopes[] = new ScopeContext(IManager::SCOPE_ADMIN);
91+
$class = get_class($this->operation);
92+
$scopes = [new ScopeContext(IManager::SCOPE_ADMIN)];
9693
$user = $this->session->getUser();
9794
if ($user !== null && $this->manager->isUserScopeEnabled()) {
9895
$scopes[] = new ScopeContext(IManager::SCOPE_USER, $user->getUID());
@@ -111,7 +108,6 @@ public function getMatchingOperations(string $class, bool $returnFirstMatchingOp
111108
}
112109

113110
if ($this->entity instanceof IEntity) {
114-
/** @var ScopeContext[] $additionalScopes */
115111
$additionalScopes = $this->manager->getAllConfiguredScopesForOperation($class);
116112
foreach ($additionalScopes as $hash => $scopeCandidate) {
117113
if ($scopeCandidate->getScope() !== IManager::SCOPE_USER || in_array($scopeCandidate, $scopes)) {

apps/workflowengine/lib/Settings/ASettings.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ public function __construct(
3737
abstract public function getScope(): int;
3838

3939
public function getForm(): TemplateResponse {
40-
// @deprecated in 20.0.0: retire this one in favor of the typed event
41-
$this->eventDispatcher->dispatch(
42-
'OCP\WorkflowEngine::loadAdditionalSettingScripts',
43-
new LoadSettingsScriptsEvent()
44-
);
4540
$this->eventDispatcher->dispatchTyped(new LoadSettingsScriptsEvent());
4641

4742
$entities = $this->manager->getEntitiesList();

build/psalm-baseline.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2657,11 +2657,6 @@
26572657
<code><![CDATA[getSubject]]></code>
26582658
</DeprecatedMethod>
26592659
</file>
2660-
<file src="apps/workflowengine/lib/Settings/ASettings.php">
2661-
<DeprecatedMethod>
2662-
<code><![CDATA[dispatch]]></code>
2663-
</DeprecatedMethod>
2664-
</file>
26652660
<file src="core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php">
26662661
<DeprecatedClass>
26672662
<code><![CDATA[Files::rmdirr($dir)]]></code>

lib/public/WorkflowEngine/IRuleMatcher.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@
1717
* @since 18.0.0
1818
*/
1919
interface IRuleMatcher extends IFileCheck {
20-
/**
21-
* This method is left for backwards compatibility and easier porting of
22-
* apps. Please use 'getFlows' instead (and setOperation if you implement
23-
* an IComplexOperation).
24-
*
25-
* @since 18.0.0
26-
* @deprecated 18.0.0
27-
*/
28-
public function getMatchingOperations(string $class, bool $returnFirstMatchingOperationOnly = true): array;
29-
3020
/**
3121
* @throws RuntimeException
3222
* @since 18.0.0

0 commit comments

Comments
 (0)