PackageTrack
Sign in Get early access

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 2026
Release Pre-release

Releases

latest 39
  1. v0.9.2 27 Jul 2026
    Release notes

    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 kept WHERE and ORDER BY consistent, 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 by CAST(category AS BINARY). MySQL reported a full scan and
    Using filesort for every batch. On this table, ä and ae are equal
    under the indexed collation, so sequence_number must 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 with FROM_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 wpdb fallback run SET NAMES utf8mb4 COLLATE utf8mb4_bin before 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 PRIMARY range scan without a filesort on
    MySQL 5.7, MySQL 8.0, and MariaDB 10.11. ENUM and SET retain 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-less wpdb path; both
    confirm that exporter setup ends at utf8mb4_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
    Open source →
  2. v0.9.1 11 Jul 2026
    Release notes

    Resumed pushes now stop if state.json says 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, so finalize() 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.

    Open source →
  3. v0.9.0 01 Jul 2026
    Release notes

    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() and verify_globals() paths still work for
    current small requests. Newer code can use verify_control_request()
    for bounded protocol commands or verify_content_hash() when it already
    has a digest.

    Rationale

    Push/inverse-pull needs two different trust boundaries:

    1. small commands such as session start, preflight, plan confirmation,
      commit, cancel, and resume should be HMAC-authenticated;
    2. 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.php
    • composer analyze
    Open source →
  4. v0.8.2 15 Jun 2026
    Release notes

    Prevent errors during compressibility checks (#258)

    Open source →
  5. v0.8.1 26 May 2026
    Release notes

    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]

    Open source →
  6. v0.8.0 20 May 2026
    Release notes

    Prepare reprint v0.8.0 release

    Open source →
  7. v0.7.4 18 May 2026
    Release notes

    Bump php-toolkit packages to 0.7.9

    Open source →
  8. v0.7.3 04 May 2026
    Release notes

    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
    Open source →
  9. v0.7.2 30 Apr 2026
    Release notes

    Picks up the v0.7.2 fixes — PSR-4 vs WP class-*.php naming, the
    WP-coexistence regression where html5-named-character-references.php
    loaded WP_Token_Map at 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.

    Open source →
  10. v0.7.1 no date
    Release notes

    Picks up the v0.7.2 fixes — PSR-4 vs WP class-*.php naming, the
    WP-coexistence regression where html5-named-character-references.php
    loaded WP_Token_Map at 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.

    Open source →
  11. v0.7.0 30 Apr 2026

    Nothing published for this version

  12. v0.1.47 27 Apr 2026

    Nothing published for this version

  13. v0.1.46 17 Apr 2026

    Nothing published for this version

  14. v0.1.45 no date

    Nothing published for this version

  15. v0.1.44 16 Apr 2026

    Nothing published for this version

  16. v0.1.43 15 Apr 2026

    Nothing published for this version

  17. v0.1.41 11 Apr 2026

    Nothing published for this version

  18. v0.1.40 no date

    Nothing published for this version

  19. v0.1.39 no date

    Nothing published for this version

  20. v0.1.38 no date

    Nothing published for this version

  21. v0.1.37 no date

    Nothing published for this version

  22. v0.1.36 10 Apr 2026

    Nothing published for this version

  23. v0.1.35 09 Apr 2026

    Nothing published for this version

  24. v0.1.34 09 Apr 2026

    Nothing published for this version

  25. v0.1.33 09 Apr 2026

    Nothing published for this version

  26. v0.1.32 08 Apr 2026

    Nothing published for this version

  27. v0.1.31 08 Apr 2026

    Nothing published for this version

  28. v0.1.30 no date

    Nothing published for this version

  29. v0.1.29 07 Apr 2026

    Nothing published for this version

  30. v0.1.28 no date

    Nothing published for this version

  31. v0.1.27 no date

    Nothing published for this version

  32. v0.1.26 no date

    Nothing published for this version

  33. v0.1.25 no date

    Nothing published for this version

  34. v0.1.24 no date

    Nothing published for this version

  35. v0.1.23 04 Apr 2026

    Nothing published for this version

  36. v0.1.22 02 Apr 2026

    Nothing published for this version

  37. v0.1.21 31 Mar 2026

    Nothing published for this version

  38. v0.1.20 no date

    Nothing published for this version

  39. v0.1.19 no date

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive