Skip to content

v1.8.2 — broadcast WM_SETTINGCHANGE on PATH change (B1)#16

Merged
devhardiyanto merged 1 commit into
mainfrom
feat/v1.8.2-env-broadcast
Jun 19, 2026
Merged

v1.8.2 — broadcast WM_SETTINGCHANGE on PATH change (B1)#16
devhardiyanto merged 1 commit into
mainfrom
feat/v1.8.2-env-broadcast

Conversation

@devhardiyanto

Copy link
Copy Markdown
Owner

Resolves ROADMAP B1. After a User PATH change, broadcast WM_SETTINGCHANGE ("Environment") so Explorer and the terminals it spawns afterward pick up the new PATH without a logout.

Changes

  • phpvm.ps1: new Send-EnvChangeBroadcast (P/Invoke SendMessageTimeout to HWND_BROADCAST, best-effort). Called from Invoke-Use after persisting PATH. Dropped the Restart your terminal ... warning - the current session is already updated in-process, and new terminals get the change via the broadcast. Replaced with a soft note that only already-open terminals need reopening.
  • install.ps1 / uninstall.ps1: broadcast after their own User PATH writes.
  • Also indented the use php --version output that 1.8.0's replace_all had missed (the } catch { indentation differed).

Checks

  • PSScriptAnalyzer clean (CI-style -Path ./windows -Recurse).
  • 47/47 Pester pass.
  • Broadcast helper verified locally (runs, idempotent on repeat).
  • Version bumped to 1.8.2 (5 sources).

After changing the User PATH, broadcast WM_SETTINGCHANGE (Environment) so
Explorer and the terminals it spawns pick up the new PATH without a logout.

- phpvm.ps1: Send-EnvChangeBroadcast (P/Invoke SendMessageTimeout, HWND_BROADCAST)
  called from Invoke-Use after persisting PATH. Dropped the "restart your
  terminal" warning - the current session is already updated in-process and new
  terminals get the change via the broadcast. Also indented the `use`
  php --version output that 1.8.0's replace_all had missed.
- install.ps1 / uninstall.ps1: broadcast after their User PATH writes too.

Version bump to 1.8.2 across the 5 sources. PSScriptAnalyzer clean, 47/47 Pester.
@devhardiyanto devhardiyanto merged commit 8fa31a7 into main Jun 19, 2026
3 checks passed
@devhardiyanto devhardiyanto deleted the feat/v1.8.2-env-broadcast branch June 19, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant