diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-18 08:04:47 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-18 08:04:47 +0900 |
| commit | da59204f1df8ee3e27ee4385ae81512a188bf567 (patch) | |
| tree | 4209cd94040b36815e4c34b065116d012b0652c6 /scripts/plugin-class-classifier/composer.lock | |
| parent | e2a46e4281920867ba37c67fddbaaa2820f067d2 (diff) | |
| download | php-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-class-classifier/composer.lock')
0 files changed, 0 insertions, 0 deletions
