Skip to content

Conversation

jasalt
Copy link

@jasalt jasalt commented May 16, 2025

Allow PhpWeb constructor's files parameter and tag attribute data-files to preload files with nested directory structure.

This way e.g. Composer's vendor directory can be preloaded by specifying it's content as a single JSON object / file which can be created with script such as https://gist.github.com/jasalt/b50f60914be75b8dd3ee18f878d801c1.

Provides alternate way to initializing WASM FS where currently copying a single compressed file and extracting it in WASM PHP code is one popular method. This does not require running any PHP initialization code in Wasm.

Allow `PhpWeb` constructor's `files` parameter and tag attribute `data-files` to preload files with nested directory structure.
@jasalt
Copy link
Author

jasalt commented May 16, 2025

Didn't test building this yet, just patched this code locally in NPM package sources and got with Composer require_once '/vendor/autoload.php'; working with it (demo repo).

@Potherca
Copy link

Potherca commented Jul 7, 2025

@jasalt What would be needed to move this MR out of draft?

@jasalt jasalt marked this pull request as ready for review July 11, 2025 19:43
@jasalt
Copy link
Author

jasalt commented Jul 11, 2025

@Potherca thank's for the nudge, forgot to send it for review.

@jasalt
Copy link
Author

jasalt commented Aug 15, 2025

Ping @seanmorris, noted some demand with this addition, would you review when ever you have the time.

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