Deprecate hooks, emitter and Symfony dispatcher mechanisms

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2019-12-11 10:04:36 +01:00
parent 68d59915d6
commit 723f017b12
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
5 changed files with 13 additions and 1 deletions

View File

@ -23,6 +23,9 @@
namespace OC\Hooks;
/**
* @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher
*/
abstract class BasicEmitter implements Emitter {
use EmitterTrait;
}

View File

@ -30,6 +30,7 @@ namespace OC\Hooks;
* interface for all classes that are able to emit events
*
* @package OC\Hooks
* @deprecated 18.0.0 use events and the \OCP\EventDispatcher\IEventDispatcher service
*/
interface Emitter {
/**

View File

@ -24,6 +24,9 @@
namespace OC\Hooks;
/**
* @deprecated 18.0.0 use events and the \OCP\EventDispatcher\IEventDispatcher service
*/
class PublicEmitter extends BasicEmitter {
/**
* @param string $scope

View File

@ -1848,6 +1848,7 @@ class Server extends ServerContainer implements IServerContainer {
*
* @return EventDispatcherInterface
* @since 8.2.0
* @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher
*/
public function getEventDispatcher() {
return $this->query(\OC\EventDispatcher\SymfonyAdapter::class);

View File

@ -28,7 +28,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
class OC_Hook{
/**
* @deprecated 18.0.0 use events and the \OCP\EventDispatcher\IEventDispatcher service
*/
class OC_Hook {
public static $thrownExceptions = [];
static private $registered = array();