WordPress / WordPress/wordpress-playground

php.writeFile: Support Blob, File, and ArrayBuffer

Open
#192 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Feature] PHP.wasm [Type] Developer Experience
Dominant language
JavaScript
Stars
2k
Forks
462
Avg merge
18h 44m
Merged PRs (30d)
33

Description

php.writeFile only supports a string and a Uint8Array at the moment. Converting these data types to Uint8Array on each write is inconvenient if your chosen API happens to output those. The PHP class could easily support more data types and also provide a better error message than Unsupported data type.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the php.writeFile entry point and inspect how it currently handles string and Uint8Array values, including the existing "Unsupported data type" error. Done means Blob, File, and ArrayBuffer are accepted without caller-side conversion and unsupported inputs receive a more useful error message.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php, wasm
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.