summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-03-03 12:48:14 +0100
committerJoas Schilling <coding@schilljs.com>2023-03-03 15:33:17 +0100
commit5bc86dd6acf3ab5f8f166f079ae78879da93a353 (patch)
treefc695451fbcc5a735420873c2bdebf791ad268a8 /lib
parentde64c96a673ea7b65fc53ebf576f2f40098085b7 (diff)
downloadnextcloud-server-5bc86dd6acf3ab5f8f166f079ae78879da93a353.tar.gz
nextcloud-server-5bc86dd6acf3ab5f8f166f079ae78879da93a353.zip
techdebt(workflowengine): Remove transition event classes
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/composer/composer/ClassLoader.php12
-rw-r--r--lib/composer/composer/autoload_classmap.php2
-rw-r--r--lib/composer/composer/autoload_real.php6
-rw-r--r--lib/composer/composer/autoload_static.php2
-rw-r--r--lib/public/WorkflowEngine/IEntityCompat.php47
-rw-r--r--lib/public/WorkflowEngine/IOperationCompat.php50
6 files changed, 11 insertions, 108 deletions
diff --git a/lib/composer/composer/ClassLoader.php b/lib/composer/composer/ClassLoader.php
index fd56bd7d840..a72151c77c8 100644
--- a/lib/composer/composer/ClassLoader.php
+++ b/lib/composer/composer/ClassLoader.php
@@ -429,7 +429,8 @@ class ClassLoader
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
- (self::$includeFile)($file);
+ $includeFile = self::$includeFile;
+ $includeFile($file);
return true;
}
@@ -560,7 +561,10 @@ class ClassLoader
return false;
}
- private static function initializeIncludeClosure(): void
+ /**
+ * @return void
+ */
+ private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
@@ -574,8 +578,8 @@ class ClassLoader
* @param string $file
* @return void
*/
- self::$includeFile = static function($file) {
+ self::$includeFile = \Closure::bind(static function($file) {
include $file;
- };
+ }, null, null);
}
}
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php
index 080bde60715..57a828dbefb 100644
--- a/lib/composer/composer/autoload_classmap.php
+++ b/lib/composer/composer/autoload_classmap.php
@@ -649,12 +649,10 @@ return array(
'OCP\\WorkflowEngine\\IComplexOperation' => $baseDir . '/lib/public/WorkflowEngine/IComplexOperation.php',
'OCP\\WorkflowEngine\\IEntity' => $baseDir . '/lib/public/WorkflowEngine/IEntity.php',
'OCP\\WorkflowEngine\\IEntityCheck' => $baseDir . '/lib/public/WorkflowEngine/IEntityCheck.php',
- 'OCP\\WorkflowEngine\\IEntityCompat' => $baseDir . '/lib/public/WorkflowEngine/IEntityCompat.php',
'OCP\\WorkflowEngine\\IEntityEvent' => $baseDir . '/lib/public/WorkflowEngine/IEntityEvent.php',
'OCP\\WorkflowEngine\\IFileCheck' => $baseDir . '/lib/public/WorkflowEngine/IFileCheck.php',
'OCP\\WorkflowEngine\\IManager' => $baseDir . '/lib/public/WorkflowEngine/IManager.php',
'OCP\\WorkflowEngine\\IOperation' => $baseDir . '/lib/public/WorkflowEngine/IOperation.php',
- 'OCP\\WorkflowEngine\\IOperationCompat' => $baseDir . '/lib/public/WorkflowEngine/IOperationCompat.php',
'OCP\\WorkflowEngine\\IRuleMatcher' => $baseDir . '/lib/public/WorkflowEngine/IRuleMatcher.php',
'OCP\\WorkflowEngine\\ISpecificOperation' => $baseDir . '/lib/public/WorkflowEngine/ISpecificOperation.php',
'OC\\Accounts\\Account' => $baseDir . '/lib/private/Accounts/Account.php',
diff --git a/lib/composer/composer/autoload_real.php b/lib/composer/composer/autoload_real.php
index 9e054bba0be..ca3361d7202 100644
--- a/lib/composer/composer/autoload_real.php
+++ b/lib/composer/composer/autoload_real.php
@@ -34,15 +34,15 @@ class ComposerAutoloaderInit749170dad3f5e7f9ca158f5a9f04f6a2
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2::$files;
- $requireFile = static function ($fileIdentifier, $file) {
+ $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
- };
+ }, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
- ($requireFile)($fileIdentifier, $file);
+ $requireFile($fileIdentifier, $file);
}
return $loader;
diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php
index 2ec47c2b842..e9d1ba50024 100644
--- a/lib/composer/composer/autoload_static.php
+++ b/lib/composer/composer/autoload_static.php
@@ -682,12 +682,10 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OCP\\WorkflowEngine\\IComplexOperation' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IComplexOperation.php',
'OCP\\WorkflowEngine\\IEntity' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IEntity.php',
'OCP\\WorkflowEngine\\IEntityCheck' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IEntityCheck.php',
- 'OCP\\WorkflowEngine\\IEntityCompat' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IEntityCompat.php',
'OCP\\WorkflowEngine\\IEntityEvent' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IEntityEvent.php',
'OCP\\WorkflowEngine\\IFileCheck' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IFileCheck.php',
'OCP\\WorkflowEngine\\IManager' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IManager.php',
'OCP\\WorkflowEngine\\IOperation' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IOperation.php',
- 'OCP\\WorkflowEngine\\IOperationCompat' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IOperationCompat.php',
'OCP\\WorkflowEngine\\IRuleMatcher' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IRuleMatcher.php',
'OCP\\WorkflowEngine\\ISpecificOperation' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/ISpecificOperation.php',
'OC\\Accounts\\Account' => __DIR__ . '/../../..' . '/lib/private/Accounts/Account.php',
diff --git a/lib/public/WorkflowEngine/IEntityCompat.php b/lib/public/WorkflowEngine/IEntityCompat.php
deleted file mode 100644
index a1c6d20c034..00000000000
--- a/lib/public/WorkflowEngine/IEntityCompat.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/**
- * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de>
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-namespace OCP\WorkflowEngine;
-
-/**
- * Interface IEntityCompat
- *
- * This interface extends IEntity to provide compatibility with old style
- * Event classes. It is only present for a transition period and will be
- * removed in 2023 again.
- *
- * @since 18.0.0
- * @deprecated
- */
-interface IEntityCompat extends IEntity {
- /**
- * Like prepareRuleMatcherCompat, but works with events that are not based
- * on \OCP\EventDispatcher\Event.
- *
- * @since 18.0.0
- * @deprecated
- */
- public function prepareRuleMatcherCompat(IRuleMatcher $ruleMatcher, string $eventName, $event): void;
-}
diff --git a/lib/public/WorkflowEngine/IOperationCompat.php b/lib/public/WorkflowEngine/IOperationCompat.php
deleted file mode 100644
index 3e5f58a2867..00000000000
--- a/lib/public/WorkflowEngine/IOperationCompat.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/**
- * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de>
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-namespace OCP\WorkflowEngine;
-
-/**
- * Interface IOperationCompat
- *
- * This interface extends IOperation to provide compatibility with old style
- * Event classes. It is only present for a transition period and will be
- * removed in 2023 again.
- *
- * @since 18.0.0
- * @deprecated
- */
-interface IOperationCompat {
- /**
- * Like onEvent, but used with events that are not based on
- * \OCP\EventDispatcher\Event.
- *
- * This method is introduced for compatibility reasons and will be removed
- * in 2023 again.
- *
- * @since 18.0.0
- * @deprecated
- */
- public function onEventCompat(string $eventName, $event, IRuleMatcher $ruleMatcher): void;
-}