Skip to content

Commit e0b9148

Browse files
authored
Merge pull request #395 from recca0120/release/v3.9.26
Release v3.9.26
2 parents d9a491e + 0bfbf9c commit e0b9148

8 files changed

Lines changed: 49 additions & 14 deletions

File tree

packages/extension/CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,29 @@ All notable changes to the "vscode-phpunit" extension will be documented in this
44

55
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
66

7+
## [3.9.26] - 2026-02-27
8+
9+
### Added
10+
- Printer: PHPUnit-style dot colors in progress mode — distinguish F (failure, bgRed), E (error, red+bold), S (skipped, cyan+bold)
11+
- Printer: ANSI color output with Collision-style syntax highlighting in Test Result Panel
12+
- Printer: configurable format-string presets (progress, collision, pretty)
13+
14+
### Fixed
15+
- Fix: PHP syntax highlighter misidentifies multiplication line (`* $b`) as doc-comment
16+
- Fix: TestRunWriter.appendLine now correctly appends trailing newline
17+
- Fix: trim methodName in FilterStrategy to match Pest's NameFilterIterator behavior
18+
- Fix: skip Printer output for non-class testSuite events
19+
- Fix: Pest testSuiteStarted with file-path locationHint parsing
20+
21+
### Changed
22+
- Refactor: rewrite Printer with format-string-driven presets and ANSI color support
23+
- Refactor: extract TestStore from TestCollection for cleaner separation
24+
- Refactor: replace base64 filter encoding with placeholder approach
25+
- Refactor: rename OutputChannelObserver to RawOutputObserver, organize Writers
26+
- Refactor: strip ANSI codes in RawOutputObserver and ErrorDialogObserver
27+
- Rename: OutputChannel display name from "PHPUnit" to "PHPUnit Debug"
28+
- Rename: `clearOutputOnRun` setting to `clearDebugOutputOnRun`
29+
730
## [3.9.25] - 2026-02-24
831

932
### Changed

packages/extension/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,14 @@ Add to `.vscode/settings.json`. All settings use the `phpunit.*` prefix.
6868
// Save all open files before running tests (default: false)
6969
"phpunit.saveBeforeTest": false,
7070

71-
// Clear output channel before each run (default: true)
72-
"phpunit.clearOutputOnRun": true,
71+
// Output format preset: "collision" (detailed per-test) or "phpunit" (dot-progress)
72+
"phpunit.output.preset": "collision",
73+
74+
// Override individual format fields from the preset (see phpunit package docs)
75+
"phpunit.output.format": {},
76+
77+
// Clear debug output channel before each run (default: true)
78+
"phpunit.clearDebugOutputOnRun": true,
7379

7480
// When to show output: "always" | "onFailure" | "never" (default: "onFailure")
7581
"phpunit.showAfterExecution": "onFailure",

packages/extension/README.zh-TW.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,14 @@
6868
// 執行測試前儲存所有開啟的檔案(預設:false)
6969
"phpunit.saveBeforeTest": false,
7070

71-
// 每次執行前清除輸出頻道(預設:true)
72-
"phpunit.clearOutputOnRun": true,
71+
// 輸出格式預設:"collision"(逐條詳細顯示)或 "phpunit"(點進度模式)
72+
"phpunit.output.preset": "collision",
73+
74+
// 覆寫預設的個別格式欄位(詳見 phpunit 套件文件)
75+
"phpunit.output.format": {},
76+
77+
// 每次執行前清除除錯輸出頻道(預設:true)
78+
"phpunit.clearDebugOutputOnRun": true,
7379

7480
// 何時顯示輸出:"always" | "onFailure" | "never"(預設:"onFailure")
7581
"phpunit.showAfterExecution": "onFailure",

packages/extension/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"displayName": "PHPUnit & Pest Test Explorer",
55
"icon": "img/icon.png",
66
"publisher": "recca0120",
7-
"version": "3.9.25",
7+
"version": "3.9.26",
88
"private": true,
99
"license": "MIT",
1010
"repository": {
@@ -150,10 +150,10 @@
150150
"description": "Override individual format fields from the preset. See documentation for available fields.",
151151
"scope": "resource"
152152
},
153-
"phpunit.clearOutputOnRun": {
153+
"phpunit.clearDebugOutputOnRun": {
154154
"type": "boolean",
155155
"default": true,
156-
"description": "True will clear the output when we run a new test. False will leave the output after every test.",
156+
"description": "Clear the debug output channel before each test run.",
157157
"scope": "resource"
158158
},
159159
"phpunit.showAfterExecution": {

packages/extension/src/Observers/RawOutputObserver.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('RawOutputObserver clear behavior', () => {
1515
const createObserver = (config: Record<string, unknown> = {}) => {
1616
const outputChannel = vscode.window.createOutputChannel('phpunit');
1717
const configuration = new Configuration({
18-
clearOutputOnRun: true,
18+
clearDebugOutputOnRun: true,
1919
...config,
2020
});
2121
const observer = new RawOutputObserver(outputChannel, configuration);
@@ -44,7 +44,7 @@ describe('RawOutputObserver clear behavior', () => {
4444

4545
it('each observer instance clears independently', () => {
4646
const outputChannel = vscode.window.createOutputChannel('phpunit');
47-
const configuration = new Configuration({ clearOutputOnRun: true });
47+
const configuration = new Configuration({ clearDebugOutputOnRun: true });
4848
const observer1 = new RawOutputObserver(outputChannel, configuration);
4949
const observer2 = new RawOutputObserver(outputChannel, configuration);
5050

@@ -68,7 +68,7 @@ describe.each(detectPhpUnitStubs())('RawOutputObserver on $name (PHPUnit $phpUni
6868
php: 'php',
6969
phpunit: binary,
7070
args: ['-c', 'phpunit.xml', ...stubArgs],
71-
clearOutputOnRun: true,
71+
clearDebugOutputOnRun: true,
7272
});
7373
testRunner = new TestRunner();
7474
const outputChannel = vscode.window.createOutputChannel('phpunit');
@@ -98,7 +98,7 @@ describe.each(detectPhpUnitStubs())('RawOutputObserver on $name (PHPUnit $phpUni
9898
}
9999

100100
it('should not clear output channel', async () => {
101-
await configuration.update('clearOutputOnRun', false);
101+
await configuration.update('clearDebugOutputOnRun', false);
102102
const testFile = phpUnitProject('tests/AssertionsTest.php');
103103
const filter = 'test_passed';
104104
await run(testFile, filter);

packages/extension/src/Observers/RawOutputObserver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class RawOutputObserver implements TestRunnerObserver {
2828
return;
2929
}
3030

31-
if (this.configuration.get('clearOutputOnRun') === true) {
31+
if (this.configuration.get('clearDebugOutputOnRun') === true) {
3232
this.writer.clear();
3333
}
3434

packages/extension/src/extension.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ describe('Extension Test', () => {
300300
);
301301

302302
expect(workspace.getConfiguration).toHaveBeenCalledWith('phpunit', expect.anything());
303-
expect(window.createOutputChannel).toHaveBeenCalledWith('PHPUnit', 'phpunit');
303+
expect(window.createOutputChannel).toHaveBeenCalledWith('PHPUnit Debug', 'phpunit');
304304
expect(tests.createTestController).toHaveBeenCalledWith('phpunit', 'PHPUnit');
305305
for (const cmd of [
306306
'phpunit.reload',

packages/extension/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export async function activate(context: ExtensionContext) {
3333
});
3434

3535
const ctrl = tests.createTestController('phpunit', 'PHPUnit');
36-
const outputChannel = window.createOutputChannel('PHPUnit', 'phpunit');
36+
const outputChannel = window.createOutputChannel('PHPUnit Debug', 'phpunit');
3737
const parentContainer = createParentContainer(ctrl, outputChannel);
3838
const folderManager = parentContainer.get(WorkspaceFolderManager);
3939

0 commit comments

Comments
 (0)