summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-10-29 09:03:52 +0100
committerGitHub <noreply@github.com>2020-10-29 09:03:52 +0100
commit3076eb4e9bb4006a5670aa08a2b35d2cfa42cd6c (patch)
treeb8a3b70b52589004905f0b8deed717b8d5932461 /lib
parent5fab33ddc525b3118133996b5ce91a0dada45cc2 (diff)
parent704fb2dbf2ee854916a0b848ee04fed5f593987f (diff)
downloadnextcloud-server-3076eb4e9bb4006a5670aa08a2b35d2cfa42cd6c.tar.gz
nextcloud-server-3076eb4e9bb4006a5670aa08a2b35d2cfa42cd6c.zip
Merge pull request #23767 from nextcloud/techdebt/noid/add-deprecated-tag-to-all-methods
Add deprecated tag also to methods of deprecated classes - OC\\Hooks\\Emitter namespace
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Hooks/Emitter.php2
-rw-r--r--lib/private/Hooks/EmitterTrait.php6
-rw-r--r--lib/private/Hooks/PublicEmitter.php1
3 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/Hooks/Emitter.php b/lib/private/Hooks/Emitter.php
index cd4793ef3f9..4240cef520b 100644
--- a/lib/private/Hooks/Emitter.php
+++ b/lib/private/Hooks/Emitter.php
@@ -39,6 +39,7 @@ interface Emitter {
* @param string $method
* @param callable $callback
* @return void
+ * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::addListener
*/
public function listen($scope, $method, callable $callback);
@@ -47,6 +48,7 @@ interface Emitter {
* @param string $method optional
* @param callable $callback optional
* @return void
+ * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::removeListener
*/
public function removeListener($scope = null, $method = null, callable $callback = null);
}
diff --git a/lib/private/Hooks/EmitterTrait.php b/lib/private/Hooks/EmitterTrait.php
index 85efa218f64..1cbfe0f5a06 100644
--- a/lib/private/Hooks/EmitterTrait.php
+++ b/lib/private/Hooks/EmitterTrait.php
@@ -24,6 +24,9 @@
namespace OC\Hooks;
+/**
+ * @deprecated 18.0.0 use events and the \OCP\EventDispatcher\IEventDispatcher service
+ */
trait EmitterTrait {
/**
@@ -35,6 +38,7 @@ trait EmitterTrait {
* @param string $scope
* @param string $method
* @param callable $callback
+ * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::addListener
*/
public function listen($scope, $method, callable $callback) {
$eventName = $scope . '::' . $method;
@@ -50,6 +54,7 @@ trait EmitterTrait {
* @param string $scope optional
* @param string $method optional
* @param callable $callback optional
+ * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::removeListener
*/
public function removeListener($scope = null, $method = null, callable $callback = null) {
$names = [];
@@ -93,6 +98,7 @@ trait EmitterTrait {
* @param string $scope
* @param string $method
* @param array $arguments optional
+ * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::dispatchTyped
*/
protected function emit($scope, $method, array $arguments = []) {
$eventName = $scope . '::' . $method;
diff --git a/lib/private/Hooks/PublicEmitter.php b/lib/private/Hooks/PublicEmitter.php
index dbccc34f2e9..e698b322180 100644
--- a/lib/private/Hooks/PublicEmitter.php
+++ b/lib/private/Hooks/PublicEmitter.php
@@ -33,6 +33,7 @@ class PublicEmitter extends BasicEmitter {
* @param string $scope
* @param string $method
* @param array $arguments optional
+ * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::dispatchTyped
*
* @suppress PhanAccessMethodProtected
*/