Skip to content

fix(Core): correct SessionStorageBackend namespace in SessionHandlerFactory#133

Merged
ralflang merged 1 commit into
FRAMEWORK_6_0from
fix/session-handler-factory-namespace
Jun 9, 2026
Merged

fix(Core): correct SessionStorageBackend namespace in SessionHandlerFactory#133
ralflang merged 1 commit into
FRAMEWORK_6_0from
fix/session-handler-factory-namespace

Conversation

@ralflang

@ralflang ralflang commented Jun 9, 2026

Copy link
Copy Markdown
Member

The use statement imported Horde\SessionHandler\Storage\SessionStorageBackend, but the interface actually lives in Horde\SessionHandler (no Storage segment).

PHP's autoload silently failed to resolve the wrong-namespaced reference, which meant createHashtableBackend()'s : SessionStorageBackend return type couldn't be checked at runtime. Result: every call with cache.driver = 'hashtable' or 'memcache' for sessions threw a misleading TypeError:

Horde\Core\Factory\SessionHandlerFactory::createHashtableBackend(): Return value must be of type Horde\SessionHandler\Storage\SessionStorageBackend, Horde\SessionHandler\Storage\HashtableBackend returned

HashtableBackend does implement SessionStorageBackend — the type check just couldn't see it because the imported name pointed nowhere.

SessionHandlerFactoryTest already exercised this and was failing with 5 errors. After the one-line fix, all 13 tests pass.

Refs #131

…actory

The use statement imported Horde\SessionHandler\Storage\SessionStorageBackend, but the interface lives in Horde\SessionHandler. PHP's autoload silently failed to resolve the wrong-namespaced reference, causing the createHashtableBackend() return type to be unresolvable at runtime — every call with hashtable/memcache session driver threw TypeError.
@ralflang ralflang merged commit db8beb9 into FRAMEWORK_6_0 Jun 9, 2026
0 of 4 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