File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
developer_manual/app_publishing_maintenance/app_upgrade_guide Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ Back-end changes
4545Added APIs
4646^^^^^^^^^^
4747
48- * tbd
48+ * `` \OCP\IEventSourceFactory ``: To create a ` OCP\IEventSource ` instance.
4949
5050Changed APIs
5151^^^^^^^^^^^^
@@ -66,3 +66,17 @@ Removed APIs
6666* ``\OC_App::getSettingsNavigation ``: inject ``\OCP\App\IAppManager `` and call ``\OCP\App\IAppManager::getAll('settings') ``.
6767* ``\OC_App::isEnabled ``: inject ``\OCP\App\IAppManager `` and call ``\OCP\App\IAppManager::isEnabledForUser ``.
6868* ``\OC_Defaults::getLogoClaim ``: There is no replacement.
69+ * `\OC::$server->createEventSource() ` has been removed, use `\OC::$server->get(\OCP\IEventSourceFactory::class)->create() ` instead.
70+
71+ The factory `\OCP\IEventSourceFactory ` works only from Nextcloud 28. For older versions use \O C::$server->createEventSource().
72+
73+ If you want to support Nextcloud 27 and Nextcloud 28:
74+
75+ .. code-block :: php
76+
77+ // @TODO: Remove method_exists when min-version="28"
78+ if (method_exists(\O C::$server, 'createEventSource')) {
79+ $eventSource = \O C::$server->createEventSource();
80+ } else {
81+ $eventSource = \O CP\S erver::get(IEventSourceFactory::class)->create();
82+ }
You can’t perform that action at this time.
0 commit comments