Repository navigation
fix(tests): keep the standalone Doctrine and Symfony stubs out of the CI bootstrap - #1409
Merged
Merged
Conversation
… CI bootstrap #1400 put the Doctrine and HeaderUtils stubs one directory below tests/Stubs. tests/bootstrap.php, the bootstrap CI runs, loads every file that deep before Nextcloud boots, so the stub ExpressionBuilder (without eq()) replaced Doctrine's. The server then could not finish booting, OpenRegister never loaded, and every PHPUnit cell failed on its missing event classes. The stubs move to tests/Stubs/Standalone/, out of that glob's reach, and tests/bootstrap-stubs.php loads each one only when the real class is absent. bootstrap-unit.php requires it as before; bootstrap.php requires it after the boot, so a run without a server still finds them. Assisted-by: ClaudeCode:claude-opus-5-5
rubenvdlinde
marked this pull request as ready for review
November 3, 2026 17:23
Contributor
Author
|
Hydra gates ( |
Contributor
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 | ✅ | ✅ 127/127 | |||
| npm | ❌ | ✅ 807/807 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ✅ 1552/1552 · 20 skipped | ||||
| 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-03 20:17 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.
Why development is red
Run 41651793568 (on #1402's head, which includes #1400) fails every PHPUnit cell with 6 errors. Each one is a missing
OCA\OpenRegister\Event\ObjectCreatingEventorObjectUpdatedEvent. Those classes exist in OpenRegister. The log shows the cause first:#1400 (commit 7ec46a1) added
tests/Stubs/Doctrine/*.phpandtests/Stubs/Symfony/HeaderUtils.phpone directory deep. CI runsphpunit.xml, whosetests/bootstrap.phprequires every file matchingtests/Stubs/{,**/}*.phpbefore Nextcloud boots. So the stubExpressionBuilder(it has noeq()) took the place of Doctrine's, the server could not finish booting, and OpenRegister never loaded.The fix
tests/Stubs/Standalone/, two levels deep, where the glob does not reach. The Integriq and OpenRegister event stubs use the same placement.tests/bootstrap-stubs.php(outsidetests/Stubs/) loads each stub only when the real class is absent.bootstrap-unit.phprequires it where the inline block used to be.bootstrap.phprequires it after the boot, so a run without a server still finds the stubs.Verified locally
3rdparty/autoload.php, then resolvedExpressionBuilder. On development that givestests/Stubs/Doctrine/ExpressionBuilder.phpwith eq()=NO, which is exactly the CI error. On this branch it gives3rdparty/doctrine/dbal/.../ExpressionBuilder.phpwith eq()=yes.phpunit-unit.xml.phpunit-unit.xmlunder pcov with--fail-on-risky, run once through heavy.sh: exit 0, 1572 tests, 16364 assertions, 0 failures, 0 risky, 59 skipped (the skips are inherited and untouched).phpunit.xmlwithout a booted server stops atOCP\Migration\IRepairStepnot found, on development as well, because it needs the server. CI is the place where that config runs.Only test bootstrap files change. No production code is touched.
Assisted-by: ClaudeCode:claude-opus-5-5