Conversation
HumHub 1.20 moves the PWA endpoints out of the web module into the core namespace (humhub/humhub#8453). ServiceWorkerController and its public $additionalJs property are gone, so the way this module extended the service worker no longer exists: ['humhub\modules\web\pwa\controllers\ServiceWorkerController', Controller::EVENT_INIT, [Events::class, 'onServiceWorkerControllerInit']] -> $controller->additionalJs .= $js; Script assembly now lives in humhub\services\ServiceWorkerService, which raises a class level event modules append to: [ServiceWorkerService::class, ServiceWorkerService::EVENT_BUILD_SCRIPT, [Events::class, 'onBuildServiceWorkerScript']] -> $event->append($js); Without this the module does not fail - the handler is registered on a class that no longer exists and is simply never called, so the Firebase service worker logic silently disappears from /sw.js and web push stops working. Continues the 1.20 line as 2.4.x; 2.3.x stays on HumHub 1.19. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E2SUrd2fGkf6GZY9Xcd8qN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
HumHub 1.20 moves the PWA endpoints out of the
webmodule into the core namespace (humhub/humhub#8453).ServiceWorkerControllerand its public$additionalJsproperty are gone, so the way this module extended the service worker no longer exists.This fails silently. The handler stays registered on a class that no longer exists and is simply never called — no error, no warning. The Firebase service worker logic just disappears from
/sw.jsand web push stops working.Change
The driver guard (
hasConfiguredWebDriver()) and the generated JavaScript are unchanged — only the hook moves.These were the only two references to
humhub\modules\webin the module; a stale docblock inservices/ServiceWorkerService.phppointing at the old handler is updated too.Version
Continues the HumHub 1.20 line as 2.4.x, matching the pattern documented in the changelog ("Continue the HumHub 1.19 line as 2.3.x; the 2.2.x line remains on HumHub 1.18"):
version2.3.0→2.4.0humhub.minVersion1.19→1.202.3.x stays on HumHub 1.19.
Verification
The new extension point is covered on the core side by
ServiceWorkerServiceTest::testModulesCanAppendTheirOwnScript, which pins exactly this contract. This module has no test suite, so the change is verified by review and byphp-cs-fixer(clean against the shared config).🤖 Generated with Claude Code
https://claude.ai/code/session_01E2SUrd2fGkf6GZY9Xcd8qN