Fix NC35 fatal in OccOutput, verify+narrow supported version range to 32-35

testbak/ (local, non-AIO docker compat rigs for NC32/33/34/35) found a real
fatal on NC35: OccOutput::setErrorOutput() didn't declare the ": void"
return type the Symfony Console version NC35 bundles now requires on
ConsoleOutputInterface. Fixed by declaring it - compatible with older
Symfony/NC versions too since it only narrows an untyped parent signature.

32/33 were also verified functional (the previously-suspected jQuery
getter-conflict console exception on those versions is real but harmless -
the app attaches via window.jQuery, not window.$).

min-version/max-version narrowed from 30/34 to 32/35: 30/31 were never
actually tested even before this session, so keeping them was an unverified
claim; 35 is now genuinely verified rather than guessed.
This commit is contained in:
2026-09-27 00:17:28 +02:00
parent 4b84be3cb7
commit 35e1f5df32
4 changed files with 25 additions and 8 deletions
+3
View File
@@ -33,5 +33,8 @@ js/*.log
# Internal deploy notes (hostnames, paths) - never publish these # Internal deploy notes (hostnames, paths) - never publish these
notes/ notes/
# Local compat-test docker rigs (throwaway, not part of the app release)
testbak/
# Misc logs # Misc logs
*.log *.log
+5
View File
@@ -149,6 +149,11 @@ was verified, so a rollback target is obvious if a newer major causes problems.
| 0.4.0 | (untagged) | 34.0.4 | ✅ Verified (nc01, 2026-09-26) - app id renamed `occweb` → `extended_occweb` (App Store prep), no functional changes to the 0.3.5 fixes otherwise | | 0.4.0 | (untagged) | 34.0.4 | ✅ Verified (nc01, 2026-09-26) - app id renamed `occweb` → `extended_occweb` (App Store prep), no functional changes to the 0.3.5 fixes otherwise |
| 0.4.1 | `v0.4.1-nc34` | 34.0.4 | ✅ Verified (nc01, 2026-09-26) - code review fixes: correct jQuery `.fail()` signature, added a missing `.fail()` handler on the initial terminal-load request | | 0.4.1 | `v0.4.1-nc34` | 34.0.4 | ✅ Verified (nc01, 2026-09-26) - code review fixes: correct jQuery `.fail()` signature, added a missing `.fail()` handler on the initial terminal-load request |
| 0.4.1 | `v0.4.1-nc34` | 33.0.8 | ⚠️ Same caveat as 0.3.5/0.4.0 - not re-verified, no NC33 test environment available. Also unresolved: `js/jquery.js` now loads unconditionally on every supported version, even NC30-33 where core still provides jQuery - flagged in code review, needs an NC33 environment to confirm it's harmless there. | | 0.4.1 | `v0.4.1-nc34` | 33.0.8 | ⚠️ Same caveat as 0.3.5/0.4.0 - not re-verified, no NC33 test environment available. Also unresolved: `js/jquery.js` now loads unconditionally on every supported version, even NC30-33 where core still provides jQuery - flagged in code review, needs an NC33 environment to confirm it's harmless there. |
| 0.4.2 | (untagged) | 32.0.15 | ✅ Verified (`testbak/`, 2026-09-27) - terminal loads and runs commands correctly. Confirms the suspected jQuery issue above: core still exposes a read-only `window.$` getter here, so our vendored `js/jquery.js` throws `TypeError: Cannot set property $ of #<Window> which has only a getter` on load - a real, uncaught console exception, but harmless in practice since the app attaches via `window.jQuery` (still writable), not `window.$`. Not fixed yet - conditional jQuery loading is still deferred (see the code review notes below). |
| 0.4.2 | (untagged) | 33.0.9 | ✅ Verified (`testbak/`, 2026-09-27) - same result as 32.0.15: functional, same harmless-but-real `window.$` console exception. |
| 0.4.2 | (untagged) | 35.0.1 | ✅ Verified (`testbak/`, 2026-09-27) after a real fix: the bootstrap request 500'd with a PHP fatal, `Declaration of OccOutput::setErrorOutput() must be compatible with ConsoleOutputInterface::setErrorOutput(): void` - NC35 bundles a Symfony Console version whose interface now declares that return type. Fixed by adding `: void` to `OccOutput::setErrorOutput()` (`lib/Controller/OccOutput.php`), which is compatible with every earlier Symfony/NC version too. Confirmed clean afterwards: no console errors, no CSRF issues, terminal fully functional. |
`min-version`/`max-version` in `appinfo/info.xml` were updated from `30`/`34` to `32`/`35` on 2026-09-27 based on the above: 30/31 have never actually been tested (not even before the app-id rename) so claiming them was never justified once the `testbak/`-based verification policy existed, and 35 is now a genuinely verified (and fixed) target rather than a guess.
If a future major breaks something, `v0.3.4` is the last version confirmed working on NC33 If a future major breaks something, `v0.3.4` is the last version confirmed working on NC33
and older - but a plain `git checkout v0.3.4` is **not** a working rollback by itself. That and older - but a plain `git checkout v0.3.4` is **not** a working rollback by itself. That
+11 -7
View File
@@ -5,7 +5,7 @@
<name>Extended OCC Web</name> <name>Extended OCC Web</name>
<summary>OCC Commands in a web terminal</summary> <summary>OCC Commands in a web terminal</summary>
<description><![CDATA[Run OCC Commands in a web terminal]]></description> <description><![CDATA[Run OCC Commands in a web terminal]]></description>
<version>0.4.1</version> <version>0.4.2</version>
<licence>agpl</licence> <licence>agpl</licence>
<author mail="dillard.blom@ensembia.com" >Dillard Blom</author> <author mail="dillard.blom@ensembia.com" >Dillard Blom</author>
<namespace>OCCWeb</namespace> <namespace>OCCWeb</namespace>
@@ -15,12 +15,16 @@
<repository>https://github.com/dillardblom/occweb</repository> <repository>https://github.com/dillardblom/occweb</repository>
<screenshot>https://github.com/dillardblom/occweb/raw/main/appinfo/screenshot.png</screenshot> <screenshot>https://github.com/dillardblom/occweb/raw/main/appinfo/screenshot.png</screenshot>
<dependencies> <dependencies>
<!-- max-version must equal the highest NC core version this fork has <!-- min-version and max-version must equal the lowest/highest NC core
actually been verified on - never a value inherited from upstream versions this fork has actually been verified on (via testbak/,
or guessed ahead. Test against the next major's beta and bump see its README) - never inherited from upstream or guessed at
this BEFORE it goes final, so occ:upgrade never has to fall back either end. min-version was 30 pre-testbak, unverified since the
to auto-disabling the app. --> app-id rename/jQuery fixes - narrowed to 32 (2026-09-27) once 30/31
<nextcloud min-version="30" max-version="34"/> turned out to never have been re-tested and 32 was confirmed
working. Test against the next major's beta and bump max-version
BEFORE it goes final, so occ:upgrade never has to fall back to
auto-disabling the app. -->
<nextcloud min-version="32" max-version="35"/>
</dependencies> </dependencies>
<navigations> <navigations>
<navigation role="admin"> <navigation role="admin">
+6 -1
View File
@@ -17,7 +17,12 @@ class OccOutput extends BufferedOutput implements ConsoleOutputInterface
return $this; return $this;
} }
public function setErrorOutput(OutputInterface $error) // NC35 bundles a Symfony Console version whose ConsoleOutputInterface
// declares this method `: void` - PHP 8 fatals ("Declaration must be
// compatible") without a matching return type here. Declaring `: void`
// is a valid narrowing of the untyped signature older Symfony/NC
// versions have, so this stays compatible with NC30-34 too.
public function setErrorOutput(OutputInterface $error): void
{ {
} }