From 42a59c1b38289c632e7a0ffad815fb7fb49a7ea7 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Thu, 21 Aug 2025 14:04:09 +0200 Subject: [PATCH 1/2] chore(rector): Use rector to modernize codebase Signed-off-by: Carl Schwan --- lib/Command/ListShares.php | 31 ++----- lib/Controller/ApiController.php | 26 +++--- lib/Service/SharesList.php | 124 ++++++++++------------------ rector.php | 33 ++++++++ tests/bootstrap.php | 4 +- vendor-bin/rector/composer.json | 5 ++ vendor-bin/rector/composer.lock | 137 +++++++++++++++++++++++++++++++ 7 files changed, 240 insertions(+), 120 deletions(-) create mode 100644 rector.php create mode 100644 vendor-bin/rector/composer.json create mode 100644 vendor-bin/rector/composer.lock diff --git a/lib/Command/ListShares.php b/lib/Command/ListShares.php index 1fc090c0..6ff37039 100644 --- a/lib/Command/ListShares.php +++ b/lib/Command/ListShares.php @@ -27,7 +27,6 @@ namespace OCA\ShareListing\Command; -use iter; use OC\Core\Command\Base; use OCA\ShareListing\Service\SharesList; use OCP\Files\IRootFolder; @@ -36,32 +35,18 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +use function iter\toArray; class ListShares extends Base { - /** @var ShareManager */ - private $shareManager; - - /** @var IUserManager */ - private $userManager; - - /** @var IRootFolder */ - private $rootFolder; - - /** @var SharesList */ - private $sharesList; - - public function __construct(ShareManager $shareManager, - IUserManager $userManager, - IRootFolder $rootFolder, - SharesList $sharesList) { + public function __construct( + private ShareManager $shareManager, + private IUserManager $userManager, + private IRootFolder $rootFolder, + private SharesList $sharesList, + ) { parent::__construct(); - $this->shareManager = $shareManager; - $this->userManager = $userManager; - $this->rootFolder = $rootFolder; - $this->sharesList = $sharesList; - } public function configure() { @@ -105,7 +90,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $filter = $this->sharesList->filterStringToInt($input->getOption('filter')); $outputOpt = $input->getOption('output'); - $shares = iter\toArray($this->sharesList->getFormattedShares($user, $filter, $path, $token)); + $shares = toArray($this->sharesList->getFormattedShares($user, $filter, $path, $token)); $output->writeln($this->sharesList->getSerializedShares($shares, $outputOpt)); return 0; diff --git a/lib/Controller/ApiController.php b/lib/Controller/ApiController.php index bfd23f21..e5df76f2 100644 --- a/lib/Controller/ApiController.php +++ b/lib/Controller/ApiController.php @@ -25,7 +25,6 @@ namespace OCA\ShareListing\Controller; -use iter; use OCA\ShareListing\Service\SharesList; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCS\OCSNotFoundException; @@ -34,15 +33,15 @@ use OCP\IUserManager; use OCP\IUserSession; use OCP\Share\IShare; +use function iter\filter; +use function iter\map; +use function iter\toArray; class ApiController extends OCSController { /** @var IUserSession */ protected $userSession; - /** @var IUserManager */ - private $userManager; - /** @var SharesList */ protected $sharesList; @@ -53,15 +52,16 @@ class ApiController extends OCSController { * @param IUserManager $userManager * @param SharesList $sharesList */ - public function __construct(string $appName, + public function __construct( + string $appName, IRequest $request, IUserSession $userSession, - IUserManager $userManager, - SharesList $sharesList) { + private IUserManager $userManager, + SharesList $sharesList, + ) { parent::__construct($appName, $request); $this->userSession = $userSession; - $this->userManager = $userManager; $this->sharesList = $sharesList; } @@ -84,17 +84,13 @@ public function getSharedSubfolders(string $path): DataResponse { $shares = $this->sharesList->getSub($currentUser->getUID(), SharesList::FILTER_NONE, $path); // format results - $formattedShares = iter\map(function (IShare $share) { - return $this->sharesList->formatShare($share); - }, $shares); + $formattedShares = map(fn (IShare $share) => $this->sharesList->formatShare($share), $shares); // remove current folder - $filteredShares = iter\filter(function ($share) use ($path) { - return $share['path'] !== $path; - }, $formattedShares); + $filteredShares = filter(fn ($share) => $share['path'] !== $path, $formattedShares); // sort directories first - $sortedShares = iter\toArray($filteredShares); + $sortedShares = toArray($filteredShares); usort($sortedShares, function ($a, $b) { if ($a['is_directory'] && $b['is_directory']) { return strcmp($a['path'], $b['path']); diff --git a/lib/Service/SharesList.php b/lib/Service/SharesList.php index 2fad2530..5d9c5ff6 100644 --- a/lib/Service/SharesList.php +++ b/lib/Service/SharesList.php @@ -27,7 +27,8 @@ namespace OCA\ShareListing\Service; -use iter; +use EmptyIterator; +use Iterator; use OC\User\NoUserException; use OCP\Files\Folder; use OCP\Files\IRootFolder; @@ -39,6 +40,9 @@ use Symfony\Component\Serializer\Encoder\CsvEncoder; use Symfony\Component\Serializer\Encoder\JsonEncoder; use Symfony\Component\Serializer\Serializer; +use Throwable; +use function iter\filter; +use function iter\map; class SharesList { @@ -50,21 +54,11 @@ class SharesList { public const FILTER_HAS_EXPIRATION = 5; public const FILTER_NO_EXPIRATION = 6; - /** @var ShareManager */ - private $shareManager; - - /** @var IUserManager */ - private $userManager; - - /** @var IRootFolder */ - private $rootFolder; - - public function __construct(ShareManager $shareManager, - IUserManager $userManager, - IRootFolder $rootFolder) { - $this->shareManager = $shareManager; - $this->userManager = $userManager; - $this->rootFolder = $rootFolder; + public function __construct( + private ShareManager $shareManager, + private IUserManager $userManager, + private IRootFolder $rootFolder, + ) { } private function getShareTypes(): array { @@ -77,7 +71,7 @@ private function getShareTypes(): array { ]; } - public function get(?string $userId, int $filter, ?string $path = null, ?string $token = null): \Iterator { + public function get(?string $userId, int $filter, ?string $path = null, ?string $token = null): Iterator { $shares = $this->getShares($userId); // If path is set. Filter for the current user @@ -85,11 +79,11 @@ public function get(?string $userId, int $filter, ?string $path = null, ?string $userFolder = $this->rootFolder->getUserFolder($userId); try { $node = $userFolder->get($path); - } catch (NotFoundException $e) { + } catch (NotFoundException) { // Path is not valid for user so nothing to report; - return new \EmptyIterator(); + return new EmptyIterator(); } - $shares = iter\filter(function (IShare $share) use ($node) { + $shares = filter(function (IShare $share) use ($node) { if ($node->getId() === $share->getNodeId()) { return true; } @@ -104,40 +98,30 @@ public function get(?string $userId, int $filter, ?string $path = null, ?string } if ($filter === self::FILTER_OWNER) { - $shares = iter\filter(function (IShare $share) use ($userId) { - return $share->getShareOwner() === $userId; - }, $shares); + $shares = filter(fn (IShare $share) => $share->getShareOwner() === $userId, $shares); } if ($filter === self::FILTER_INITIATOR) { - $shares = iter\filter(function (IShare $share) use ($userId) { - return $share->getSharedBy() === $userId; - }, $shares); + $shares = filter(fn (IShare $share) => $share->getSharedBy() === $userId, $shares); } if ($filter === self::FILTER_RECIPIENT) { // We can't check the recipient since this might be a group share etc. However you can't share to yourself - $shares = iter\filter(function (IShare $share) use ($userId) { - return $share->getShareOwner() !== $userId && $share->getSharedBy() !== $userId; - }, $shares); + $shares = filter(fn (IShare $share) => $share->getShareOwner() !== $userId && $share->getSharedBy() !== $userId, $shares); } if ($filter === self::FILTER_HAS_EXPIRATION) { - $shares = iter\filter(function (IShare $share) use ($userId): bool { - return $share->getExpirationDate() !== null; - }, $shares); + $shares = filter(fn (IShare $share): bool => $share->getExpirationDate() !== null, $shares); } if ($filter === self::FILTER_NO_EXPIRATION) { - $shares = iter\filter(function (IShare $share) use ($userId): bool { - return $share->getExpirationDate() === null; - }, $shares); + $shares = filter(fn (IShare $share): bool => $share->getExpirationDate() === null, $shares); } - $shares = iter\filter(function (IShare $share): bool { + $shares = filter(function (IShare $share): bool { try { $userFolder = $this->rootFolder->getUserFolder($share->getShareOwner()); - } catch (NoUserException $e) { + } catch (NoUserException) { return false; - } catch (\Throwable $e) { + } catch (Throwable) { return false; } $nodes = $userFolder->getById($share->getNodeId()); @@ -154,19 +138,19 @@ public function get(?string $userId, int $filter, ?string $path = null, ?string * This allows us to build a list of subfiles/folder that are shared * as well */ - public function getSub(string $userId, int $filter, string $path): \Iterator { + public function getSub(string $userId, int $filter, string $path): Iterator { $shares = $this->shareManager->getAllShares(); // If path is set. Filter for the current user $userFolder = $this->rootFolder->getUserFolder($userId); try { $node = $userFolder->get($path); - } catch (NotFoundException $e) { + } catch (NotFoundException) { // Path is not valid for user so nothing to report; - return new \EmptyIterator(); + return new EmptyIterator(); } - $shares = iter\filter(function (IShare $share) use ($node) { + $shares = filter(function (IShare $share) use ($node) { if ($node->getId() === $share->getNodeId()) { return false; } @@ -177,28 +161,22 @@ public function getSub(string $userId, int $filter, string $path): \Iterator { }, $shares); if ($filter === self::FILTER_OWNER) { - $shares = iter\filter(function (IShare $share) use ($userId) { - return $share->getShareOwner() === $userId; - }, $shares); + $shares = filter(fn (IShare $share) => $share->getShareOwner() === $userId, $shares); } if ($filter === self::FILTER_INITIATOR) { - $shares = iter\filter(function (IShare $share) use ($userId) { - return $share->getSharedBy() === $userId; - }, $shares); + $shares = filter(fn (IShare $share) => $share->getSharedBy() === $userId, $shares); } if ($filter === self::FILTER_RECIPIENT) { // We can't check the recipient since this might be a group share etc. However you can't share to yourself - $shares = iter\filter(function (IShare $share) use ($userId) { - return $share->getShareOwner() !== $userId && $share->getSharedBy() !== $userId; - }, $shares); + $shares = filter(fn (IShare $share) => $share->getShareOwner() !== $userId && $share->getSharedBy() !== $userId, $shares); } - $shares = iter\filter(function (IShare $share) { + $shares = filter(function (IShare $share) { try { $userFolder = $this->rootFolder->getUserFolder($share->getShareOwner()); - } catch (NoUserException $e) { + } catch (NoUserException) { return false; - } catch (\Throwable $e) { + } catch (Throwable) { return false; } $nodes = $userFolder->getById($share->getNodeId()); @@ -209,17 +187,15 @@ public function getSub(string $userId, int $filter, string $path): \Iterator { return $shares; } - public function getFormattedShares(?string $userId = null, int $filter = self::FILTER_NONE, ?string $path = null, ?string $token = null): \Iterator { + public function getFormattedShares(?string $userId = null, int $filter = self::FILTER_NONE, ?string $path = null, ?string $token = null): Iterator { $shares = $this->get($userId, $filter, $path, $token); - $formattedShares = iter\map(function (IShare $share): array { - return $this->formatShare($share); - }, $shares); + $formattedShares = map(fn (IShare $share): array => $this->formatShare($share), $shares); return $formattedShares; } - private function getShares(?string $userId): \Iterator { + private function getShares(?string $userId): Iterator { if (empty($userId)) { $shares = $this->shareManager->getAllShares(); } else { @@ -228,7 +204,7 @@ private function getShares(?string $userId): \Iterator { foreach ($shareTypes as $shareType) { $shares = $this->shareManager->getSharesBy($userId, $shareType, null, true, -1, 0); - if ($shareType !== \OCP\Share\IShare::TYPE_LINK) { + if ($shareType !== IShare::TYPE_LINK) { foreach ($shares as $share) { yield $share; } @@ -293,26 +269,14 @@ public function formatShare(IShare $share): array { } public function filterStringToInt(?string $filterString): int { - switch ($filterString) { - case 'owner': - $filter = SharesList::FILTER_OWNER; - break; - case 'initiator': - $filter = SharesList::FILTER_INITIATOR; - break; - case 'recipient': - $filter = SharesList::FILTER_RECIPIENT; - break; - case 'has-expiration': - $filter = SharesList::FILTER_HAS_EXPIRATION; - break; - case 'no-expiration': - $filter = SharesList::FILTER_NO_EXPIRATION; - break; - default: - $filter = SharesList::FILTER_NONE; - break; - } + $filter = match ($filterString) { + 'owner' => SharesList::FILTER_OWNER, + 'initiator' => SharesList::FILTER_INITIATOR, + 'recipient' => SharesList::FILTER_RECIPIENT, + 'has-expiration' => SharesList::FILTER_HAS_EXPIRATION, + 'no-expiration' => SharesList::FILTER_NO_EXPIRATION, + default => SharesList::FILTER_NONE, + }; return $filter; } diff --git a/rector.php b/rector.php new file mode 100644 index 00000000..921dc597 --- /dev/null +++ b/rector.php @@ -0,0 +1,33 @@ +paths([ + __DIR__ . '/lib', + __DIR__ . '/tests', + ]); + $rectorConfig->phpVersion(PhpVersion::PHP_80); + $rectorConfig->importNames(); + $rectorConfig->indent(' ', 1); + $rectorConfig->sets([ + SetList::PHP_74, + SetList::PHP_80, + SetList::PHP_81, + ]); + $rectorConfig->rule(ReturnTypeFromStrictTypedPropertyRector::class); + $rectorConfig->rule(ReturnUnionTypeRector::class); + $rectorConfig->skip([ + RemoveParentCallWithoutParentRector::class, + ]); +}; diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 6c99ad2e..5ca4dff7 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -4,8 +4,8 @@ require_once __DIR__ . '/../../../lib/base.php'; -\OC::$composerAutoloader->addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true); -\OC::$composerAutoloader->addPsr4('Tests\\', OC::$SERVERROOT . '/tests/', true); +OC::$composerAutoloader->addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true); +OC::$composerAutoloader->addPsr4('Tests\\', OC::$SERVERROOT . '/tests/', true); OC_App::loadApp('sharelisting'); diff --git a/vendor-bin/rector/composer.json b/vendor-bin/rector/composer.json new file mode 100644 index 00000000..f1665f7b --- /dev/null +++ b/vendor-bin/rector/composer.json @@ -0,0 +1,5 @@ +{ + "require-dev": { + "rector/rector": "^2.0.3" + } +} diff --git a/vendor-bin/rector/composer.lock b/vendor-bin/rector/composer.lock new file mode 100644 index 00000000..9ab28847 --- /dev/null +++ b/vendor-bin/rector/composer.lock @@ -0,0 +1,137 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "8a84964474078d40b777b23356ba19ac", + "packages": [], + "packages-dev": [ + { + "name": "phpstan/phpstan", + "version": "2.1.22", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/41600c8379eb5aee63e9413fe9e97273e25d57e4", + "reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "time": "2025-08-04T19:17:37+00:00" + }, + { + "name": "rector/rector", + "version": "2.1.4", + "source": { + "type": "git", + "url": "https://github.com/rectorphp/rector.git", + "reference": "fe613c528819222f8686a9a037a315ef9d4915b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/fe613c528819222f8686a9a037a315ef9d4915b3", + "reference": "fe613c528819222f8686a9a037a315ef9d4915b3", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0", + "phpstan/phpstan": "^2.1.18" + }, + "conflict": { + "rector/rector-doctrine": "*", + "rector/rector-downgrade-php": "*", + "rector/rector-phpunit": "*", + "rector/rector-symfony": "*" + }, + "suggest": { + "ext-dom": "To manipulate phpunit.xml via the custom-rule command" + }, + "bin": [ + "bin/rector" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Instant Upgrade and Automated Refactoring of any PHP code", + "homepage": "https://getrector.com/", + "keywords": [ + "automation", + "dev", + "migration", + "refactoring" + ], + "support": { + "issues": "https://github.com/rectorphp/rector/issues", + "source": "https://github.com/rectorphp/rector/tree/2.1.4" + }, + "funding": [ + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "time": "2025-08-15T14:41:36+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": false, + "prefer-lowest": false, + "platform": {}, + "platform-dev": {}, + "plugin-api-version": "2.6.0" +} From 3131ed10a2bd56a531a9a3b7c27777101e78f1fd Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Thu, 21 Aug 2025 16:18:48 +0200 Subject: [PATCH 2/2] chore(rector): Apply nextcloud 30 set Signed-off-by: Carl Schwan --- lib/Controller/ApiController.php | 24 +- rector.php | 2 + tests/bootstrap.php | 17 +- vendor-bin/rector/composer.json | 3 +- vendor-bin/rector/composer.lock | 374 ++++++++++++++++++++++++++++++- 5 files changed, 390 insertions(+), 30 deletions(-) diff --git a/lib/Controller/ApiController.php b/lib/Controller/ApiController.php index e5df76f2..a2db11f9 100644 --- a/lib/Controller/ApiController.php +++ b/lib/Controller/ApiController.php @@ -30,7 +30,6 @@ use OCP\AppFramework\OCS\OCSNotFoundException; use OCP\AppFramework\OCSController; use OCP\IRequest; -use OCP\IUserManager; use OCP\IUserSession; use OCP\Share\IShare; use function iter\filter; @@ -38,31 +37,13 @@ use function iter\toArray; class ApiController extends OCSController { - - /** @var IUserSession */ - protected $userSession; - - /** @var SharesList */ - protected $sharesList; - - /** - * @param string $appName - * @param IRequest $request - * @param IUserSession $userSession - * @param IUserManager $userManager - * @param SharesList $sharesList - */ public function __construct( string $appName, IRequest $request, - IUserSession $userSession, - private IUserManager $userManager, - SharesList $sharesList, + private IUserSession $userSession, + private SharesList $sharesList, ) { parent::__construct($appName, $request); - - $this->userSession = $userSession; - $this->sharesList = $sharesList; } /** @@ -71,7 +52,6 @@ public function __construct( * Get shared sub folders of a fiven path * * @param string $path path of the current folder - * @return DataResponse */ public function getSharedSubfolders(string $path): DataResponse { $currentUser = $this->userSession->getUser(); diff --git a/rector.php b/rector.php index 921dc597..b1f8b0f8 100644 --- a/rector.php +++ b/rector.php @@ -5,6 +5,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ +use Nextcloud\Rector\Set\NextcloudSets; use Rector\Config\RectorConfig; use Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector; use Rector\Set\ValueObject\SetList; @@ -24,6 +25,7 @@ SetList::PHP_74, SetList::PHP_80, SetList::PHP_81, + NextcloudSets::NEXTCLOUD_30, ]); $rectorConfig->rule(ReturnTypeFromStrictTypedPropertyRector::class); $rectorConfig->rule(ReturnUnionTypeRector::class); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 5ca4dff7..2d0257b4 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,12 +1,17 @@ addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true); -OC::$composerAutoloader->addPsr4('Tests\\', OC::$SERVERROOT . '/tests/', true); +use OCP\App\IAppManager; +use OCP\Server; -OC_App::loadApp('sharelisting'); +require_once __DIR__ . '/../../../lib/base.php'; +require_once __DIR__ . '/../../../tests/autoload.php'; +require_once __DIR__ . '/../vendor/autoload.php'; -OC_Hook::clear(); +Server::get(IAppManager::class)->loadApp('sharelisting'); diff --git a/vendor-bin/rector/composer.json b/vendor-bin/rector/composer.json index f1665f7b..f934264a 100644 --- a/vendor-bin/rector/composer.json +++ b/vendor-bin/rector/composer.json @@ -1,5 +1,6 @@ { "require-dev": { - "rector/rector": "^2.0.3" + "rector/rector": "^2.0.3", + "nextcloud/rector": "^0.4.1" } } diff --git a/vendor-bin/rector/composer.lock b/vendor-bin/rector/composer.lock index 9ab28847..34bff9c3 100644 --- a/vendor-bin/rector/composer.lock +++ b/vendor-bin/rector/composer.lock @@ -4,9 +4,122 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8a84964474078d40b777b23356ba19ac", + "content-hash": "cec8edb0c51f13652d5a1bf7362e3ef1", "packages": [], "packages-dev": [ + { + "name": "nextcloud/ocp", + "version": "v31.0.8", + "source": { + "type": "git", + "url": "https://github.com/nextcloud-deps/ocp.git", + "reference": "abd32429d794ede1d92b7b0a88a1070371c907b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/abd32429d794ede1d92b7b0a88a1070371c907b5", + "reference": "abd32429d794ede1d92b7b0a88a1070371c907b5", + "shasum": "" + }, + "require": { + "php": "~8.1 || ~8.2 || ~8.3 || ~8.4", + "psr/clock": "^1.0", + "psr/container": "^2.0.2", + "psr/event-dispatcher": "^1.0", + "psr/log": "^3.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-stable31": "31.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/v31.0.8" + }, + "time": "2025-07-31T00:57:37+00:00" + }, + { + "name": "nextcloud/rector", + "version": "v0.4.1", + "source": { + "type": "git", + "url": "https://github.com/nextcloud-libraries/rector.git", + "reference": "9c5c78cc323537ec6dba5b3cd9c422ff9524d8cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nextcloud-libraries/rector/zipball/9c5c78cc323537ec6dba5b3cd9c422ff9524d8cf", + "reference": "9c5c78cc323537ec6dba5b3cd9c422ff9524d8cf", + "shasum": "" + }, + "require": { + "nextcloud/ocp": ">=27", + "php": "^8.1", + "rector/rector": "^2.0.4", + "webmozart/assert": "^1.11" + }, + "require-dev": { + "phpunit/phpunit": "^10.5", + "ramsey/devtools": "^2.0" + }, + "type": "library", + "extra": { + "captainhook": { + "force-install": true + }, + "ramsey/devtools": { + "memory-limit": "-1", + "command-prefix": "dev" + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" + } + }, + "autoload": { + "psr-4": { + "OCP\\": "vendor/nextcloud/ocp/OCP", + "Nextcloud\\Rector\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Christoph Wurst", + "email": "christoph@winzerhof-wurst.at", + "homepage": "https://wuc.me" + } + ], + "description": "Rector upgrade rules for Nextcloud", + "keywords": [ + "nextcloud", + "refactoring" + ], + "support": { + "issues": "https://github.com/nextcloud-libraries/rector/issues", + "source": "https://github.com/nextcloud-libraries/rector/tree/v0.4.1" + }, + "time": "2025-03-31T15:27:10+00:00" + }, { "name": "phpstan/phpstan", "version": "2.1.22", @@ -65,6 +178,207 @@ ], "time": "2025-08-04T19:17:37+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/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" + }, { "name": "rector/rector", "version": "2.1.4", @@ -124,6 +438,64 @@ } ], "time": "2025-08-15T14:41:36+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" } ], "aliases": [],