Skip to content

Drop the ISecureRandom carve-out: upstream took the deprecation back - #255

Merged
nursoda merged 1 commit into
mainfrom
docs/drop-the-securerandom-carve-out
Sep 5, 2026
Merged

Drop the ISecureRandom carve-out: upstream took the deprecation back#255
nursoda merged 1 commit into
mainfrom
docs/drop-the-securerandom-carve-out

Conversation

@nursoda

@nursoda nursoda commented Sep 5, 2026

Copy link
Copy Markdown
Member

What this does

Removes the ISecureRandom::generate entry from REVIEW.md, the last piece of a
carve-out whose reason upstream withdrew.

The short history

  • 24 June 2026 — Nextcloud deprecates ISecureRandom::generate in favour of
    Random\Randomizer::getBytesFromString()
    (server#61538). That call needs
    PHP 8.3; this app's floor is 8.2 for as long as it supports Nextcloud 33.
  • 13 August 2026 — psalm is told to accept that one method, CompatibilityShimsTest
    holds the exception until the PHP floor reaches 8.3, and REVIEW.md records it.
  • 20 August 2026 — Nextcloud takes the deprecation back
    (server#63412): the interface is a
    service and therefore mockable in tests, the default character list would have to be
    copied to every caller, and it is used throughout the code base.

The annotation only ever lived on master. stable34 had branched off before it
landed, and stable35 branched on 5 September, after it was gone — so the suppression
never actually suppressed anything on an OCP version this app analyses against.

Why it still had to go

The psalm handler and its test went with #253. This REVIEW.md entry was left behind,
and a REVIEW.md entry exists to stop a reviewer raising a settled question — one that
states a withdrawn deprecation as current does the opposite.

Should Nextcloud deprecate the method again, DeprecatedMethod errorLevel="error" says
so on the next run; that was counter-proved in #253.

🤖 Generated with Claude Code, verified, tweaked and approved by @nursoda.

The path is written down now

doc/developers.md gains a section on what to do when an OCP method the app needs is
deprecated: show the annotation and name the pull request that added it, suppress the one
method by name rather than the issue type, register it in CompatibilityShimsTest with
the condition that ends it, and watch the branch the suppression is
actually needed for. The last step is the one that failed here: the guard was tied to this
repository's PHP floor while the real condition was an upstream decision. Reading the
installed vendor/nextcloud/ocp instead would have been wrong too — the annotation only
ever lived on the server's master, so such a guard would have demanded the suppression's
removal from day one, and its verdict would change with the OCP version of each matrix
job. The section also carries the search that finds a reversal, so that a missing
annotation is not read as one that never existed.

@nursoda nursoda self-assigned this Sep 5, 2026
@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@nursoda
nursoda force-pushed the docs/drop-the-securerandom-carve-out branch from 2722250 to fa5c522 Compare September 5, 2026 08:03
@nursoda nursoda changed the title Drop the last mention of a deprecation that does not exist Drop the ISecureRandom carve-out: upstream took the deprecation back Sep 5, 2026
@nursoda
nursoda force-pushed the docs/drop-the-securerandom-carve-out branch from fa5c522 to efa5ea0 Compare September 5, 2026 08:06
The suppression was right when it was written. Nextcloud deprecated
ISecureRandom::generate on 24 June 2026 in favour of
Randomizer::getBytesFromString (server#61538), which needs PHP 8.3 while this
app's floor is 8.2.

Nextcloud reverted it on 20 August (server#63412): the interface is a service
and therefore mockable in tests, the default character list would have to be
copied to every caller, and it is used all over the code base. The annotation
lived on master only and reached no stable branch — stable34 had already
branched off, stable35 branched on 5 September, after the revert. So the
carve-out never suppressed anything on any OCP the app analyses against.

This removes the last piece of it. The psalm handler and its
CompatibilityShimsTest guard went with the Nextcloud 35 change; the REVIEW.md
entry was left behind and was the only place still stating the deprecation as
current.

The path itself was worth keeping. doc/developers.md now describes it: show the
annotation and name the pull request that added it, suppress the one method by
name rather than the issue type, register it in CompatibilityShimsTest with the
condition that ends it, and watch the branch the
suppression is actually needed for. That last step is the one that failed here:
the guard was tied to this repository's PHP floor while the real condition was
an upstream decision. Reading the installed vendor/nextcloud/ocp instead would
have been wrong too — the annotation only ever lived on the server's master, so
such a guard would have demanded the suppression's removal from day one. The
section also carries the search that finds a reversal, so a missing annotation
is not mistaken for one that never existed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Olav Seyfarth <olav@seyfarth.de>
@nursoda
nursoda force-pushed the docs/drop-the-securerandom-carve-out branch from efa5ea0 to 76f1a98 Compare September 5, 2026 08:19
@nursoda
nursoda merged commit dd9bc1b into main Sep 5, 2026
43 checks passed
@nursoda
nursoda deleted the docs/drop-the-securerandom-carve-out branch September 5, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant