Skip to content

fix(queue): resolve queue ViewController via injector to match new signature - #19

Merged
ralflang merged 1 commit into
FRAMEWORK_6_0from
fix/queue-view-controller-di
Jul 3, 2026
Merged

ralflang merged 1 commit into
FRAMEWORK_6_0from
fix/queue-view-controller-di

Conversation

@ralflang

@ralflang ralflang commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

Visiting a queue view (e.g. https://bugs.horde.org/queue/beatnik) via the legacy queue/index.php entry point produced a fatal type error:

Horde\Whups\Controller\Queue\ViewController::__construct(): Argument #4 ($registry) must be of type Horde_Registry, Horde_Session given

The controller was refactored to take nine typed dependencies (driver, notification, pageOutput, Horde_Registry, HordeSession, TicketSorter, TopbarSearch, UrlGenerator, PrefsService), but queue/index.php was still hand-constructing it with the old six-argument signature. Position 4 collided: $session landed where $registry was expected.

Replaced the manual new ViewController(...) with $injector->getInstance(ViewController::class), matching the pattern already used by ticket/delete_attachment.php, ticket/delete_history.php, and ticket/rss.php. The container resolves all nine dependencies from bindings already registered in lib/Application.php.

@ralflang
ralflang merged commit aa87777 into FRAMEWORK_6_0 Jul 3, 2026
0 of 6 checks passed
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