fix(tests): IAppConfig::setValueString mock callbacks must return bool#201
Merged
Merged
Conversation
NC stable31/32/33 IAppConfig::setValueString returns bool; the test mock callbacks declared void and returned null, causing a TypeError in every PHPUnit job across the matrix (PHP 8.3+8.4 x NC 31/32/33). Change both willReturnCallback callbacks in SettingsServiceTest to return bool and return true on success.
Contributor
Quality Report — ConductionNL/planix @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 100/100 | |||
| npm | ✅ | ✅ 215/215 | |||
| PHPUnit | ✅ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Coverage: 0% (0/3 statements)
Quality workflow — 2026-05-19 03:22 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes all PHPUnit failures across the PHP 8.3/8.4 x NC stable31/32/33 matrix.
Root cause
IAppConfig::setValueString()returnsboolin NC stable31+. The two test mock callbacks inSettingsServiceTestdeclaredvoidand returned null, causing:Fix
Change both
willReturnCallbackcallbacks to declare: boolreturn andreturn true;on success.Impact
Unblocks 7 open planix PRs that were all red on the same upstream PHPUnit failure (#197, #198, #178, #177, #182, #184, #176).