Skip to content

Integrate new io.Blob class#19

Open
thekid wants to merge 1 commit intomasterfrom
feature/blob-integration
Open

Integrate new io.Blob class#19
thekid wants to merge 1 commit intomasterfrom
feature/blob-integration

Conversation

@thekid
Copy link
Copy Markdown
Member

@thekid thekid commented Apr 2, 2026

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.

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.

1 participant