Skip to content

refactor: replace wazero and php wasm binaries with go-phplint#1261

Open
Soner (shyim) wants to merge 2 commits into
mainfrom
shyim-use-phplint-go
Open

refactor: replace wazero and php wasm binaries with go-phplint#1261
Soner (shyim) wants to merge 2 commits into
mainfrom
shyim-use-phplint-go

Conversation

@shyim

Copy link
Copy Markdown
Member

What changed?

  • Replaced wazero WebAssembly runtime and external php-*.wasm binary downloads with github.com/shyim/go-phplint (v0.2.0).
  • Removed the internal/phplint package entirely, calling go-phplint directly inside internal/extension/platform.go.
  • Removed entitlements.xml and removed the macOS code signing entitlements configuration from .goreleaser.yaml (since JIT/executable memory permissions are no longer required without wazero).
  • Removed SHOPWARE_CLI_DISABLE_WASM_CACHE from GitHub Actions workflow.

Why?

  • Binary size reduction: Reduced compiled CLI binary size by ~1.98 MB (~4.0% reduction, down from ~49.5 MB to ~47.6 MB).
  • Execution speed: PHP linting execution is now orders of magnitude faster (pure Go parser vs instantiating WASM modules per file).
  • Offline / Sandbox friendly: PHP linting no longer requires network requests to fetch WASM binaries or managing a WASM compilation cache on disk.
  • Code cleanup: Eliminated the custom internal/phplint wrapper package and extra entitlement files.

How was this tested?

  • Ran go test ./... and verified all test suites pass.
  • Verified sandboxed execution via ./scripts/run-tests.sh.
  • Tested PHP file linting functionality on sample plugins.

Related issue or discussion

N/A

- Replace wazero and PHP WASM binary downloads with github.com/shyim/go-phplint v0.2.0
- Delete internal/phplint package and execute phplint directly in internal/extension/platform.go
- Remove entitlements.xml and notarize entitlements configuration in .goreleaser.yaml
- Reduce binary size by ~2 MB and speed up PHP linting without network dependencies

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.79%. Comparing base (3340b47) to head (6b9201a).

Files with missing lines Patch % Lines
internal/extension/platform.go 0.00% 44 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1261      +/-   ##
==========================================
+ Coverage   53.63%   53.79%   +0.15%     
==========================================
  Files         303      300       -3     
  Lines       23325    23243      -82     
==========================================
- Hits        12511    12504       -7     
+ Misses      10787    10712      -75     
  Partials       27       27              
Flag Coverage Δ
go-test 53.79% <0.00%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants