Skip to content

Conversation

@adamziel
Copy link
Collaborator

@adamziel adamziel commented Dec 16, 2024

Adds streaming readers for:

  • Byte sources – both local and remote (with seek() support via range requests)
  • Zip – rewrites the original one to pull data from WP_Byte_Source as needed.
  • Filesystems – local FS, ZIP FS, a generic interface to add support for git and others

This work is a pre-requisite for #121 and will likely evolve.

Testing instructions

None.

We'll need a good test coverage for all these primitives, but the work is still highly exploratory and meant to inform a larger refactorization of the step handlers.

@adamziel adamziel changed the title Byte readers, streaming Filesystem, rewrite ZipStreamReader Streaming readers: Bytes, Filesystem, Zip Dec 17, 2024
@adamziel adamziel marked this pull request as ready for review December 17, 2024 13:32
@adamziel adamziel merged commit b1362cb into trunk Dec 17, 2024
0 of 21 checks passed
zaerl pushed a commit to WordPress/wordpress-playground that referenced this pull request Jan 8, 2025
Sets the stage for the EPub importer. A part of
#2080

Refactors and clean up the Data Liberation package. This includes
renaming, reorganizing file paths, improving class structure, and
removing deprecated/unused code.

## Key Changes

**Refactor:**
- Renamed `WP_WXR_Reader` to `WP_WXR_Entity_Reader` for consistency and
clarity.
   - Adjusted references in related classes, tests, and imports.
- Moved `byte-readers` to the Blueprints library (see
WordPress/php-toolkit#121)

**Cleanup:**
- Deleted unused and redundant byte reader classes (`WP_Byte_Reader`,
`WP_File_Reader`, etc.).
   - Removed legacy files such as `WXR_Import_Info`.

**New Additions:**
- Added `WP_Directory_Tree_Entity_Reader` to improve handling of
directory tree imports.
- Introduced `WP_Import_HTML_Processor` for better HTML import
functionality.

## Testing instructions

Confirm the CI tests passed
topdev22 added a commit to topdev22/library that referenced this pull request Feb 7, 2025
Adds streaming readers for:

* Byte sources – both local and remote (with `seek()` support via range
requests)
* Zip – rewrites the original one to pull data from `WP_Byte_Source` as
needed.
* Filesystems – local FS, ZIP FS, a generic interface to add support for
git and others

This work is a pre-requisite for
WordPress/php-toolkit#121 and will likely
evolve.

 ## Testing instructions

None.

We'll need a good test coverage for all these primitives, but the work
is still highly exploratory and meant to inform a larger refactorization
of the step handlers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants