wp-php-toolkit/reprint-exporter
Streaming export engine used by the Reprint Exporter WordPress plugin
v0.9.2
165K downloads/mo
#4019 most downloaded on Packagist
wp-php-toolkit/reprint-exporter
What this package is like to depend on
Last release 27 days ago
27 Jul 2026
Ships fairly regularly
a new release about every 9 days
Some releases are documented
notes for 10 of 39 stable releases
Nothing withdrawn
no release was ever pulled
4 months old
39 releases · first in 2026
25 releases in the last 12 months
see the full history below
Release timeline
25 releases · Mar 2026 to Jul 2026Releases
latest 39-
v0.9.227 Jul 2026Release notes
Open source →Text-primary-key exports now resume in the source primary key's indexed
collation order, so every batch can seek into the primary B-tree instead
of scanning and sorting the table again.Background
#398 made both sides of pagination byte-ordered with
CAST(primary_key AS BINARY). That keptWHEREandORDER BYconsistent, but applying a
function to the indexed column prevents MySQL from using the primary key
for either the range or the order.For example:
CREATE TABLE translated_keys ( category VARCHAR(16) CHARACTER SET latin1 COLLATE latin1_german2_ci NOT NULL, sequence_number INT NOT NULL, PRIMARY KEY (category, sequence_number) ); INSERT INTO translated_keys VALUES (CONVERT(X'E4' USING latin1), 1), ('ae', 2), (CONVERT(X'E4' USING latin1), 3), ('b', 1);
With
batch_size=1, resuming after each row previously compared and
ordered byCAST(category AS BINARY). MySQL reported a full scan and
Using filesortfor every batch. On this table,äandaeare equal
under the indexed collation, sosequence_numbermust order those
composite keys.This change
The SELECT list still casts text to binary, so the dump and cursor
retain the original database bytes. Pagination compares the bare text
column withFROM_BASE64(...)and orders by that same bare column. The
column's declared character set and collation win the comparison;
connection charset and collation do not participate.Both the native PDO path and the
wpdbfallback runSET NAMES utf8mb4 COLLATE utf8mb4_binbefore exporter queries. This gives them the same
client, connection, and result charsets and the same connection
collation without overriding a column's stored collation.The resulting plan uses a
PRIMARYrange scan without a filesort on
MySQL 5.7, MySQL 8.0, and MariaDB 10.11.ENUMandSETretain byte
ordering because their indexes order numeric positions while the cursor
contains their displayed strings.Testing
The one-row resume tests cover raw latin1 bytes, numeric-looking text
keys, a non-binary collation, and a composite(latin1 VARCHAR, INT)
key with collation-equal text values. The new index-order and composite
tests fail against #398 and pass here. The connection tests start PDO
with a latin1 session and simulate the PDO-lesswpdbpath; both
confirm that exporter setup ends atutf8mb4_bin.cd tests && ../vendor/bin/phpunit php vendor/bin/phpstan analyze --memory-limit=1G vendor/bin/phpcs --standard=PHPCompatibility --runtime-set testVersion 7.2- -ps packages/reprint-exporter/src/class-mysql-dump-producer.php packages/reprint-exporter/src/export.php packages/reprint-exporter/src/class-wpdb-driver-pdo.php git diff --check
-
v0.9.111 Jul 2026Release notes
Open source →Resumed pushes now stop if
state.jsonsays we've saved more bytes than
we actually did.Before this PR, lost bytes could become NULs in a corrupt file that
still passed the final size check. The old writer extended the empty
file to offset 5. The filesystem filled the gap with NULs. Later chunks
restored the expected length, sofinalize()accepted the file.With this PR, any uploaded file chunk that can't be cleanly appended to
the partial staged file halts processing the request. No skipping, no
recovery attempt, just full stop. PHP likely has more uploaded file data
buffered, but we don't care. Correctness is more important than
performance and in the initial Push version, we'll be very strict. In a
future iteration we may set that one broken file aside and communicate
to the source site "hey, resend that path please", but for now we'll err
on the side of simplicity. -
v0.9.001 Jul 2026Release notes
Open source →What it does
Splits HMAC verification so Reprint can authenticate signed headers
before doing any body hashing, while making the intended boundary
explicit: HMAC is for small control-plane requests, not large data
uploads.The existing
verify()andverify_globals()paths still work for
current small requests. Newer code can useverify_control_request()
for bounded protocol commands orverify_content_hash()when it already
has a digest.Rationale
Push/inverse-pull needs two different trust boundaries:
- small commands such as session start, preflight, plan confirmation,
commit, cancel, and resume should be HMAC-authenticated; - large files/DB chunks should move through authenticated sessions with
per-chunk hashes and final manifests, not one whole-body HMAC.
That avoids reading or buffering a multi-megabyte body just to
authenticate it, and it keeps the future chunked upload flow compatible
with PHP hosts that buffer request bodies.Testing instructions
cd tests && ../vendor/bin/phpunit --colors=never HmacServerTest.phpcomposer analyze
- small commands such as session start, preflight, plan confirmation,
-
v0.8.215 Jun 2026 -
v0.8.126 May 2026Release notes
Open source →Retargets #1 into the monorepo package path.
Also adds README files to the split Composer package directories explaining that the wp-php-toolkit package repositories are read-only mirrors and that changes should be proposed against adamziel/reprint.
Co-Authored-By: Luca Tumedei [email protected]
Co-Authored-By: Claude Opus 4.7 (1M context) [email protected] -
v0.8.020 May 2026 -
v0.7.418 May 2026 -
v0.7.304 May 2026Release notes
Open source →Summary
Picks up wp-php-toolkit
v0.7.3,
which fixed the published-package autoload regressions caught by
WordPress/php-toolkit#264. The most relevant fixes for reprint:- [email protected] now correctly declares its dependency on
wp-php-toolkit/html - [email protected] no longer eagerly declares WP_Error through
autoload.files - Various optional integrations bundled in vendored Symfony / webuni
packages are excluded from the classmap
Changes
- packages/reprint-exporter/composer.json: ^0.7.2 -> ^0.7.3 for
data-liberation and html - packages/reprint-importer/composer.json: same
- composer.lock refreshed; all transitive toolkit packages resolve to
v0.7.3
Test plan
- composer update wp-php-toolkit/data-liberation wp-php-toolkit/html
resolves cleanly to v0.7.3 across all transitive packages - composer compat (PHP 7.4 compatibility) passes
- ExportLibraryLoadTest and BuildPdoDsnTest pass locally
- PHPUnit matrix green on CI
- [email protected] now correctly declares its dependency on
-
v0.7.230 Apr 2026Release notes
Open source →Picks up the v0.7.2 fixes — PSR-4 vs WP
class-*.phpnaming, the
WP-coexistence regression wherehtml5-named-character-references.php
loadedWP_Token_Mapat composer bootstrap (caused fatals in any
consumer that also loads WordPress, e.g. wpcomsh tests), and the
package-bootstrap fatals from v0.7.0/v0.7.1. -
v0.7.1no dateRelease notes
Open source →Picks up the v0.7.2 fixes — PSR-4 vs WP
class-*.phpnaming, the
WP-coexistence regression wherehtml5-named-character-references.php
loadedWP_Token_Mapat composer bootstrap (caused fatals in any
consumer that also loads WordPress, e.g. wpcomsh tests), and the
package-bootstrap fatals from v0.7.0/v0.7.1. -
v0.7.030 Apr 2026Nothing published for this version
-
v0.1.4727 Apr 2026Nothing published for this version
-
v0.1.4617 Apr 2026Nothing published for this version
-
v0.1.45no dateNothing published for this version
-
v0.1.4416 Apr 2026Nothing published for this version
-
v0.1.4315 Apr 2026Nothing published for this version
-
v0.1.4111 Apr 2026Nothing published for this version
-
v0.1.40no dateNothing published for this version
-
v0.1.39no dateNothing published for this version
-
v0.1.38no dateNothing published for this version
-
v0.1.37no dateNothing published for this version
-
v0.1.3610 Apr 2026Nothing published for this version
-
v0.1.3509 Apr 2026Nothing published for this version
-
v0.1.3409 Apr 2026Nothing published for this version
-
v0.1.3309 Apr 2026Nothing published for this version
-
v0.1.3208 Apr 2026Nothing published for this version
-
v0.1.3108 Apr 2026Nothing published for this version
-
v0.1.30no dateNothing published for this version
-
v0.1.2907 Apr 2026Nothing published for this version
-
v0.1.28no dateNothing published for this version
-
v0.1.27no dateNothing published for this version
-
v0.1.26no dateNothing published for this version
-
v0.1.25no dateNothing published for this version
-
v0.1.24no dateNothing published for this version
-
v0.1.2304 Apr 2026Nothing published for this version
-
v0.1.2202 Apr 2026Nothing published for this version
-
v0.1.2131 Mar 2026Nothing published for this version
-
v0.1.20no dateNothing published for this version
-
v0.1.19no dateNothing published for this version