aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-07-25 11:29:33 +0200
committerJoas Schilling <coding@schilljs.com>2023-07-27 09:57:51 +0200
commit4f7de8ed60f528c38af9e4ba988015e9e9abc5dc (patch)
tree655ee4404a11750438b4b5f8b0c8b1023148c3fb /lib
parent582e655c011eaea0cd33d8827a90904d1250cb9b (diff)
downloadnextcloud-server-4f7de8ed60f528c38af9e4ba988015e9e9abc5dc.tar.gz
nextcloud-server-4f7de8ed60f528c38af9e4ba988015e9e9abc5dc.zip
fix!: Remove legacy event dispatching Symfony's GenericEvent
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Preview/Generator.php10
-rw-r--r--lib/private/PreviewManager.php5
-rw-r--r--lib/private/Server.php1
-rw-r--r--lib/public/IPreview.php6
4 files changed, 0 insertions, 22 deletions
diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php
index c9949c82a97..4e4571f0857 100644
--- a/lib/private/Preview/Generator.php
+++ b/lib/private/Preview/Generator.php
@@ -44,8 +44,6 @@ use OCP\IStreamImage;
use OCP\Preview\BeforePreviewFetchedEvent;
use OCP\Preview\IProviderV2;
use OCP\Preview\IVersionedPreviewFile;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
-use Symfony\Component\EventDispatcher\GenericEvent;
class Generator {
public const SEMAPHORE_ID_ALL = 0x0a11;
@@ -59,8 +57,6 @@ class Generator {
private $appData;
/** @var GeneratorHelper */
private $helper;
- /** @var EventDispatcherInterface */
- private $legacyEventDispatcher;
/** @var IEventDispatcher */
private $eventDispatcher;
@@ -69,14 +65,12 @@ class Generator {
IPreview $previewManager,
IAppData $appData,
GeneratorHelper $helper,
- EventDispatcherInterface $legacyEventDispatcher,
IEventDispatcher $eventDispatcher
) {
$this->config = $config;
$this->previewManager = $previewManager;
$this->appData = $appData;
$this->helper = $helper;
- $this->legacyEventDispatcher = $legacyEventDispatcher;
$this->eventDispatcher = $eventDispatcher;
}
@@ -104,10 +98,6 @@ class Generator {
'mode' => $mode,
];
- $this->legacyEventDispatcher->dispatch(
- IPreview::EVENT,
- new GenericEvent($file, $specification)
- );
$this->eventDispatcher->dispatchTyped(new BeforePreviewFetchedEvent(
$file,
$width,
diff --git a/lib/private/PreviewManager.php b/lib/private/PreviewManager.php
index 814235f4212..3af6848686e 100644
--- a/lib/private/PreviewManager.php
+++ b/lib/private/PreviewManager.php
@@ -46,7 +46,6 @@ use OCP\IConfig;
use OCP\IPreview;
use OCP\IServerContainer;
use OCP\Preview\IProviderV2;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use function array_key_exists;
class PreviewManager implements IPreview {
@@ -54,7 +53,6 @@ class PreviewManager implements IPreview {
protected IRootFolder $rootFolder;
protected IAppData $appData;
protected IEventDispatcher $eventDispatcher;
- protected EventDispatcherInterface $legacyEventDispatcher;
private ?Generator $generator = null;
private GeneratorHelper $helper;
protected bool $providerListDirty = false;
@@ -81,7 +79,6 @@ class PreviewManager implements IPreview {
IRootFolder $rootFolder,
IAppData $appData,
IEventDispatcher $eventDispatcher,
- EventDispatcherInterface $legacyEventDispatcher,
GeneratorHelper $helper,
?string $userId,
Coordinator $bootstrapCoordinator,
@@ -93,7 +90,6 @@ class PreviewManager implements IPreview {
$this->rootFolder = $rootFolder;
$this->appData = $appData;
$this->eventDispatcher = $eventDispatcher;
- $this->legacyEventDispatcher = $legacyEventDispatcher;
$this->helper = $helper;
$this->userId = $userId;
$this->bootstrapCoordinator = $bootstrapCoordinator;
@@ -161,7 +157,6 @@ class PreviewManager implements IPreview {
$this->rootFolder,
$this->config
),
- $this->legacyEventDispatcher,
$this->eventDispatcher
);
}
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 03c03e1b6ed..6239b20beee 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -340,7 +340,6 @@ class Server extends ServerContainer implements IServerContainer {
$c->get(SystemConfig::class)
),
$c->get(IEventDispatcher::class),
- $c->get(SymfonyAdapter::class),
$c->get(GeneratorHelper::class),
$c->get(ISession::class)->get('user_id'),
$c->get(Coordinator::class),
diff --git a/lib/public/IPreview.php b/lib/public/IPreview.php
index 8483587d60e..2758eba8d63 100644
--- a/lib/public/IPreview.php
+++ b/lib/public/IPreview.php
@@ -38,12 +38,6 @@ use OCP\Files\SimpleFS\ISimpleFile;
* @since 6.0.0
*/
interface IPreview {
- /**
- * @since 9.2.0
- * @deprecated 22.0.0
- */
- public const EVENT = self::class . ':' . 'PreviewRequested';
-
public const MODE_FILL = 'fill';
public const MODE_COVER = 'cover';