diff --git a/composer.json b/composer.json index f3ddc847c..d3e2a4f0e 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,6 @@ "rector": "rector && composer cs:fix" }, "require-dev": { - "nextcloud/ocp": "dev-master", "bamarni/composer-bin-plugin": "^1.8" } } diff --git a/composer.lock b/composer.lock index 6c2ff3ca2..67e0ee264 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "54a97b04b656f443165418702171475b", + "content-hash": "026a84fb781f922de10a43c357a74ca6", "packages": [], "packages-dev": [ { @@ -63,369 +63,11 @@ "source": "https://github.com/bamarni/composer-bin-plugin/tree/1.9.1" }, "time": "2026-02-04T10:18:12+00:00" - }, - { - "name": "nextcloud/ocp", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/nextcloud-deps/ocp.git", - "reference": "b01a80e20e17c3bf3c5d8a0246289ec465fd0b0f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/b01a80e20e17c3bf3c5d8a0246289ec465fd0b0f", - "reference": "b01a80e20e17c3bf3c5d8a0246289ec465fd0b0f", - "shasum": "" - }, - "require": { - "php": "~8.1 || ~8.2 || ~8.3 || ~8.4 || ~8.5", - "psr/clock": "^1.0", - "psr/container": "^2.0.2", - "psr/event-dispatcher": "^1.0", - "psr/http-client": "^1.0.3", - "psr/log": "^3.0.2" - }, - "default-branch": true, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "35.0.0-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Christoph Wurst", - "email": "christoph@winzerhof-wurst.at" - }, - { - "name": "Joas Schilling", - "email": "coding@schilljs.com" - } - ], - "description": "Composer package containing Nextcloud's public OCP API and the unstable NCU API", - "support": { - "issues": "https://github.com/nextcloud-deps/ocp/issues", - "source": "https://github.com/nextcloud-deps/ocp/tree/master" - }, - "time": "2026-06-04T02:37:15+00:00" - }, - { - "name": "psr/clock", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/clock.git", - "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", - "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Clock\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for reading the clock.", - "homepage": "https://github.com/php-fig/clock", - "keywords": [ - "clock", - "now", - "psr", - "psr-20", - "time" - ], - "support": { - "issues": "https://github.com/php-fig/clock/issues", - "source": "https://github.com/php-fig/clock/tree/1.0.0" - }, - "time": "2022-11-25T14:36:26+00:00" - }, - { - "name": "psr/container", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" - }, - "time": "2021-11-05T16:47:00+00:00" - }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" - }, - "time": "2019-01-08T18:20:26+00:00" - }, - { - "name": "psr/http-client", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], - "support": { - "source": "https://github.com/php-fig/http-client" - }, - "time": "2023-09-23T14:17:50+00:00" - }, - { - "name": "psr/http-message", - "version": "2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" - }, - "time": "2023-04-04T09:54:51+00:00" - }, - { - "name": "psr/log", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/3.0.2" - }, - "time": "2024-09-11T13:17:53+00:00" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "nextcloud/ocp": 20 - }, + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": {}, diff --git a/lib/Activity/ProviderParser.php b/lib/Activity/ProviderParser.php index 1e60ae41a..4c3d5b376 100644 --- a/lib/Activity/ProviderParser.php +++ b/lib/Activity/ProviderParser.php @@ -71,7 +71,7 @@ protected function setRichSubject( foreach ($ak as $k) { $subAk = array_keys($data[$k]); foreach ($subAk as $sK) { - if (str_starts_with($sK, '_')) { + if (str_starts_with((string)$sK, '_')) { unset($data[$k][$sK]); } } diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 7aee8dad7..01ace251f 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -168,15 +168,13 @@ public function registerNavigation( return; } - $navigationManager->add(static function () use ($urlGenerator, $l10nFactory) { - return [ - 'id' => Application::APP_ID, - 'order' => 80, - 'href' => $urlGenerator->linkToRoute('circles.Page.index'), - 'icon' => $urlGenerator->imagePath(Application::APP_ID, 'circles.svg'), - 'name' => $l10nFactory->get(Application::APP_ID)->t('Teams'), - ]; - }); + $navigationManager->add(static fn () => [ + 'id' => Application::APP_ID, + 'order' => 80, + 'href' => $urlGenerator->linkToRoute('circles.Page.index'), + 'icon' => $urlGenerator->imagePath(Application::APP_ID, 'circles.svg'), + 'name' => $l10nFactory->get(Application::APP_ID)->t('Teams'), + ]); } public function registerMountProvider(ContainerInterface $container): void { diff --git a/lib/Command/CirclesCheck.php b/lib/Command/CirclesCheck.php index 4779c9c7a..9b7b69d1f 100644 --- a/lib/Command/CirclesCheck.php +++ b/lib/Command/CirclesCheck.php @@ -10,7 +10,6 @@ use Exception; use OC\Core\Command\Base; -use OC\Memcache\APCu; use OCA\Circles\AppInfo\Application; use OCA\Circles\AppInfo\Capabilities; use OCA\Circles\Exceptions\FederatedEventException; diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 8f30d297e..bf6ebf202 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -26,7 +26,7 @@ class PageController extends Controller { public function __construct( IRequest $request, - private ConfigService $configService, + private readonly ConfigService $configService, ) { parent::__construct(Application::APP_ID, $request); } diff --git a/lib/Listeners/CircleMemberRemoved.php b/lib/Listeners/CircleMemberRemoved.php index 48f03c91d..9fde0abe7 100644 --- a/lib/Listeners/CircleMemberRemoved.php +++ b/lib/Listeners/CircleMemberRemoved.php @@ -11,6 +11,7 @@ use Exception; use OCA\Circles\Events\CircleMemberRemovedEvent; +use OCA\GroupFolders\Folder\FolderManager; use OCP\App\IAppManager; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; @@ -68,7 +69,7 @@ private function circleHasAssociatedGroupFolder(string $circleId): bool { } try { - $folderManager = Server::get(\OCA\GroupFolders\Folder\FolderManager::class); + $folderManager = Server::get(FolderManager::class); return $folderManager->hasFolderForCircle($circleId); } catch (Exception $e) { $this->logger->debug('Failed to check if circle ' . $circleId . ' has an associated team folder', ['exception' => $e]); diff --git a/lib/Listeners/Files/MembershipsRemoved.php b/lib/Listeners/Files/MembershipsRemoved.php index 89074fb6f..e2a712c6e 100644 --- a/lib/Listeners/Files/MembershipsRemoved.php +++ b/lib/Listeners/Files/MembershipsRemoved.php @@ -10,7 +10,6 @@ namespace OCA\Circles\Listeners\Files; use OCA\Circles\CirclesManager; -use OCA\Circles\Db\ShareWrapperRequest; use OCA\Circles\Events\MembershipsRemovedEvent; use OCA\Circles\Exceptions\CircleNotFoundException; use OCA\Circles\Exceptions\FederatedItemException; diff --git a/lib/Listeners/GroupMemberRemoved.php b/lib/Listeners/GroupMemberRemoved.php index 7eb44134a..2cf1a9cec 100644 --- a/lib/Listeners/GroupMemberRemoved.php +++ b/lib/Listeners/GroupMemberRemoved.php @@ -11,6 +11,7 @@ use Exception; use OCA\Circles\Service\SyncService; +use OCA\GroupFolders\Folder\FolderManager; use OCP\App\IAppManager; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; @@ -65,7 +66,7 @@ private function groupHasAssociatedGroupFolder(string $groupId): bool { } try { - $folderManager = Server::get(\OCA\GroupFolders\Folder\FolderManager::class); + $folderManager = Server::get(FolderManager::class); return $folderManager->hasFolderForGroup($groupId); } catch (Exception $e) { $this->logger->debug('Failed to check if group ' . $groupId . ' has an associated team folder', ['exception' => $e]); diff --git a/lib/Model/BaseMember.php b/lib/Model/BaseMember.php index 1fe6326cb..610a4f1f2 100644 --- a/lib/Model/BaseMember.php +++ b/lib/Model/BaseMember.php @@ -9,7 +9,6 @@ use JsonSerializable; use OCA\Circles\AppInfo\Application; -use OCA\Circles\Service\MiscService; use OCP\IL10N; use OCP\L10N\IFactory; use OCP\Server; diff --git a/lib/Model/ShareWrapper.php b/lib/Model/ShareWrapper.php index 29bc6c5ce..da9880064 100644 --- a/lib/Model/ShareWrapper.php +++ b/lib/Model/ShareWrapper.php @@ -524,7 +524,7 @@ public function import(array $data): IDeserializable { try { $circle = new Circle(); $this->setCircle($circle->import($this->getArray('circle', $data))); - } catch (InvalidItemException $e) { + } catch (InvalidItemException) { } try { diff --git a/lib/Service/AvatarService.php b/lib/Service/AvatarService.php index 21e2af913..5dd4091e6 100644 --- a/lib/Service/AvatarService.php +++ b/lib/Service/AvatarService.php @@ -30,6 +30,7 @@ use OCP\Files\SimpleFS\ISimpleFile; use OCP\Files\SimpleFS\ISimpleFolder; use OCP\IL10N; +use OCP\Image; use OCP\Security\ISecureRandom; class AvatarService { @@ -142,7 +143,7 @@ private function setAvatar(string $circleId, ?array $file): string { $content = file_get_contents($file['tmp_name']); unlink($file['tmp_name']); - $image = new \OCP\Image(); + $image = new Image(); $image->loadFromData($content); $image->readExif($content); diff --git a/lib/Service/ShareService.php b/lib/Service/ShareService.php index 617b7f385..112959032 100644 --- a/lib/Service/ShareService.php +++ b/lib/Service/ShareService.php @@ -10,7 +10,6 @@ namespace OCA\Circles\Service; use OCA\Circles\Model\Circle; -use OCA\Circles\Model\Federated\FederatedEvent; /** * Class ShareService diff --git a/lib/Tools/Traits/TNCSignatory.php b/lib/Tools/Traits/TNCSignatory.php index d3b4b0c3b..f2f073695 100644 --- a/lib/Tools/Traits/TNCSignatory.php +++ b/lib/Tools/Traits/TNCSignatory.php @@ -153,7 +153,7 @@ public function signString(string $clear, NCSignatory $signatory): string { openssl_sign($clear, $signed, $privateKey, $this->getOpenSSLAlgo($signatory)); - return base64_encode($signed); + return base64_encode((string)$signed); } /**