From 8d960f1b23d1c07d5e162bcdfd4a8f0f4f885ffb Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 27 Jan 2026 21:10:54 +0100 Subject: [PATCH 1/5] build(deps): drop support for NC 30 and 31 Signed-off-by: Arthur Schiwon --- .github/workflows/integration.yml | 12 +++++----- appinfo/info.xml | 4 ++-- vendor-bin/psalm/composer.json | 2 +- vendor-bin/psalm/composer.lock | 40 +++++++++++++++++-------------- 4 files changed, 31 insertions(+), 27 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 7b837bd73..952391e93 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -43,7 +43,7 @@ jobs: matrix: php-versions: [ "8.1", "8.2", "8.3", "8.4" ] databases: [ "mysql" ] - server-versions: [ "stable30", "stable31", "stable32", "stable33", "master" ] + server-versions: [ "stable32", "stable33", "master" ] exclude: - server-versions: "master" php-versions: "8.1" @@ -51,17 +51,17 @@ jobs: - server-versions: "stable33" php-versions: "8.1" databases: "mysql" - - server-versions: "stable30" + - server-versions: "stable33" php-versions: "8.2" databases: "mysql" - - server-versions: "stable30" - php-versions: "8.4" + - server-versions: "stable33" + php-versions: "8.3" databases: "mysql" include: - - server-versions: "stable30" + - server-versions: "stable32" php-versions: "8.3" databases: "sqlite" - - server-versions: "stable30" + - server-versions: "stable32" php-versions: "8.3" databases: "pgsql" - server-versions: "master" diff --git a/appinfo/info.xml b/appinfo/info.xml index a497101aa..166250dc2 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -20,7 +20,7 @@ The following providers are supported and tested at the moment: * Any other provider that authenticates using the environment variable While theoretically any other authentication provider implementing either one of those standards is compatible, we like to note that they are not part of any internal test matrix.]]> - 7.1.4 + 8.0.0-dev.0 agpl Lukas Reschke User_SAML @@ -37,7 +37,7 @@ While theoretically any other authentication provider implementing either one of https://raw.githubusercontent.com/nextcloud/user_saml/master/screenshots/1.png https://raw.githubusercontent.com/nextcloud/user_saml/master/screenshots/2.png - + OCA\User_SAML\Jobs\CleanSessionData diff --git a/vendor-bin/psalm/composer.json b/vendor-bin/psalm/composer.json index 8373bac9c..52adbb7cc 100644 --- a/vendor-bin/psalm/composer.json +++ b/vendor-bin/psalm/composer.json @@ -1,6 +1,6 @@ { "require-dev": { - "nextcloud/ocp": "dev-stable30", + "nextcloud/ocp": "dev-stable32", "vimeo/psalm": "^6.14", "sabre/dav": "4.7.0" }, diff --git a/vendor-bin/psalm/composer.lock b/vendor-bin/psalm/composer.lock index 75c8c8f65..a1d8e4e84 100644 --- a/vendor-bin/psalm/composer.lock +++ b/vendor-bin/psalm/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": "6c4a4f56f6d1bec0dc8b633575727189", + "content-hash": "088ee6b15faa67e457e1427955f8625c", "packages": [], "packages-dev": [ { @@ -1628,29 +1628,29 @@ }, { "name": "nextcloud/ocp", - "version": "dev-stable30", + "version": "dev-stable32", "source": { "type": "git", "url": "https://github.com/nextcloud-deps/ocp.git", - "reference": "d93fc10fea3db4b4896e37db312fae685cff54c4" + "reference": "f49cc367ee1a0216b7783b1b7a7f23dace6dd7c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/d93fc10fea3db4b4896e37db312fae685cff54c4", - "reference": "d93fc10fea3db4b4896e37db312fae685cff54c4", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/f49cc367ee1a0216b7783b1b7a7f23dace6dd7c5", + "reference": "f49cc367ee1a0216b7783b1b7a7f23dace6dd7c5", "shasum": "" }, "require": { - "php": "~8.0 || ~8.1 || ~8.2 || ~8.3", + "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": "^2.0.0" + "psr/log": "^3.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-stable30": "30.0.0-dev" + "dev-stable32": "32.0.0-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -1661,14 +1661,18 @@ { "name": "Christoph Wurst", "email": "christoph@winzerhof-wurst.at" + }, + { + "name": "Joas Schilling", + "email": "coding@schilljs.com" } ], - "description": "Composer package containing Nextcloud's public API (classes, interfaces)", + "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/stable30" + "source": "https://github.com/nextcloud-deps/ocp/tree/stable32" }, - "time": "2025-12-02T00:53:40+00:00" + "time": "2026-01-21T00:58:32+00:00" }, { "name": "nikic/php-parser", @@ -2212,16 +2216,16 @@ }, { "name": "psr/log", - "version": "2.0.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", - "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { @@ -2230,7 +2234,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { @@ -2256,9 +2260,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/2.0.0" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2021-07-14T16:41:46+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { "name": "revolt/event-loop", From c5e2263f54ae029a59b784a419556bcbf36dcdbc Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 27 Jan 2026 21:59:17 +0100 Subject: [PATCH 2/5] build(dev-deps): update rector Signed-off-by: Arthur Schiwon --- vendor-bin/rector/composer.lock | 68 ++++++++++++++++----------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/vendor-bin/rector/composer.lock b/vendor-bin/rector/composer.lock index 4a771dca3..9bf4fafa2 100644 --- a/vendor-bin/rector/composer.lock +++ b/vendor-bin/rector/composer.lock @@ -9,16 +9,16 @@ "packages-dev": [ { "name": "nextcloud/ocp", - "version": "v31.0.4", + "version": "v32.0.5", "source": { "type": "git", "url": "https://github.com/nextcloud-deps/ocp.git", - "reference": "1fb984268039921920ade298ef5a58e8fe3de7da" + "reference": "a79703d9f38e964b003ae1cc805b6531d142fa93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/1fb984268039921920ade298ef5a58e8fe3de7da", - "reference": "1fb984268039921920ade298ef5a58e8fe3de7da", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/a79703d9f38e964b003ae1cc805b6531d142fa93", + "reference": "a79703d9f38e964b003ae1cc805b6531d142fa93", "shasum": "" }, "require": { @@ -31,7 +31,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-stable31": "31.0.0-dev" + "dev-stable32": "32.0.0-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -51,9 +51,9 @@ "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.4" + "source": "https://github.com/nextcloud-deps/ocp/tree/v32.0.5" }, - "time": "2025-04-15T00:50:16+00:00" + "time": "2026-01-09T00:57:52+00:00" }, { "name": "nextcloud/rector", @@ -122,16 +122,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.13", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "e55e03e6d4ac49cd1240907e5b08e5cd378572a9" - }, + "version": "2.1.37", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e55e03e6d4ac49cd1240907e5b08e5cd378572a9", - "reference": "e55e03e6d4ac49cd1240907e5b08e5cd378572a9", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/28cd424c5ea984128c95cfa7ea658808e8954e49", + "reference": "28cd424c5ea984128c95cfa7ea658808e8954e49", "shasum": "" }, "require": { @@ -176,7 +171,7 @@ "type": "github" } ], - "time": "2025-04-27T12:28:25+00:00" + "time": "2026-01-24T08:21:55+00:00" }, { "name": "psr/clock", @@ -381,21 +376,21 @@ }, { "name": "rector/rector", - "version": "2.0.14", + "version": "2.3.4", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "63923bc9383c1212476c41d8cebf58a425e6f98d" + "reference": "9227d7a24b0f23ae941057509364f948d5da9ab2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/63923bc9383c1212476c41d8cebf58a425e6f98d", - "reference": "63923bc9383c1212476c41d8cebf58a425e6f98d", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/9227d7a24b0f23ae941057509364f948d5da9ab2", + "reference": "9227d7a24b0f23ae941057509364f948d5da9ab2", "shasum": "" }, "require": { "php": "^7.4|^8.0", - "phpstan/phpstan": "^2.1.12" + "phpstan/phpstan": "^2.1.36" }, "conflict": { "rector/rector-doctrine": "*", @@ -420,6 +415,7 @@ "MIT" ], "description": "Instant Upgrade and Automated Refactoring of any PHP code", + "homepage": "https://getrector.com/", "keywords": [ "automation", "dev", @@ -428,7 +424,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/2.0.14" + "source": "https://github.com/rectorphp/rector/tree/2.3.4" }, "funding": [ { @@ -436,32 +432,32 @@ "type": "github" } ], - "time": "2025-04-28T00:03:14+00:00" + "time": "2026-01-21T14:49:03+00:00" }, { "name": "webmozart/assert", - "version": "1.11.0", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + "reference": "9be6926d8b485f55b9229203f962b51ed377ba68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/9be6926d8b485f55b9229203f962b51ed377ba68", + "reference": "9be6926d8b485f55b9229203f962b51ed377ba68", "shasum": "" }, "require": { "ext-ctype": "*", + "ext-date": "*", + "ext-filter": "*", "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" + "suggest": { + "ext-intl": "", + "ext-simplexml": "", + "ext-spl": "" }, "type": "library", "extra": { @@ -492,9 +488,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" + "source": "https://github.com/webmozarts/assert/tree/1.12.1" }, - "time": "2022-06-03T18:03:27+00:00" + "time": "2025-10-29T15:56:20+00:00" } ], "aliases": [], @@ -504,5 +500,5 @@ "prefer-lowest": false, "platform": {}, "platform-dev": {}, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } From 0b3516ed16f25c099933913ef904f467c935ba71 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 27 Jan 2026 22:00:50 +0100 Subject: [PATCH 3/5] refactor: apply rector changes Signed-off-by: Arthur Schiwon --- lib/Command/UserAdd.php | 2 +- lib/Controller/SAMLController.php | 6 +++--- lib/Controller/SettingsController.php | 4 ++-- lib/Db/SessionData.php | 2 +- lib/Migration/Version5000Date20211025124248.php | 2 +- lib/SAMLSettings.php | 4 +--- lib/Service/SessionService.php | 2 +- lib/UserData.php | 2 +- lib/UserResolver.php | 4 ++-- tests/integration/features/bootstrap/FeatureContext.php | 8 ++++---- 10 files changed, 17 insertions(+), 19 deletions(-) diff --git a/lib/Command/UserAdd.php b/lib/Command/UserAdd.php index e77820d34..c43fd789d 100644 --- a/lib/Command/UserAdd.php +++ b/lib/Command/UserAdd.php @@ -20,7 +20,7 @@ class UserAdd extends Base { public function __construct( protected IUserManager $userManager, protected UserBackend $backend, - private LoggerInterface $logger, + private readonly LoggerInterface $logger, ) { parent::__construct(); } diff --git a/lib/Controller/SAMLController.php b/lib/Controller/SAMLController.php index dd48473e7..b1d481eb0 100644 --- a/lib/Controller/SAMLController.php +++ b/lib/Controller/SAMLController.php @@ -126,14 +126,14 @@ protected function assertGroupMemberships(): void { $settings = $this->samlSettings->get($this->session->get('user_saml.Idp') ?? 1); $rejectGroupsString = $settings['saml-user-filter-reject_groups'] ?? ''; - $rejectGroups = array_map('trim', explode(',', $rejectGroupsString)); + $rejectGroups = array_map(trim(...), explode(',', $rejectGroupsString)); if (!empty(array_intersect($groups, $rejectGroups))) { throw new UserFilterViolationException('User is member of a rejection group.'); } $requireGroupsString = trim($settings['saml-user-filter-require_groups'] ?? ''); - $requireGroups = array_map('trim', explode(',', $requireGroupsString)); + $requireGroups = array_map(trim(...), explode(',', $requireGroupsString)); if (!empty($requireGroupsString) && empty(array_intersect($groups, $requireGroups))) { throw new UserFilterViolationException('User is not member of a required group.'); } @@ -159,7 +159,7 @@ public function login(int $idp = 1): Http\RedirectResponse|Http\TemplateResponse $settings = $this->samlSettings->getOneLoginSettingsArray($idp); $auth = new Auth($settings); $passthroughParamsString = trim($settings['idp']['passthroughParameters'] ?? '') ; - $passthroughParams = array_map('trim', explode(',', $passthroughParamsString)); + $passthroughParams = array_map(trim(...), explode(',', $passthroughParamsString)); $passthroughValues = []; foreach ($passthroughParams as $passthroughParam) { diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index ba777fa0c..9b4a02862 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -61,12 +61,12 @@ public function getSamlProviderSettings(int $providerId): array { } foreach ($content as $setting => $details) { /* use security as category instead of security-* */ - if (str_starts_with($category, 'security-')) { + if (str_starts_with((string) $category, 'security-')) { $category = 'security'; } // make sure we properly fetch the attribute mapping // as this is the only category that has the saml- prefix on config keys - if (str_starts_with($category, 'attribute-mapping')) { + if (str_starts_with((string) $category, 'attribute-mapping')) { $category = 'attribute-mapping'; $key = 'saml-attribute-mapping' . '-' . $setting; } elseif ($category === 'name-id-formats') { diff --git a/lib/Db/SessionData.php b/lib/Db/SessionData.php index d19a7af5a..34152e174 100644 --- a/lib/Db/SessionData.php +++ b/lib/Db/SessionData.php @@ -35,7 +35,7 @@ public function setData(SessionDataModel $input): void { } public function getData(): SessionDataModel { - $deserialized = json_decode($this->data, true); + $deserialized = json_decode((string) $this->data, true); return SessionDataModel::fromInputArray($deserialized); } } diff --git a/lib/Migration/Version5000Date20211025124248.php b/lib/Migration/Version5000Date20211025124248.php index 7d061b880..4fa36d393 100644 --- a/lib/Migration/Version5000Date20211025124248.php +++ b/lib/Migration/Version5000Date20211025124248.php @@ -223,7 +223,7 @@ protected function fetchPrefixes(): array { if ($prefixes === false) { return [1]; // 1 is the default value for providerIds } - return array_map('intval', explode(',', (string)$prefixes)); + return array_map(intval(...), explode(',', (string)$prefixes)); } protected function deletePrefixes(): void { diff --git a/lib/SAMLSettings.php b/lib/SAMLSettings.php index 8f409bfd7..4c81f4dc4 100644 --- a/lib/SAMLSettings.php +++ b/lib/SAMLSettings.php @@ -197,9 +197,7 @@ public function get(int $id): array { * @throws InvalidArgumentException */ public function set(int $id, array $settings): void { - $settings = array_filter($settings, static function (string $configKey): bool { - return in_array($configKey, self::IDP_CONFIG_KEYS, true); - }, ARRAY_FILTER_USE_KEY); + $settings = array_filter($settings, static fn(string $configKey): bool => in_array($configKey, self::IDP_CONFIG_KEYS, true), ARRAY_FILTER_USE_KEY); $this->mapper->set($id, $settings); } diff --git a/lib/Service/SessionService.php b/lib/Service/SessionService.php index 4bad14cc2..b73a1fc0a 100644 --- a/lib/Service/SessionService.php +++ b/lib/Service/SessionService.php @@ -47,7 +47,7 @@ public function restoreSession(string $oldSessionId): void { $this->storeSessionDataInDatabase(); $this->logger->debug('SAML session successfully restored'); // we do not delete the old session automatically to avoid race conditions - } catch (DoesNotExistException|MultipleObjectsReturnedException|Exception $e) { + } catch (DoesNotExistException|MultipleObjectsReturnedException|Exception) { return; } } diff --git a/lib/UserData.php b/lib/UserData.php index 170790b2f..c341d9ff3 100644 --- a/lib/UserData.php +++ b/lib/UserData.php @@ -67,7 +67,7 @@ public function getGroups(): array { return is_array($this->attributes[$mapping]) ? $this->attributes[$mapping] - : array_map('trim', explode(',', (string)$this->attributes[$mapping])); + : array_map(trim(...), explode(',', (string)$this->attributes[$mapping])); } protected function extractSamlUserId(): string { diff --git a/lib/UserResolver.php b/lib/UserResolver.php index bd38595b5..e7c99f97f 100644 --- a/lib/UserResolver.php +++ b/lib/UserResolver.php @@ -119,9 +119,9 @@ protected function sanitizeUserIdCandidate(string $rawUidCandidate): ?string { // Remove accents $sanitized = preg_replace('#&([A-Za-z])(?:acute|cedil|caron|circ|grave|orn|ring|slash|th|tilde|uml);#', '\1', $sanitized); // Remove ligatures - $sanitized = preg_replace('#&([A-Za-z]{2})(?:lig);#', '\1', $sanitized); + $sanitized = preg_replace('#&([A-Za-z]{2})(?:lig);#', '\1', (string) $sanitized); // Remove unknown leftover entities - $sanitized = preg_replace('#&[^;]+;#', '', $sanitized); + $sanitized = preg_replace('#&[^;]+;#', '', (string) $sanitized); // Replacements $sanitized = str_replace(' ', '_', $sanitized); diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php index ec58532e0..746778eba 100644 --- a/tests/integration/features/bootstrap/FeatureContext.php +++ b/tests/integration/features/bootstrap/FeatureContext.php @@ -423,7 +423,7 @@ public function theUserValueShouldBe(string $key, string $value): void { if (is_array($actualValue)) { // transform array to string, ensuring values are in the same order $value = explode(',', $value); - $value = array_map('trim', $value); + $value = array_map(trim(...), $value); sort($value); $value = implode(',', $value); @@ -469,8 +469,8 @@ public function theGroupHasExactlyTheMembers(string $group, string $memberList): throw new UnexpectedValueException(sprintf('Expected 200 status code but got %d', $responseArray['meta']['statusCode'])); } - $expectedMembers = array_map('trim', explode(',', $memberList)); - $actualMembers = array_map('trim', $responseArray['data']['users']); + $expectedMembers = array_map(trim(...), explode(',', $memberList)); + $actualMembers = array_map(trim(...), $responseArray['data']['users']); sort($expectedMembers); sort($actualMembers); @@ -563,7 +563,7 @@ public function theUserIsPartOfTheseGroups(string $userId, string $groups) { ); $groupsActual = json_decode(trim($response), true)['groups']; - $groupsExpected = array_map('trim', explode(',', $groups)); + $groupsExpected = array_map(trim(...), explode(',', $groups)); foreach ($groupsExpected as $expectedGroup) { if (!in_array($expectedGroup, $groupsActual)) { From 3e2c4482df56ddc64555c1eff1e78d124dac2099 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 27 Jan 2026 22:01:43 +0100 Subject: [PATCH 4/5] build(dev-deps): update cs-fixer Signed-off-by: Arthur Schiwon --- vendor-bin/cs-fixer/composer.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/vendor-bin/cs-fixer/composer.lock b/vendor-bin/cs-fixer/composer.lock index b4d881184..a8be2f78b 100644 --- a/vendor-bin/cs-fixer/composer.lock +++ b/vendor-bin/cs-fixer/composer.lock @@ -9,26 +9,26 @@ "packages-dev": [ { "name": "kubawerlos/php-cs-fixer-custom-fixers", - "version": "v3.31.1", + "version": "v3.35.1", "source": { "type": "git", "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", - "reference": "207182775ff9121dafc1c8c3b28e9d3f2f567fe1" + "reference": "2a35f80ae24ca77443a7af1599c3a3db1b6bd395" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/207182775ff9121dafc1c8c3b28e9d3f2f567fe1", - "reference": "207182775ff9121dafc1c8c3b28e9d3f2f567fe1", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/2a35f80ae24ca77443a7af1599c3a3db1b6bd395", + "reference": "2a35f80ae24ca77443a7af1599c3a3db1b6bd395", "shasum": "" }, "require": { "ext-filter": "*", "ext-tokenizer": "*", - "friendsofphp/php-cs-fixer": "^3.84", + "friendsofphp/php-cs-fixer": "^3.87", "php": "^7.4 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.6.22 || 10.5.45 || ^11.5.7" + "phpunit/phpunit": "^9.6.24 || ^10.5.51 || ^11.5.32" }, "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.31.1" + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.35.1" }, "funding": [ { @@ -57,7 +57,7 @@ "type": "github" } ], - "time": "2025-07-21T18:19:38+00:00" + "time": "2025-09-28T18:43:35+00:00" }, { "name": "nextcloud/coding-standard", @@ -106,16 +106,16 @@ }, { "name": "php-cs-fixer/shim", - "version": "v3.84.0", + "version": "v3.93.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/shim.git", - "reference": "8208dabb176cbc03a76df5a908220dfb75c0af9a" + "reference": "a5666a80c1a02c6b9a63660d023e55ffddbe742e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/8208dabb176cbc03a76df5a908220dfb75c0af9a", - "reference": "8208dabb176cbc03a76df5a908220dfb75c0af9a", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/a5666a80c1a02c6b9a63660d023e55ffddbe742e", + "reference": "a5666a80c1a02c6b9a63660d023e55ffddbe742e", "shasum": "" }, "require": { @@ -152,9 +152,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.84.0" + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.93.0" }, - "time": "2025-07-15T18:22:22+00:00" + "time": "2026-01-23T17:33:44+00:00" } ], "aliases": [], @@ -167,5 +167,5 @@ "platform-overrides": { "php": "8.1.32" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } From 8ff477c76e672725e3001c8dc1923837a68a4466 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 27 Jan 2026 22:04:04 +0100 Subject: [PATCH 5/5] style: apply cs-fixer Signed-off-by: Arthur Schiwon --- lib/Controller/SettingsController.php | 4 ++-- lib/Db/SessionData.php | 2 +- lib/SAMLSettings.php | 2 +- lib/UserResolver.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index 9b4a02862..e0a30997e 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -61,12 +61,12 @@ public function getSamlProviderSettings(int $providerId): array { } foreach ($content as $setting => $details) { /* use security as category instead of security-* */ - if (str_starts_with((string) $category, 'security-')) { + if (str_starts_with((string)$category, 'security-')) { $category = 'security'; } // make sure we properly fetch the attribute mapping // as this is the only category that has the saml- prefix on config keys - if (str_starts_with((string) $category, 'attribute-mapping')) { + if (str_starts_with((string)$category, 'attribute-mapping')) { $category = 'attribute-mapping'; $key = 'saml-attribute-mapping' . '-' . $setting; } elseif ($category === 'name-id-formats') { diff --git a/lib/Db/SessionData.php b/lib/Db/SessionData.php index 34152e174..b7763aca9 100644 --- a/lib/Db/SessionData.php +++ b/lib/Db/SessionData.php @@ -35,7 +35,7 @@ public function setData(SessionDataModel $input): void { } public function getData(): SessionDataModel { - $deserialized = json_decode((string) $this->data, true); + $deserialized = json_decode((string)$this->data, true); return SessionDataModel::fromInputArray($deserialized); } } diff --git a/lib/SAMLSettings.php b/lib/SAMLSettings.php index 4c81f4dc4..2d8a1133b 100644 --- a/lib/SAMLSettings.php +++ b/lib/SAMLSettings.php @@ -197,7 +197,7 @@ public function get(int $id): array { * @throws InvalidArgumentException */ public function set(int $id, array $settings): void { - $settings = array_filter($settings, static fn(string $configKey): bool => in_array($configKey, self::IDP_CONFIG_KEYS, true), ARRAY_FILTER_USE_KEY); + $settings = array_filter($settings, static fn (string $configKey): bool => in_array($configKey, self::IDP_CONFIG_KEYS, true), ARRAY_FILTER_USE_KEY); $this->mapper->set($id, $settings); } diff --git a/lib/UserResolver.php b/lib/UserResolver.php index e7c99f97f..5703d0a09 100644 --- a/lib/UserResolver.php +++ b/lib/UserResolver.php @@ -119,9 +119,9 @@ protected function sanitizeUserIdCandidate(string $rawUidCandidate): ?string { // Remove accents $sanitized = preg_replace('#&([A-Za-z])(?:acute|cedil|caron|circ|grave|orn|ring|slash|th|tilde|uml);#', '\1', $sanitized); // Remove ligatures - $sanitized = preg_replace('#&([A-Za-z]{2})(?:lig);#', '\1', (string) $sanitized); + $sanitized = preg_replace('#&([A-Za-z]{2})(?:lig);#', '\1', (string)$sanitized); // Remove unknown leftover entities - $sanitized = preg_replace('#&[^;]+;#', '', (string) $sanitized); + $sanitized = preg_replace('#&[^;]+;#', '', (string)$sanitized); // Replacements $sanitized = str_replace(' ', '_', $sanitized);