aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/plugin-stub-generator
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-18 08:04:47 +0900
committernsfisis <nsfisis@gmail.com>2026-08-18 08:04:47 +0900
commitda59204f1df8ee3e27ee4385ae81512a188bf567 (patch)
tree4209cd94040b36815e4c34b065116d012b0652c6 /scripts/plugin-stub-generator
parente2a46e4281920867ba37c67fddbaaa2820f067d2 (diff)
downloadphp-shirabe-da59204f1df8ee3e27ee4385ae81512a188bf567.tar.gz
php-shirabe-da59204f1df8ee3e27ee4385ae81512a188bf567.tar.zst
php-shirabe-da59204f1df8ee3e27ee4385ae81512a188bf567.zip
fix(show-command): model the JSON output as dedicated structs
Replace the `IndexMap<String, PhpMixed>` maps behind `show`'s three output shapes with structs deriving `serde::Serialize`, so field order, key omission and PHP's rule that an empty array encodes as `[]` live in the type instead of being rebuilt at every insertion site. Typing the fields after PHP's own signatures corrects three divergences: `description`, `source.url`/`source.reference` and `dist.url`/`dist.reference` now encode as `null` rather than `""` where the getter returns null, and the package list follows PHP's `??` chain for the homepage fallback instead of also skipping empty strings. Record with TODO(port) that `get_links_for_type` matches composer.json key names while `show` passes `Link::TYPE_*`, so its link sections never print. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'scripts/plugin-stub-generator')
0 files changed, 0 insertions, 0 deletions