From 3f525f228052ad04e6f9da6ff160bef803d079bd Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 6 Aug 2026 20:04:25 +0900 Subject: feat(plugin): let links and release dates cross the RPC boundary The link getters and setters and the release date accessors were explicit errors for every non-empty value, because an immutable value has no entity to point a handle at. They now cross as materialized values: the descriptor names the real class and the constructor arguments, and each side builds a genuine instance of its own. The semver constraint a link holds is encoded structurally rather than re-parsed from its string form, so the pretty strings and the conjunctive flag survive the crossing. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe-php-rpc/php/worker.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crates/shirabe-php-rpc/php/worker.php') diff --git a/crates/shirabe-php-rpc/php/worker.php b/crates/shirabe-php-rpc/php/worker.php index 9a36abdd..e82c45ba 100644 --- a/crates/shirabe-php-rpc/php/worker.php +++ b/crates/shirabe-php-rpc/php/worker.php @@ -227,6 +227,10 @@ final class ShirabeRpcRuntime // A natively-constructed dual-mode instance falls through to the P table below. } if (is_object($value)) { + $materialized = \Shirabe\MaterializedValue::describe($value); + if ($materialized !== null) { + return array_map([self::class, 'toWire'], $materialized); + } return ShirabePhpObjectRegistry::descriptor($value); } if (is_resource($value)) { @@ -257,6 +261,9 @@ final class ShirabeRpcRuntime if (isset($value['__pclass']) && count($value) === 1) { return $value['__pclass']; } + if (isset($value['__pnew'])) { + return \Shirabe\MaterializedValue::build(array_map([self::class, 'fromWire'], $value)); + } return array_map([self::class, 'fromWire'], $value); } -- cgit v1.3.1