Merge pull request #59543 from nextcloud/chore/remove-workflowengine-deprecated-stuff

chore: Remove long-time deprecated things from workflowengine
This commit is contained in:
Carl Schwan 2026-04-10 02:57:32 +02:00 committed by GitHub
commit 52ce67b799
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 2 additions and 26 deletions

View file

@ -88,11 +88,8 @@ class RuleMatcher implements IRuleMatcher {
if (!$this->operation) {
throw new RuntimeException('Operation is not set');
}
return $this->getMatchingOperations(get_class($this->operation), $returnFirstMatchingOperationOnly);
}
public function getMatchingOperations(string $class, bool $returnFirstMatchingOperationOnly = true): array {
$scopes[] = new ScopeContext(IManager::SCOPE_ADMIN);
$class = get_class($this->operation);
$scopes = [new ScopeContext(IManager::SCOPE_ADMIN)];
$user = $this->session->getUser();
if ($user !== null && $this->manager->isUserScopeEnabled()) {
$scopes[] = new ScopeContext(IManager::SCOPE_USER, $user->getUID());
@ -111,7 +108,6 @@ class RuleMatcher implements IRuleMatcher {
}
if ($this->entity instanceof IEntity) {
/** @var ScopeContext[] $additionalScopes */
$additionalScopes = $this->manager->getAllConfiguredScopesForOperation($class);
foreach ($additionalScopes as $hash => $scopeCandidate) {
if ($scopeCandidate->getScope() !== IManager::SCOPE_USER || in_array($scopeCandidate, $scopes)) {

View file

@ -37,11 +37,6 @@ abstract class ASettings implements ISettings {
abstract public function getScope(): int;
public function getForm(): TemplateResponse {
// @deprecated in 20.0.0: retire this one in favor of the typed event
$this->eventDispatcher->dispatch(
'OCP\WorkflowEngine::loadAdditionalSettingScripts',
new LoadSettingsScriptsEvent()
);
$this->eventDispatcher->dispatchTyped(new LoadSettingsScriptsEvent());
$entities = $this->manager->getEntitiesList();

View file

@ -2657,11 +2657,6 @@
<code><![CDATA[getSubject]]></code>
</DeprecatedMethod>
</file>
<file src="apps/workflowengine/lib/Settings/ASettings.php">
<DeprecatedMethod>
<code><![CDATA[dispatch]]></code>
</DeprecatedMethod>
</file>
<file src="core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php">
<DeprecatedClass>
<code><![CDATA[Files::rmdirr($dir)]]></code>

View file

@ -17,16 +17,6 @@ use RuntimeException;
* @since 18.0.0
*/
interface IRuleMatcher extends IFileCheck {
/**
* This method is left for backwards compatibility and easier porting of
* apps. Please use 'getFlows' instead (and setOperation if you implement
* an IComplexOperation).
*
* @since 18.0.0
* @deprecated 18.0.0
*/
public function getMatchingOperations(string $class, bool $returnFirstMatchingOperationOnly = true): array;
/**
* @throws RuntimeException
* @since 18.0.0