Audit fixes: ext info parse-error bug + doctor did-you-mean#26
Merged
Conversation
…idy comment - ext info: the -r snippet used PowerShell operators ($version -eq $null) inside PHP code, a parse error that 2>$null swallowed, so 'phpvm ext info' printed nothing. Mirror the Linux snippet: (getVersion() ?? 'n/a'). - did-you-mean: register 'doctor' (shipped 1.12.0) so a 'doctro' typo suggests it. - tidy the Invoke-Doctor header comment that got split by the 1.12.1 Test-ExtDirMatch insertion. Comment-only. devhardiyanto
'doctor' (shipped 1.12.0) was missing from _PHPVM_COMMANDS, so a typo like 'doctro' never suggested it. Parity with the Windows fix. devhardiyanto
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.
What
Full-codebase audit atas
source-code/phpvm(Gap · Redundan · Deprecated/removed · Quality/commented-code). Menemukan & memperbaiki 1 bug nyata + 1 gap + 1 komentar rusak. Tak ada refactor besar.Why
Diminta audit menyeluruh pasca v1.12.2. Temuan yang bisa di-resolve aman diperbaiki; yang berisiko/by-design didokumentasikan tanpa diubah (anti-melebar).
How
Ext-Infomeng-emit PHPif ($version -eq $null)—-eq/$nulloperator PowerShell, bukan PHP → parse error yang ditelan2>$null, jadiphpvm ext info <name>di Windows selalu kosong. Diperbaiki dengan menyamakan snippet ke versi Linux yang benar:(getVersion() ?? 'n/a'). Diverifikasi jalan di PHP 8.3.doctor(rilis 1.12.0) belum terdaftar di did-you-mean, jadi typodoctrotak menyarandoctor. Ditambah 1:1 di kedua OS + regression test.Invoke-Doctorke-split akibat sisipanTest-ExtDirMatch(patch 1.12.1) → dirapikan. Comment-only.Changes
windows/phpvm.ps1— ext-info snippet valid PHP;doctordi did-you-mean; komentar doctor dirapikanlinux/phpvm.sh—doctordi_PHPVM_COMMANDS(paritas)tests/windows/PureFunctions.Tests.ps1+tests/linux/commands.bats— cover suggestiondoctorTidak diubah (sengaja)
.sh→ refactor B8-style, di luar scope.ext loaded==ext list→ by-design (build-from-source tak ada DLL ON/OFF).Testing Done
bash -n linux/phpvm.shOK; snippet ext-info hasil-fix diverifikasi di PHP 8.3