Skip to content

Integrate new io.Blob class - #19

Merged
thekid merged 4 commits into
masterfrom
feature/blob-integration
Oct 17, 2026
Merged

thekid merged 4 commits into
masterfrom
feature/blob-integration

Conversation

@thekid

@thekid thekid commented Apr 2, 2026 •

Copy link
Copy Markdown
Member

This pull request integrates the new io.Blob class into the JSON output layer.

Example

use io\Blob;
use text\json\Json;
use util\cmd\Console;

$in= Console::$in->stream();
$out= Console::$out->stream();

// This writes the data while reading it
Json::write(['data' => new Blob($in)], $out);

<?php namespace text\json\unittest;

use ArrayIterator;
use io\Blob;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires XP 12.9+ but composer.json still reads:

  "require" : {
    "xp-framework/core": "^12.0 | ^11.0 | ^10.0",
    "php" : ">=7.4.0"
  },

We could backport this class to XP 11; or we rewrite the tests to work without the Blob class.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided to go for a BC break, dropping XP < 12, PHP < 8, and release this in 7.0

@thekid
thekid merged commit fe2cbe7 into master Oct 17, 2026
14 checks passed
@thekid
thekid deleted the feature/blob-integration branch October 17, 2026 09:23
@thekid

thekid commented Oct 17, 2026

Copy link
Copy Markdown
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant