aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-rpc/php/runtime/Shirabe/MaterializedValue.php
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-31 00:15:52 +0900
committernsfisis <nsfisis@gmail.com>2026-08-31 00:15:52 +0900
commit6a6ec1b8f8a5c70d21f3772ce637b763e8ab21ea (patch)
tree5a23dda75a0a8eb39478b77da82cf582e21a1d2c /crates/shirabe-php-rpc/php/runtime/Shirabe/MaterializedValue.php
parentdc1f030e3904677cd65eac0a90c1d850e0ad1bbf (diff)
downloadphp-shirabe-6a6ec1b8f8a5c70d21f3772ce637b763e8ab21ea.tar.gz
php-shirabe-6a6ec1b8f8a5c70d21f3772ce637b763e8ab21ea.tar.zst
php-shirabe-6a6ec1b8f8a5c70d21f3772ce637b763e8ab21ea.zip
feat(plugin): carry Http\Response across as a materialized value
A response is built for one request and the graph never retains it, so there is no entity for a handle to point at. The child holds a real instance instead, revived from the object record the wire carries, and collect() frees the copy each world holds — which is what that method is for. The value-object rule rejects the class only because collect() assigns to $this, so the category comes from an overrides.list entry. HttpDownloader::get() and copy() answer with one. Two gaps stay: decodeJson() reaches Composer\Json\JsonFile, which a guard shadows, and Composer answers a curl request with the CurlResponse subclass where this port flattens the value into a Response. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-rpc/php/runtime/Shirabe/MaterializedValue.php')
-rw-r--r--crates/shirabe-php-rpc/php/runtime/Shirabe/MaterializedValue.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/shirabe-php-rpc/php/runtime/Shirabe/MaterializedValue.php b/crates/shirabe-php-rpc/php/runtime/Shirabe/MaterializedValue.php
index c16b4e18..73a12033 100644
--- a/crates/shirabe-php-rpc/php/runtime/Shirabe/MaterializedValue.php
+++ b/crates/shirabe-php-rpc/php/runtime/Shirabe/MaterializedValue.php
@@ -17,6 +17,7 @@ use Composer\Semver\Constraint\Constraint;
use Composer\Semver\Constraint\MatchAllConstraint;
use Composer\Semver\Constraint\MatchNoneConstraint;
use Composer\Semver\Constraint\MultiConstraint;
+use Composer\Util\Http\Response;
final class MaterializedValue
{
@@ -26,6 +27,7 @@ final class MaterializedValue
MultiConstraint::class,
MatchAllConstraint::class,
MatchNoneConstraint::class,
+ Response::class,
\DateTimeImmutable::class,
\DateTime::class,
];