Repository navigation
v0.8.0
Highlights
PHP AST Edit v0.8.0 adds project-wide method renames, edits inside named scopes, integrated project-check evidence and executable release packages. The changes from @CybotTM also correct the command-line flag form so supplied source guards are enforced and failed project checks return exit code 1.
- Ask for the change by name. One edit can use flags without a payload file. Related edits still fit in one JSON transaction.
replace_expressionandreplace_statementaccept structuralmatchcode inside a named method, andadd_useadds imports idempotently. - Rename beyond one file. With the separately installed, digest-pinned Phpactor resolver, eligible method renames follow project hierarchies and resolved PHP call sites. Unresolved or external contracts can be refused. Remaining PHP strings and configuration/template mentions are reported; opt-in
mocks: truealso changes matching PHPUnit mock names. Mock strings are not resolved to a specific class, so review unrelated methods sharing the name. - Reuse an observed check result. Configure a project check once and
applyruns it and reports its identity and verdict.alreadyRunidentifies successful project checks; reuse assumes unchanged relevant inputs and environment. Parser success and passing tests do not prove exhaustive reference completeness. - Choose the evidence you need. The default report retains the diff; compact reports avoid repeated verification output. Optional
report: "agent"highlights unresolved work and check evidence while omitting the diff. It is not recommended universally: a measured case cost more when the model fetched the diff again. - Install a working engine. Both skill and plugin archives now bundle the runtime PHAR. The standalone PHAR, runtime dependency manifest, checksums, Sigstore bundle and GitHub build attestations are published together after installation tests. Phpactor is optional and is not bundled.
- Keep formatting optional. Ordinary edits preserve formatting by default unless the project declares canonical printing. The canonical printer can break over-width method chains, and
doctorreports remaining width overruns and resolver/check setup.
Upgrade notes
The flag form now rejects unsupported flags instead of silently ignoring them. A method-declaration set_name that would leave named calls behind is refused with a rename_method suggestion; explicit declarationOnly: true retains intentional declaration-only changes. Failed project checks retain the edit for repair and return exit code 1; rejected transactions return exit code 2.
Project-wide renames require Git and the separately installed Phpactor 2026.07.22.0 PHAR, with PHP 8.2+, mbstring, posix and tokenizer. See the installation instructions for the pinned digest and configuration. Use WSL for this resolver on Windows.
Measured behavior
A 24-session comparison on two small tasks with Haiku and Sonnet found manual post-edit checking in 12/12 separate-check sessions and 0/12 integrated-check sessions. Median combined tokens, including cache tokens, were 60,443.5 versus 45,499 and wall time 17.3 versus 13.0 seconds. The task oracle passed in 12/12 controls and 11/12 treatments; one treatment left a forbidden payload file despite correct PHP edits. These results cover successful, cheap checks and do not establish universal savings. Complete report and evidence.
Earlier negative and mixed experiments remain published, including the entrypoint instruction that did not meet its adoption rule. The older 90.2% median token reduction belongs to a selected experimental resolver/AST/checking workflow and is not a measurement of every feature in this release.
Raw data from the planned 120-run powered experiment have not been recovered. Its repaired driver, analyzer and recovery instructions preserve that evidence gap; they establish no additional savings, and no replacement campaign was run for this release.
Download and verify
gh release download v0.8.0 --repo netresearch/php-ast-edit-skill --dir php-ast-edit-v0.8.0
cd php-ast-edit-v0.8.0
sha256sum --check SHA256SUMS.txt
gh attestation verify php-ast-edit.phar --repo netresearch/php-ast-edit-skill \
--cert-identity 'https://github.com/netresearch/php-ast-edit-skill/.github/workflows/release.yml@refs/tags/v0.8.0'
php php-ast-edit.phar helpTo authenticate the checksum file for all packaged assets, verify its Sigstore bundle with Cosign:
cosign verify-blob \
--bundle SHA256SUMS.txt.sigstore.json \
--certificate-identity 'https://github.com/netresearch/php-ast-edit-skill/.github/workflows/release.yml@refs/tags/v0.8.0' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
SHA256SUMS.txtFull Changelog: v0.7.0...v0.8.0