Merged
Conversation
ca09e91 to
f5ac52f
Compare
Add project configuration for Claude Code with TDD workflow rules and comprehensive project architecture documentation.
- Handler: extract createTestRunner, createProcesses, collectCoverage from runTestQueue to separate concerns - TestRunnerEventProxy: replace 17 boilerplate forwarding methods with dynamic event registration in constructor - TestRunner: extract handleProcessError/handleProcessClose, improve emit type safety with generics - Builder: extract ensureVariablePlaceholders, normalizeQuotedVariables, removeEmptyPhpArgs, substituteVariables from create method - ProblemMatcher: extract appendFaultDetails, rename isResult to isDispatchable for clarity - extension: extract activate into focused helper functions (createConfiguration, loadInitialConfiguration, setupTestController, etc.)
…conflict - CommandHandler → TestCommandRegistry: clearly indicates VS Code command registration, not shell command handling - CommandBuilder/ → ProcessBuilder/: clearly indicates child process construction, not abstract command building - Builder → ProcessBuilder: class name matches directory name - Update all imports, references, skills docs, and CLAUDE.md
- Rename Element to XmlElement to clarify it wraps XML nodes - Fix variable shadow in TestHierarchyBuilder (testDefinition → namespaceDefinition) - Rename length → ancestorDepth, finished → completedAncestor - Unify loop variables: test/item → testItem consistently - Rename TransformerFactory.factory() → create() - Rename FilterStrategyFactory.getStrategy() → create() - Rename temp → incompleteLineBuffer in TestRunnerProcess - Rename emitResult → emitTestResult with specific parameter name - Fix PathReplacer accumulator shadow (path → result) - Fix TestResultObserver: current → matchingDetail, callback → updateTestRun - Fix generic item → testItem in extension.ts and Handler.ts
TeamcityEvent keys are already included in EventResultMap,
so the intersection with { [p in TeamcityEvent]: ... } was a no-op.
… type" This reverts commit 430c528.
Add tests for TestRunnerObserver type and TestRunnerEventProxy behavior.
Remove redundant `& { [p in TeamcityEvent]: ... }` intersection since
all TeamcityEvent keys are already present in EventResultMap.
This reverts commit c80f890.
- length → ancestorDepth - finished → completedAncestor - testDefinition shadow → namespaceDefinition
- temp → incompleteLineBuffer - emitResult → emitTestResult
- current → matchingDetail - callback → updateTestRun - test → testItem in doRun
- test → testItem in loop destructuring - test → requestedItem in findTestsByRequest - item → current in removeTestItems
- EscapeValue: replace parallel arrays with tuple mappings to prevent index mismatch - TestHierarchyBuilder: replace Proxy hack with simple object literal - Handler: extract CoverageCollector, TestRunnerFactory, and TestDiscovery - extension.ts: eliminate implicit global references by passing dependencies as parameters
…on class Convert activate() + 11 free functions into a PHPUnitExtension class with private methods, eliminating long parameter lists by using instance properties for shared state (ctrl, testCollection, handler, watchingTests, etc.). Public API (export activate) remains unchanged as a thin wrapper.
Replace manual object construction in PHPUnitExtension.activate() with an InversifyJS container using toDynamicValue bindings, keeping existing classes unchanged (no decorators added).
- Add affectsConfiguration('phpunit') filter to onDidChangeConfiguration
so config updates only trigger on phpunit setting changes
- Dispose fileChangedEmitter by pushing to context.subscriptions
- Move phpUnitXML from module-level singleton to instance property to
avoid shared state across deactivate/reactivate cycles
- Fix "without phpunit.xml" test to use real objects instead of spy
- Document pre-existing test failures and testing principles
Replace dynamic constructor-based event registration with explicit typed methods to restore full TypeScript type safety. The [key: string]: any index signature defeated type checking on the entire class.
Move PHPUnitXML, Configuration, EventEmitter<Uri>, and TestCommandRegistry into the InversifyJS container, reducing createContainer parameters from 4 to 2 (only VS Code API objects: TestController, OutputChannel).
…estRunner from PHPUnitExtension Split PHPUnitExtension responsibilities into three focused classes: - TestFileDiscovery: test file discovery and initial configuration loading - TestFileWatcher: workspace file change listeners - ContinuousTestRunner: continuous/watch mode test execution
Inline private methods, remove class wrapper, and organize activate() into clear sections: dependency resolution, initial load, listeners, test controller, run profiles, commands, and disposables.
- Remove duplicate Configuration instantiation in TestFileDiscovery - Inject Handler into TestCommandRegistry, remove rerun() parameter - Move CoverageCollector and TestDiscovery into DI container - Bind MessageObserver in container, reduce TestRunnerFactory pass-through - Add TestFileDiscovery.reloadAll() to encapsulate reload pattern - Inject TestFileDiscovery into TestCommandRegistry, remove reload callback - Export MessageObserver from Observers barrel
Move OutputChannelObserver's request param to a setter so it can be bound as a singleton in the DI container. TestRunnerFactory now takes only OutputChannelObserver and MessageObserver, removing the three pass-through parameters (outputChannel, configuration, printer).
setup-debug.js was tied to the consolidated docker-compose.yml which has been reverted. Restore tasks.json to main state without Docker tasks.
- Change getPhpUnitVersion() to use detectPhpUnitStubs() instead of root vendor
- Convert OutputChannelObserver tests to describe.each(detectPhpUnitStubs())
with PHPUnit 12 die() Fatal error handling
- Merge describe('PHPUnit') and describe('Xdebug') into describe.each(detectPhpUnitStubs())
- Merge describe('PEST') into describe.each(detectPestStubs())
- Replace describe('paratest') with describe.each(detectParatestStubs())
- Add detectParatestStubs() helper, remove unused getPhpVersion()
- Fix pest-v3 expected values to match current 3.8.5 behavior
…nt naming - Extract resolveExpected helper to centralize version-conditional logic - Extract expectSpawnCalled helper to reduce spawn assertion boilerplate - Simplify command registration assertions with loop - Rename getRunProfile/runProfile to getTestRunProfile/testRunProfile to match extension.ts - Remove unused method variables - Simplify array coercion with [ids].flat()
- PHP 7.4: PHPUnit v9 (phpvfscomposer path, PHP < 8) - PHP 8.2: PHPUnit v9/v10/v11, Pest v2/v3 - PHP 8.4: all stubs (v9-v12, Pest v2-v4) - Install composer deps per vN/ directory instead of root - Remove special-case PHPUnit 10.5.30 for PHP 8.1 - Use shell: bash for cross-platform consistency - Add continue-on-error for Windows (shivammathur/setup-php broken since runner images shipped PHP 8.5, actions/runner-images#13603) - 9 jobs (3 OS × 3 PHP) down from 27 (3 OS × 9 PHP)
f5ac52f to
ebe1f92
Compare
- Add getGroupFilter() to FilterStrategy base class; ClassFilterStrategy
includes --group flag when class has group annotations/attributes
- Add #[Group('integration')] attribute to AssertionsTest.php and
AttributeTest.php fixtures for parser and integration test coverage
- Add extension tests: run class with group, run method with group,
run at cursor with group
- Update line numbers across test files for fixture changes
062f52e to
8105ac2
Compare
8105ac2 to
a07e8f2
Compare
- Replace phpUnitProject() with Uri.file(phpUnitProject()).fsPath in
expectSpawnCalled args to match production code behavior on Windows
- Keep only cwd comparison case-insensitive (drive letter ambiguity)
- Replace inline import('../../PHPUnit').TestSuiteFinished with proper
top-level type imports in CollisionPrinter and OutputFormatter tests
- Use sort -V for numerical ordering (v9, v10, v11, v12 instead of v10, v11, v12, v9) - Use composer install instead of update to leverage existing lock files - Add --ignore-platform-reqs to avoid failures when PHP version doesn't match stub requirements (runtime detection handles incompatibility)
- Define minimum PHP version per stub (e.g. PHPUnit v12 needs PHP >=8.3) - Skip composer install for stubs incompatible with matrix PHP version - Use composer install (lock file) instead of composer update - Use sort -V for correct version ordering (v9, v10, v11, v12)
Replace associative array with POSIX-compatible string lookup using tr/grep/cut for parsing env lookup table.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #345 +/- ##
=========================================
- Coverage 95.42% 0 -95.43%
=========================================
Files 60 0 -60
Lines 4520 0 -4520
Branches 1014 0 -1014
=========================================
- Hits 4313 0 -4313
+ Misses 202 0 -202
+ Partials 5 0 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
No description provided.