Skip to content

Version Compatibility NC33+#89

Merged
jo23sh merged 13 commits intomasterfrom
nc33
Mar 20, 2026
Merged

Version Compatibility NC33+#89
jo23sh merged 13 commits intomasterfrom
nc33

Conversation

@jo23sh
Copy link
Copy Markdown
Owner

@jo23sh jo23sh commented Mar 20, 2026

Addresses #87 and #88

@jo23sh jo23sh self-assigned this Mar 20, 2026
@jo23sh jo23sh marked this pull request as draft March 20, 2026 06:57
@jo23sh
Copy link
Copy Markdown
Owner Author

jo23sh commented Mar 20, 2026

Seems that we're actually fine for NC33, only for NC24, two tests are failing. Will try to fix this before merging/releasing.

jo23sh and others added 8 commits March 20, 2026 08:45
NC34 dropped support for callable-based addListener() in IEventDispatcher.
Switch to IBootstrap/registerEventListener() with a dedicated AutoGroupsListener
class. Hook config checks (creation/modification/login) move from AutoGroupsManager
constructor to AutoGroupsListener::handle().

Also fixes AdminSettingsTest to use DI for IManager instead of the removed
OC\Server::getSettingsManager().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace deprecated <filter><whitelist> and <logging> with <coverage><include>
and <coverage><report><clover>.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The test was broken under the old addListener() architecture because
login_hook config was read at Application instantiation time (before
the test set it), so the login listener was never registered.

With the new AutoGroupsListener approach, hook config is checked at
event dispatch time, so this now works correctly.

Also removes the dependency on testRemoveHook having run first by
explicitly setting up the initial group state in the test itself.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace der@digitalwerker.ch with josh@o23.ch in all files.
Add AGPL-3.0 copyright header to appinfo/routes.php, css/admin.css,
and standardize the existing shortened notice in js/admin.js.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
IUserSession::login() does not reliably fire events in the CLI test
context (no real HTTP session), so the login hook was never triggered.
Dispatch PostLoginEvent via IEventDispatcher directly instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jo23sh and others added 4 commits March 20, 2026 09:16
…nHook

The original test used login() but was broken because a prior test left
an active session, causing login() to short-circuit without dispatching
events. Adding logout() first ensures a clean session state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
IUserSession::login() and logout() require HTTP session infrastructure
unavailable in CLI test context (headers already sent error).

Instead, dispatch PostLoginEvent via IEventDispatcher::dispatchTyped(),
the same mechanism Nextcloud uses internally for all other integration
tests in this suite. Use a dedicated fresh user to avoid state
dependencies on other tests, and test both addition (no override group)
and removal (in override group) in two phases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tale cache

IGroup::inGroup() uses a per-object $users cache. After Phase 1 adds loginUser
to auto groups, the local $autogroup1/$autogroup2 variables hold populated caches.
When addAndRemoveAutoGroups() later calls removeUser() on different IGroup
instances, the test-local objects' caches are not cleared, causing the Phase 2
assertion to see stale data. Re-fetching via groupManager->get() returns fresh
objects with no cache, giving correct results.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Drop stable30 row (no longer supported), add stable33 row
- Fix stable32 codecov flag (was incorrectly pointing to stable31)
- Mark master/NC34 as experimental to match CI matrix
- Remove "Union Groups" roadmap line from README and info.xml description

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jo23sh jo23sh marked this pull request as ready for review March 20, 2026 08:43
@jo23sh jo23sh merged commit aa7ce68 into master Mar 20, 2026
7 checks passed
@jo23sh jo23sh deleted the nc33 branch March 20, 2026 08:45
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.

Compatibility with NC 33 Test are failing for NC33 (Master Branch) Tests for Login Hook are failing for NC28

1 participant