From ca1ab8ef5665091a64a600a04ce6355534b9d350 Mon Sep 17 00:00:00 2001 From: Oleksander Piskun Date: Mon, 27 Jul 2026 14:32:21 +0000 Subject: [PATCH 1/2] chore: update psalm to 6.16 and refresh the baseline Signed-off-by: Oleksander Piskun --- composer.json | 2 +- composer.lock | 121 +++------------------------------------ tests/psalm-baseline.xml | 5 +- 3 files changed, 10 insertions(+), 118 deletions(-) diff --git a/composer.json b/composer.json index 471ea5a..c02a42f 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "nextcloud/ocp": "dev-master", "nextcloud/coding-standard": "^1.1", "phpunit/phpunit": "^10", - "psalm/phar": "6.7.x" + "psalm/phar": "^6.16" }, "require": { "php": ">=8.2.0" diff --git a/composer.lock b/composer.lock index c26ebe6..15a0b5f 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": "3108b517c156f755f638f643cdcc6991", + "content-hash": "5d5ed57d17989655396fc3ea239d1ee1", "packages": [], "packages-dev": [ { @@ -873,20 +873,20 @@ }, { "name": "psalm/phar", - "version": "6.7.1", + "version": "6.16.1", "source": { "type": "git", "url": "https://github.com/psalm/phar.git", - "reference": "a7112d33cfd48d857c2eb730ea642046d21bbdf5" + "reference": "11c6b55449667837fc07bb2a456c45a137c05ecd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/psalm/phar/zipball/a7112d33cfd48d857c2eb730ea642046d21bbdf5", - "reference": "a7112d33cfd48d857c2eb730ea642046d21bbdf5", + "url": "https://api.github.com/repos/psalm/phar/zipball/11c6b55449667837fc07bb2a456c45a137c05ecd", + "reference": "11c6b55449667837fc07bb2a456c45a137c05ecd", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.2" }, "conflict": { "vimeo/psalm": "*" @@ -902,9 +902,9 @@ "description": "Composer-based Psalm Phar", "support": { "issues": "https://github.com/psalm/phar/issues", - "source": "https://github.com/psalm/phar/tree/6.7.1" + "source": "https://github.com/psalm/phar/tree/6.16.1" }, - "time": "2025-02-17T10:54:35+00:00" + "time": "2026-03-19T11:11:23+00:00" }, { "name": "psr/clock", @@ -1057,111 +1057,6 @@ }, "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", diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml index 554ec48..a022ece 100644 --- a/tests/psalm-baseline.xml +++ b/tests/psalm-baseline.xml @@ -1,5 +1,5 @@ - + @@ -28,8 +28,5 @@ - - - From 8a8085549fc5136c851c8e4dc3eeb55afa40cf3f Mon Sep 17 00:00:00 2001 From: Oleksander Piskun Date: Mon, 27 Jul 2026 14:33:29 +0000 Subject: [PATCH 2/2] chore: update nextcloud/coding-standard to 1.5 and apply cs:fix Signed-off-by: Oleksander Piskun --- composer.json | 2 +- composer.lock | 40 +++++++++++------------ lib/AppInfo/Application.php | 1 - lib/BackgroundJob/CheckOpenTickets.php | 1 - lib/Controller/ConfigController.php | 1 - lib/Controller/JiraAPIController.php | 1 - lib/Dashboard/JiraWidget.php | 1 - lib/Dashboard/JiraWidgetWithFilter.php | 1 - lib/Notification/Notifier.php | 1 - lib/Reference/JiraReferenceProvider.php | 1 - lib/Service/NetworkService.php | 2 -- lib/Settings/Admin.php | 1 - lib/Settings/Personal.php | 1 - tests/unit/Service/JiraAPIServiceTest.php | 1 - 14 files changed, 21 insertions(+), 34 deletions(-) diff --git a/composer.json b/composer.json index c02a42f..202b608 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "minimum-stability": "stable", "require-dev": { "nextcloud/ocp": "dev-master", - "nextcloud/coding-standard": "^1.1", + "nextcloud/coding-standard": "^1.5", "phpunit/phpunit": "^10", "psalm/phar": "^6.16" }, diff --git a/composer.lock b/composer.lock index 15a0b5f..096964c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,21 +4,21 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5d5ed57d17989655396fc3ea239d1ee1", + "content-hash": "a24721639308947ca7563ae4b0a3e50c", "packages": [], "packages-dev": [ { "name": "kubawerlos/php-cs-fixer-custom-fixers", - "version": "v3.35.1", + "version": "v3.37.2", "source": { "type": "git", "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", - "reference": "2a35f80ae24ca77443a7af1599c3a3db1b6bd395" + "reference": "678df979ce743466b42ddb6eea46b3f4c9a7bade" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/2a35f80ae24ca77443a7af1599c3a3db1b6bd395", - "reference": "2a35f80ae24ca77443a7af1599c3a3db1b6bd395", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/678df979ce743466b42ddb6eea46b3f4c9a7bade", + "reference": "678df979ce743466b42ddb6eea46b3f4c9a7bade", "shasum": "" }, "require": { @@ -28,7 +28,7 @@ "php": "^7.4 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.6.24 || ^10.5.51 || ^11.5.32" + "phpunit/phpunit": "^9.6.34 || ^10.5.63 || ^11.5.55" }, "type": "library", "autoload": { @@ -49,7 +49,7 @@ "description": "A set of custom fixers for PHP CS Fixer", "support": { "issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues", - "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.35.1" + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.37.2" }, "funding": [ { @@ -57,7 +57,7 @@ "type": "github" } ], - "time": "2025-09-28T18:43:35+00:00" + "time": "2026-05-12T16:22:19+00:00" }, { "name": "myclabs/deep-copy", @@ -121,16 +121,16 @@ }, { "name": "nextcloud/coding-standard", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "8e06808c1423e9208d63d1bd205b9a38bd400011" + "reference": "80547a93236fbb9c783e05f0f0899043851b0dba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/8e06808c1423e9208d63d1bd205b9a38bd400011", - "reference": "8e06808c1423e9208d63d1bd205b9a38bd400011", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/80547a93236fbb9c783e05f0f0899043851b0dba", + "reference": "80547a93236fbb9c783e05f0f0899043851b0dba", "shasum": "" }, "require": { @@ -160,9 +160,9 @@ ], "support": { "issues": "https://github.com/nextcloud/coding-standard/issues", - "source": "https://github.com/nextcloud/coding-standard/tree/v1.4.0" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.5.0" }, - "time": "2025-06-19T12:27:27+00:00" + "time": "2026-05-19T18:30:09+00:00" }, { "name": "nextcloud/ocp", @@ -391,16 +391,16 @@ }, { "name": "php-cs-fixer/shim", - "version": "v3.89.1", + "version": "v3.95.17", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/shim.git", - "reference": "69182624902af6b2adafb30e2a092f0e6dd89fab" + "reference": "fe9462e0b3e59b33ee076f6eda626b474b8cf363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/69182624902af6b2adafb30e2a092f0e6dd89fab", - "reference": "69182624902af6b2adafb30e2a092f0e6dd89fab", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/fe9462e0b3e59b33ee076f6eda626b474b8cf363", + "reference": "fe9462e0b3e59b33ee076f6eda626b474b8cf363", "shasum": "" }, "require": { @@ -437,9 +437,9 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/PHP-CS-Fixer/shim/issues", - "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.89.1" + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.95.17" }, - "time": "2025-10-24T12:05:38+00:00" + "time": "2026-07-24T13:55:04+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 3d09f73..6e2f2e2 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -15,7 +15,6 @@ use OCA\Jira\Search\JiraSearchProvider; use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootContext; - use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\Collaboration\Reference\RenderReferenceEvent; diff --git a/lib/BackgroundJob/CheckOpenTickets.php b/lib/BackgroundJob/CheckOpenTickets.php index f7b7203..3c2344d 100644 --- a/lib/BackgroundJob/CheckOpenTickets.php +++ b/lib/BackgroundJob/CheckOpenTickets.php @@ -11,7 +11,6 @@ use OCA\Jira\Service\JiraAPIService; use OCP\AppFramework\Utility\ITimeFactory; use OCP\BackgroundJob\TimedJob; - use Psr\Log\LoggerInterface; /** diff --git a/lib/Controller/ConfigController.php b/lib/Controller/ConfigController.php index a33d1d4..836f33e 100644 --- a/lib/Controller/ConfigController.php +++ b/lib/Controller/ConfigController.php @@ -18,7 +18,6 @@ use OCP\AppFramework\Http\RedirectResponse; use OCP\IConfig; use OCP\IL10N; - use OCP\IRequest; use OCP\IURLGenerator; use OCP\PreConditionNotMetException; diff --git a/lib/Controller/JiraAPIController.php b/lib/Controller/JiraAPIController.php index f92e078..c5b1ec7 100644 --- a/lib/Controller/JiraAPIController.php +++ b/lib/Controller/JiraAPIController.php @@ -11,7 +11,6 @@ use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataDisplayResponse; use OCP\AppFramework\Http\DataResponse; - use OCP\IRequest; class JiraAPIController extends Controller { diff --git a/lib/Dashboard/JiraWidget.php b/lib/Dashboard/JiraWidget.php index 63e6228..a2d2773 100644 --- a/lib/Dashboard/JiraWidget.php +++ b/lib/Dashboard/JiraWidget.php @@ -11,7 +11,6 @@ use OCP\Dashboard\IWidget; use OCP\IL10N; use OCP\IURLGenerator; - use OCP\Util; class JiraWidget implements IWidget { diff --git a/lib/Dashboard/JiraWidgetWithFilter.php b/lib/Dashboard/JiraWidgetWithFilter.php index 456ac8f..438673f 100644 --- a/lib/Dashboard/JiraWidgetWithFilter.php +++ b/lib/Dashboard/JiraWidgetWithFilter.php @@ -11,7 +11,6 @@ use OCP\Dashboard\IWidget; use OCP\IL10N; use OCP\IURLGenerator; - use OCP\Util; class JiraWidgetWithFilter implements IWidget { diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php index 7b1110d..b709955 100644 --- a/lib/Notification/Notifier.php +++ b/lib/Notification/Notifier.php @@ -92,7 +92,6 @@ public function prepare(INotification $notification, string $languageCode): INot ->setIcon($this->url->getAbsoluteURL($this->url->imagePath(Application::APP_ID, 'app-dark.svg'))); //->setIcon($this->url->getAbsoluteURL($iconUrl)); return $notification; - default: // Unknown subject => Unknown notification => throw throw new UnknownNotificationException(); diff --git a/lib/Reference/JiraReferenceProvider.php b/lib/Reference/JiraReferenceProvider.php index c3fc79f..1d3e9b2 100644 --- a/lib/Reference/JiraReferenceProvider.php +++ b/lib/Reference/JiraReferenceProvider.php @@ -18,7 +18,6 @@ use OCP\Collaboration\Reference\Reference; use OCP\IConfig; use OCP\IL10N; - use OCP\IURLGenerator; use Throwable; diff --git a/lib/Service/NetworkService.php b/lib/Service/NetworkService.php index 1bc30c7..711d69f 100644 --- a/lib/Service/NetworkService.php +++ b/lib/Service/NetworkService.php @@ -12,7 +12,6 @@ use GuzzleHttp\Exception\ClientException; use GuzzleHttp\Exception\ServerException; use OCA\Jira\AppInfo\Application; - use OCP\Http\Client\IClient; use OCP\Http\Client\IClientService; use OCP\Http\Client\IResponse; @@ -21,7 +20,6 @@ use OCP\PreConditionNotMetException; use OCP\Security\ICrypto; use Psr\Log\LoggerInterface; - use Throwable; /** diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php index 28b75e6..72aaa9b 100644 --- a/lib/Settings/Admin.php +++ b/lib/Settings/Admin.php @@ -11,7 +11,6 @@ use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Services\IInitialState; use OCP\IConfig; - use OCP\Settings\ISettings; class Admin implements ISettings { diff --git a/lib/Settings/Personal.php b/lib/Settings/Personal.php index ef5071a..607b281 100644 --- a/lib/Settings/Personal.php +++ b/lib/Settings/Personal.php @@ -11,7 +11,6 @@ use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Services\IInitialState; use OCP\IConfig; - use OCP\Settings\ISettings; class Personal implements ISettings { diff --git a/tests/unit/Service/JiraAPIServiceTest.php b/tests/unit/Service/JiraAPIServiceTest.php index bf57668..d2d2376 100644 --- a/tests/unit/Service/JiraAPIServiceTest.php +++ b/tests/unit/Service/JiraAPIServiceTest.php @@ -16,7 +16,6 @@ use OCP\IUserManager; use OCP\Notification\IManager as INotificationManager; use OCP\Security\ICrypto; - use PHPUnit\Framework\TestCase; class JiraAPIServiceTest extends TestCase {