diff options
author | Daniel <mail@danielkesselberg.de> | 2025-04-07 11:38:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-07 11:38:55 +0200 |
commit | 07278d264c0ab8e23d04ccbf91846a83a803dbaf (patch) | |
tree | 1747712a4aabee04145c972823fdb398fd672de5 | |
parent | 7d8a073b9c8d61ae401622fe5da10aff37213ea7 (diff) | |
parent | c0212af7fa4e1bce17a3ff95e4096e150d468efe (diff) | |
download | nextcloud-server-07278d264c0ab8e23d04ccbf91846a83a803dbaf.tar.gz nextcloud-server-07278d264c0ab8e23d04ccbf91846a83a803dbaf.zip |
Merge pull request #51944 from nextcloud/fix/missing-import
fix(files_reminders): add missing import
-rw-r--r-- | apps/files_reminders/composer/composer/autoload_classmap.php | 1 | ||||
-rw-r--r-- | apps/files_reminders/composer/composer/autoload_static.php | 1 | ||||
-rw-r--r-- | apps/files_reminders/lib/AppInfo/Application.php | 1 | ||||
-rw-r--r-- | apps/files_reminders/lib/Notification/Notifier.php | 2 | ||||
-rw-r--r-- | apps/files_reminders/lib/SetupChecks/NeedNotificationsApp.php | 6 | ||||
-rw-r--r-- | build/psalm-baseline.xml | 6 | ||||
-rw-r--r-- | psalm.xml | 1 |
7 files changed, 15 insertions, 3 deletions
diff --git a/apps/files_reminders/composer/composer/autoload_classmap.php b/apps/files_reminders/composer/composer/autoload_classmap.php index c0fbf528f15..f3a95a64e74 100644 --- a/apps/files_reminders/composer/composer/autoload_classmap.php +++ b/apps/files_reminders/composer/composer/autoload_classmap.php @@ -26,4 +26,5 @@ return array( 'OCA\\FilesReminders\\Model\\RichReminder' => $baseDir . '/../lib/Model/RichReminder.php', 'OCA\\FilesReminders\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php', 'OCA\\FilesReminders\\Service\\ReminderService' => $baseDir . '/../lib/Service/ReminderService.php', + 'OCA\\FilesReminders\\SetupChecks\\NeedNotificationsApp' => $baseDir . '/../lib/SetupChecks/NeedNotificationsApp.php', ); diff --git a/apps/files_reminders/composer/composer/autoload_static.php b/apps/files_reminders/composer/composer/autoload_static.php index 32660dfedc9..6a6475e03de 100644 --- a/apps/files_reminders/composer/composer/autoload_static.php +++ b/apps/files_reminders/composer/composer/autoload_static.php @@ -41,6 +41,7 @@ class ComposerStaticInitFilesReminders 'OCA\\FilesReminders\\Model\\RichReminder' => __DIR__ . '/..' . '/../lib/Model/RichReminder.php', 'OCA\\FilesReminders\\Notification\\Notifier' => __DIR__ . '/..' . '/../lib/Notification/Notifier.php', 'OCA\\FilesReminders\\Service\\ReminderService' => __DIR__ . '/..' . '/../lib/Service/ReminderService.php', + 'OCA\\FilesReminders\\SetupChecks\\NeedNotificationsApp' => __DIR__ . '/..' . '/../lib/SetupChecks/NeedNotificationsApp.php', ); public static function getInitializer(ClassLoader $loader) diff --git a/apps/files_reminders/lib/AppInfo/Application.php b/apps/files_reminders/lib/AppInfo/Application.php index 0ad503264d2..2776e9db0b1 100644 --- a/apps/files_reminders/lib/AppInfo/Application.php +++ b/apps/files_reminders/lib/AppInfo/Application.php @@ -16,6 +16,7 @@ use OCA\FilesReminders\Listener\NodeDeletedListener; use OCA\FilesReminders\Listener\SabrePluginAddListener; use OCA\FilesReminders\Listener\UserDeletedListener; use OCA\FilesReminders\Notification\Notifier; +use OCA\FilesReminders\SetupChecks\NeedNotificationsApp; use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; diff --git a/apps/files_reminders/lib/Notification/Notifier.php b/apps/files_reminders/lib/Notification/Notifier.php index 565ef9a4695..337ef04c814 100644 --- a/apps/files_reminders/lib/Notification/Notifier.php +++ b/apps/files_reminders/lib/Notification/Notifier.php @@ -76,7 +76,7 @@ class Notifier implements INotifier { [ 'name' => [ 'type' => 'highlight', - 'id' => $node->getId(), + 'id' => (string)$node->getId(), 'name' => $node->getName(), ], ], diff --git a/apps/files_reminders/lib/SetupChecks/NeedNotificationsApp.php b/apps/files_reminders/lib/SetupChecks/NeedNotificationsApp.php index 2fc80094152..1dc7d652c67 100644 --- a/apps/files_reminders/lib/SetupChecks/NeedNotificationsApp.php +++ b/apps/files_reminders/lib/SetupChecks/NeedNotificationsApp.php @@ -7,15 +7,17 @@ declare(strict_types=1); * SPDX-License-Identifier: AGPL-3.0-or-later */ -namespace OCA\DAV\SetupChecks; +namespace OCA\FilesReminders\SetupChecks; use OCP\App\IAppManager; +use OCP\IL10N; use OCP\SetupCheck\ISetupCheck; use OCP\SetupCheck\SetupResult; class NeedNotificationsApp implements ISetupCheck { public function __construct( private IAppManager $appManager, + private IL10N $l10n, ) { } @@ -28,7 +30,7 @@ class NeedNotificationsApp implements ISetupCheck { } public function run(): SetupResult { - if ($this->appManager->isInstalled('notifications')) { + if ($this->appManager->isEnabledForAnyone('notifications')) { return SetupResult::success($this->l10n->t('This files_reminder can work properly.')); } else { return SetupResult::warning($this->l10n->t('The files_reminder app needs the notification app to work properly. You should either enable notifications or disable files_reminder.')); diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index dc24381b95a..1a94fd88a17 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -843,6 +843,12 @@ <code><![CDATA[test]]></code> </TooManyArguments> </file> + <file src="apps/files_reminders/lib/Model/RichReminder.php"> + <ConstructorSignatureMismatch> + <code><![CDATA[public function __construct(]]></code> + <code><![CDATA[public function __construct(]]></code> + </ConstructorSignatureMismatch> + </file> <file src="apps/files_sharing/lib/Controller/ShareAPIController.php"> <RedundantCast> <code><![CDATA[(int)$code]]></code> diff --git a/psalm.xml b/psalm.xml index 22428fb4725..0fdbc287b5a 100644 --- a/psalm.xml +++ b/psalm.xml @@ -30,6 +30,7 @@ <directory name="apps/federation"/> <directory name="apps/files"/> <directory name="apps/files_external"/> + <directory name="apps/files_reminders"/> <directory name="apps/files_sharing"/> <directory name="apps/files_trashbin"/> <directory name="apps/files_versions"/> |