From d772b0d85a008767b15bfbff9be61e2f0932ad58 Mon Sep 17 00:00:00 2001 From: Oleksander Piskun Date: Mon, 9 Nov 2026 17:12:32 +0000 Subject: [PATCH] fix(deps): keep the app's brick/math within the range core's packages allow The app's Composer autoloader registers itself in front of Nextcloud's own, so for every class that is not loaded yet, the app's copy is the one the whole process gets. The app ships brick/math through ramsey/uuid: 0.18.0 in the released 3.5.2 and 3.6.0, 1.0.0 on main. All released versions of Nextcloud 33, 34 and 35, and master, ship brick/math 0.12.1 for spomky-labs/cbor-php, spomky-labs/pki-framework and web-auth/cose-lib, which allow it up to 0.12 only. With the app enabled they run against the app's copy, which no longer has BigInteger::testBit() (removed in 0.15.0, along with other breaking changes), so pki-framework's Real::fromFloat() fails with "Call to undefined method Brick\Math\BigInteger::testBit()". ramsey/uuid accepts brick/math ^0.12 as well, so requiring ^0.12 keeps the app's copy inside the range core's packages allow. The lock moves brick/math from 1.0.0 to 0.12.3; no other package changes. Dependabot ignores brick/math 0.13 and later from now on: it rewrites the constraint of a direct requirement when it bumps it, as it did for kiota-http-guzzle in #115. Signed-off-by: Oleksander Piskun --- .github/dependabot.yml | 6 ++++++ CHANGELOG.md | 1 + composer.json | 3 ++- composer.lock | 22 +++++++++++----------- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 803409a..dca999f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,6 +11,12 @@ updates: time: "03:00" timezone: Europe/Paris open-pull-requests-limit: 5 + ignore: + # The app's copy is loaded in place of Nextcloud's own, and + # Nextcloud's WebAuthn libraries allow brick/math up to 0.12. + # This also holds back security updates past 0.12. + - dependency-name: "brick/math" + versions: [">=0.13"] - package-ecosystem: "github-actions" directory: "/" schedule: diff --git a/CHANGELOG.md b/CHANGELOG.md index 70c408d..0e690d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Load the app config values only when the app needs them, they were loaded on every request of the instance - Refuse keys the admin settings do not send, and values that are not strings, instead of storing them +- Downgrade brick/math from 0.18 to 0.12, Nextcloud's WebAuthn libraries allow it up to 0.12 only and the app's copy is loaded in place of Nextcloud's own ## 3.6.0 - 2026-10-05 diff --git a/composer.json b/composer.json index 3153c58..8c66b82 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,8 @@ "ortic/color-converter": "^0.1.0", "microsoft/kiota-http-guzzle": "^2.0", "symfony/http-client": "^6.4", - "nyholm/psr7": "^1.8" + "nyholm/psr7": "^1.8", + "brick/math": "^0.12" }, "scripts": { "lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l", diff --git a/composer.lock b/composer.lock index 42a3b00..df2fe05 100644 --- a/composer.lock +++ b/composer.lock @@ -4,29 +4,29 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "45771e0d4d5cfa9679530ea7ab10b3a3", + "content-hash": "477fb697df1252443128c39d03acf51a", "packages": [ { "name": "brick/math", - "version": "1.0.0", + "version": "0.12.3", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "2effe05d2177c451b86c6a073196a4034c02f211" + "reference": "866551da34e9a618e64a819ee1e01c20d8a588ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/2effe05d2177c451b86c6a073196a4034c02f211", - "reference": "2effe05d2177c451b86c6a073196a4034c02f211", + "url": "https://api.github.com/repos/brick/math/zipball/866551da34e9a618e64a819ee1e01c20d8a588ba", + "reference": "866551da34e9a618e64a819ee1e01c20d8a588ba", "shasum": "" }, "require": { - "php": "^8.2" + "php": "^8.1" }, "require-dev": { - "phpstan/phpstan": "2.2.13", - "phpstan/phpstan-phpunit": "2.0.18", - "phpunit/phpunit": "^11.5" + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^10.1", + "vimeo/psalm": "6.8.8" }, "type": "library", "autoload": { @@ -56,7 +56,7 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/1.0.0" + "source": "https://github.com/brick/math/tree/0.12.3" }, "funding": [ { @@ -64,7 +64,7 @@ "type": "github" } ], - "time": "2026-09-12T10:28:18+00:00" + "time": "2025-02-28T13:11:00+00:00" }, { "name": "composer/semver",