Repository navigation
test: accept both value names in the ObjectService doubles - #2104
Conversation
OpenRegister publishes the values of its ObjectServiceInterface in OCA\OpenRegister\Contract (task 7.2); the old OCA\OpenRegister\Kernel\Contracts\Value names become deprecated subclasses. The published interface and ObjectService then type these parameters with the published parent class, so a double typed with only the old name is narrower than its parent and fatals at class load. Every test class that implements ObjectServiceInterface or extends ObjectService now types those parameters as the old name OR the published one. PHP matches a union by name without loading the other class, so the doubles load against today's openregister (old names) and against the one that publishes the values. Behaviour, defaults and values are unchanged. Assisted-by: ClaudeCode:claude-opus-5-5
|
Twelve checks failed on this PR. None is caused by it: the PR changes one PHP test file,
Generated by Claude Code |
Quality Report — ConductionNL/stackiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ❌ | ||||
| psalm | ❌ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ❌ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| check-vue-demi | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ❌ | ||||
| check-schema-l10n | ❌ | ||||
| check-l10n-js | ✅ | ||||
| composer | ❌ | ✅ 150/150 | |||
| npm | ✅ | ✅ 811/811 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ❌ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development. |
||||
| Hydra gates | ❌ |
Quality workflow — 2026-11-21 15:54 UTC
Download the full PDF report from the workflow artifacts.
cloud-merge-stackiq Assisted-by: ClaudeCode:claude-opus-5-5
Quality Report — ConductionNL/stackiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ❌ | ||||
| psalm | ❌ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ❌ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| check-vue-demi | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ❌ | ||||
| check-schema-l10n | ❌ | ||||
| check-l10n-js | ✅ | ||||
| composer | ❌ | ✅ 150/150 | |||
| npm | ✅ | ✅ 811/811 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ❌ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development. |
||||
| Hydra gates | ❌ |
Quality workflow — 2026-11-21 18:30 UTC
Download the full PDF report from the workflow artifacts.
Accept both value names in the ObjectService test doubles
Fleet check for openregister package X00 (task 7.2). openregister publishes the values its
ObjectServiceInterfacenames in its signatures (ObjectSaveOptions,BulkSaveOptions,ObjectFindOptions,ObjectDeletion,ObjectPatch,LockRequest,UnlockRequest,ObjectValidationVerdictand five values they name) asOCA\OpenRegister\Contract\<Name>. The oldOCA\OpenRegister\Kernel\Contracts\Value\<Name>classes stay as deprecatedfinalsubclasses: ConductionNL/openregister#10976 and ConductionNL/openregister#10977. Then ConductionNL/openregister PR c (branchcloud/mod-X00-published-signatures) typesObjectServiceInterfaceandObjectServicewith the published parents. A double whose parameter is typed only with the old Kernel name is then narrower than its parent, and PHP refuses to load the class.What changes
1 test file, 1 parameter:
tests/Unit/Support/MainApiObjectService(abstractObjectServiceInterfacedouble),saveObject()'s$optionsbecomesObjectSaveOptions|PublishedObjectSaveOptions(the published class imported asPublishedObjectSaveOptions), and its@paramfollows. Same default (still the old name), same body.optionsOf()keeps the old name.Safe against both openregister versions
OCA\OpenRegister\Contract\ObjectSaveOptions, which this app's test environment does not have.So this PR can land before the openregister PRs, and must land before them, or before a hydra-gates release that ships the new contract.
Test run
vendor/bin/phpunit -c phpunit-unit.xml --no-coverage, PHP 8.3:developmentwithout this changelib/Contractafter PR c and its deprecated Kernel values loaded first; theObjectServicestub typed like the newObjectService)developmentagainst the new contractMainApiObjectService::saveObject(array $object, OCA\OpenRegister\Kernel\Contracts\Value\ObjectSaveOptions $options = <expression>, ...) must be compatible with OCA\OpenRegister\Contract\ObjectServiceInterface::saveObject(...)The 2 failures are on
developmentwithout this change and are identical on the branch.Tests are outside this app's phpcs and phpstan scope (
lib/only).Order
This PR → ConductionNL/.github companion (hydra-gates contracts) → ConductionNL/openregister#10976 → #10977 → PR c. Do not merge openregister PR c before this one.
Written with Claude Code (claude-opus-5-5)
Generated by Claude Code