fix(test): stop the positional path overriding the curated unit-only suite - #221
Merged
Merged
Conversation
…suite
`composer test:unit-only` ran `phpunit tests -c tests/phpunit-unit-only.xml`.
A positional path OVERRIDES the configured testsuite entirely, so the curated
directory list in that config was decorative — the script swept all of tests/
regardless, which is precisely what the curation exists to prevent.
Measured today:
with `tests` 572 tests, 7 errors
without it 565 tests, 0 errors
The 7 are unit/Repair. They need Doctrine\DBAL\ParameterType, which only
resolves through the Nextcloud server's 3rdparty autoload — exactly the
dependency a suite named "no Nextcloud bootstrap" exists to avoid.
Dropping the argument makes the config govern, which is what its comment always
claimed. unit/Repair is not lost: the main phpunit.xml suite sweeps all of
tests/ and is what CI executes in-container, where doctrine resolves.
The config's comment now says the list only governs when nothing is passed
positionally, and records that unit/Repair is absent ON PURPOSE — otherwise the
next person to notice the gap re-adds it and reintroduces the errors.
Contributor
Quality Report — ConductionNL/versioniq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| composer | ✅ | ✅ 29/29 | |||
| npm | ✅ | ✅ 282/282 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ⏭️ | ||||
| Playwright | ✅ | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-08-24 18:12 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.
The bug
composer test:unit-onlyran:A positional path overrides the configured testsuite entirely. So the carefully curated directory list in
phpunit-unit-only.xmlwas decorative — the script swept all oftests/regardless, which is exactly what the curation exists to prevent.Measured
phpunit tests -c …(as shipped)phpunit -c …(config governs)The seven are
unit/Repair, failing onClass "Doctrine\\DBAL\\ParameterType" not found— a class that only resolves through the Nextcloud server's3rdpartyautoload. That is precisely the dependency a suite named "no Nextcloud bootstrap" exists to avoid.The fix
Drop the argument so the config governs, which is what its comment always claimed.
unit/Repairis not lost. The mainphpunit.xmlsuite sweeps all oftests/, and that is what CI executes in-container where doctrine resolves.Why the comment changed too
The config now states that its list only governs when nothing is passed positionally, and records that
unit/Repairis absent on purpose. Without that, the next person to notice the gap re-adds it and reintroduces the seven errors.Found while adding the schema-application repair step (#213).