From 261516d5ce6f8b0d69cf9e3da7dd2f0ef1cdc36a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 4 Aug 2026 03:36:10 +0900 Subject: feat(plugin): generate the worker proxy stubs from the Composer sources Replace the hand-written proxy stubs under crates/shirabe-php-rpc/php/stubs with output of scripts/plugin-stub-generator, a deterministic emitter that derives every stub from the Composer checkout and the classifier report. Anything it cannot faithfully proxy (by-ref/variadic parameters, magic methods, public properties, diverging omitted overrides, stale stub files, a STUB_FILES entry missing in lib.rs) fails generation instead of degrading silently, so future Composer releases surface new members as explicit errors rather than silent gaps. Regenerating the stubs also normalizes the hand-written inconsistencies (uniform guarded constructors, import-based type spellings) and fixes real gaps the review of the generated diff uncovered: the BaseIO authentication methods now carry the real class's untyped signatures, and the previously missing ConsoleIO::sanitize is materialized together with its private static helper. A cargo test runs generate-stubs --check to keep the committed stubs, the generator and the embedded list from drifting apart. Co-Authored-By: Claude Fable 5 --- scripts/plugin-stub-generator/targets.list | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 scripts/plugin-stub-generator/targets.list (limited to 'scripts/plugin-stub-generator/targets.list') diff --git a/scripts/plugin-stub-generator/targets.list b/scripts/plugin-stub-generator/targets.list new file mode 100644 index 00000000..42794e13 --- /dev/null +++ b/scripts/plugin-stub-generator/targets.list @@ -0,0 +1,12 @@ +# Classes emitted as proxy stubs into crates/shirabe-php-rpc/php/stubs/. One FQCN per +# line; the output path is derived from the FQCN. Every entry must be classified as +# rust-proxy or contract in the classifier report, and stub base classes must precede +# their subclasses. +Composer\EventDispatcher\Event +Composer\Script\Event +Composer\PartialComposer +Composer\Composer +Composer\IO\BaseIO +Composer\IO\ConsoleIO +Composer\IO\BufferIO +Composer\IO\NullIO -- cgit v1.3.1