diff options
Diffstat (limited to 'crates/shirabe-php-rpc/php/stubs/Composer/EventDispatcher')
| -rw-r--r-- | crates/shirabe-php-rpc/php/stubs/Composer/EventDispatcher/Event.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/crates/shirabe-php-rpc/php/stubs/Composer/EventDispatcher/Event.php b/crates/shirabe-php-rpc/php/stubs/Composer/EventDispatcher/Event.php index 9ce9c12f..fea84c75 100644 --- a/crates/shirabe-php-rpc/php/stubs/Composer/EventDispatcher/Event.php +++ b/crates/shirabe-php-rpc/php/stubs/Composer/EventDispatcher/Event.php @@ -1,7 +1,7 @@ <?php -// Hand-written proxy stub for Composer\EventDispatcher\Event, kept in the shape the future stub -// generator will output: the real public methods, each forwarding to the Rust-side entity. +// Generated by scripts/plugin-stub-generator; do not edit by hand. +// Proxy stub for Composer\EventDispatcher\Event: the public surface forwards to the Rust-side entity over RPC. namespace Composer\EventDispatcher; @@ -12,8 +12,16 @@ class Event implements \ShirabeRustStub /** @var int */ protected $__epoch; - public function __construct(int $rhandle, int $epoch) + public function __construct(int $rhandle = 0, int $epoch = 0) { + if (func_num_args() < 2) { + // Constructing the class from plugin code (a common idiom for e.g. `new BufferIO()`) + // is an open question of the plugin design; only proxy instantiation passes a + // Rust handle. Fail with a diagnosable message instead of an ArgumentCountError. + throw new \RuntimeException( + 'Shirabe does not support constructing ' . static::class . ' inside the plugin process yet' + ); + } $this->__rhandle = $rhandle; $this->__epoch = $epoch; } |
