Skip to content

Add NC31/32 compatibility and rewrite test suite#283

Merged
miaulalala merged 2 commits intomasterfrom
nc31-compatibility
Mar 20, 2026
Merged

Add NC31/32 compatibility and rewrite test suite#283
miaulalala merged 2 commits intomasterfrom
nc31-compatibility

Conversation

@miaulalala
Copy link
Copy Markdown
Collaborator

@miaulalala miaulalala commented Mar 20, 2026

  • Bump version to 3.6.0, set NC compatibility to min=31 max=32
  • Replace deprecated OC::$server service locators with constructor-injected IDBConnection, IUserManager, IGroupManager (optional params for BC)
  • Replace $query->execute() with executeQuery()/executeStatement() and fetchColumn() with fetchOne() (NC32 DB API changes)
  • Add resolveUid() to Base: maps email login names back to stored uids for NC32 email-to-uid resolution; call it in all checkPassword() impls
  • Remove dead old tests (wrong class names, removed NC APIs, never ran)
  • Add PHPUnit 10 test infrastructure via vendor-bin pattern
  • Add 19 unit tests for Base with mocks (tests/unit/BaseTest.php)
  • Add 14 integration tests against live NC DB (tests/integration/)
  • Align bootstrap, phpunit.xml and composer scripts with NC app conventions

@miaulalala miaulalala self-assigned this Mar 20, 2026
@miaulalala miaulalala force-pushed the nc31-compatibility branch 4 times, most recently from a520c6b to 21544a9 Compare March 20, 2026 00:30
miaulalala and others added 2 commits March 20, 2026 01:34
- Bump version to 3.6.0, set NC compatibility to min=31 max=32
- Replace deprecated OC::$server service locators with constructor-injected
  IDBConnection, IUserManager, IGroupManager (optional params for BC)
- Replace $query->execute() with executeQuery()/executeStatement() and
  fetchColumn() with fetchOne() (NC32 DB API changes)
- Add resolveUid() to Base: maps email login names back to stored uids
  for NC32 email-to-uid resolution; call it in all checkPassword() impls
- Remove dead old tests (wrong class names, removed NC APIs, never ran)
- Add PHPUnit 11 test infrastructure via vendor-bin pattern
- Add 19 unit tests for Base with mocks (tests/unit/BaseTest.php)
- Add 14 integration tests against live NC DB (tests/integration/)
- Align bootstrap, phpunit.xml and composer scripts with NC app conventions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
Each workflow uses the nextcloud-version-matrix action to test against
all supported NC/PHP version combinations, runs both unit and integration
test suites via composer scripts, and includes a path-filter to skip
unchanged code.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
@miaulalala miaulalala merged commit e4c5e88 into master Mar 20, 2026
32 checks passed
@miaulalala miaulalala deleted the nc31-compatibility branch March 20, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants