From 35e1f5df32f7f278e5065c41617235dc72603cda Mon Sep 17 00:00:00 2001 From: Dillard Blom Date: Sun, 27 Sep 2026 00:17:28 +0200 Subject: [PATCH] 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. --- .gitignore | 3 +++ README.md | 5 +++++ appinfo/info.xml | 18 +++++++++++------- lib/Controller/OccOutput.php | 7 ++++++- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index c81486d..52d8b17 100644 --- a/.gitignore +++ b/.gitignore @@ -33,5 +33,8 @@ js/*.log # Internal deploy notes (hostnames, paths) - never publish these notes/ +# Local compat-test docker rigs (throwaway, not part of the app release) +testbak/ + # Misc logs *.log diff --git a/README.md b/README.md index b270d4c..0179b4c 100644 --- a/README.md +++ b/README.md @@ -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.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.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 # 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 and older - but a plain `git checkout v0.3.4` is **not** a working rollback by itself. That diff --git a/appinfo/info.xml b/appinfo/info.xml index 9d2dab5..d401cdc 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -5,7 +5,7 @@ Extended OCC Web OCC Commands in a web terminal - 0.4.1 + 0.4.2 agpl Dillard Blom OCCWeb @@ -15,12 +15,16 @@ https://github.com/dillardblom/occweb https://github.com/dillardblom/occweb/raw/main/appinfo/screenshot.png - - + + diff --git a/lib/Controller/OccOutput.php b/lib/Controller/OccOutput.php index d654f53..01b10cf 100644 --- a/lib/Controller/OccOutput.php +++ b/lib/Controller/OccOutput.php @@ -17,7 +17,12 @@ class OccOutput extends BufferedOutput implements ConsoleOutputInterface 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 { }