diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-07 20:51:59 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-07 20:51:59 +0900 |
| commit | 427e059e4ffc6ce5ff130c803f9e533b7c125089 (patch) | |
| tree | 96b7c8690bbba0f3238dfe8f52e7fb572dced1e7 /crates/shirabe-php-rpc/php/stubs/Composer/Package/CompleteAliasPackage.php | |
| parent | ae365645730b95d5b01b0df7382b91668d5fa24e (diff) | |
| download | php-shirabe-427e059e4ffc6ce5ff130c803f9e533b7c125089.tar.gz php-shirabe-427e059e4ffc6ce5ff130c803f9e533b7c125089.tar.zst php-shirabe-427e059e4ffc6ce5ff130c803f9e533b7c125089.zip | |
feat(plugin): cross alias packages over RPC as proxy stubs
AliasPackage, CompleteAliasPackage and RootAliasPackage now have generated
proxy stubs, so a package handed to a plugin no longer has to be a real
package: it crosses as the stub matching its concrete variant, answers
getAliasOf / setRootPackageAlias / isRootPackageAlias /
hasSelfVersionRequires, and can be constructed from plugin code.
The setters RootPackageInterface declares are routed through that interface
for every root package instead of through the base Package state. Only the
alias variant needs it -- RootAliasPackage overrides all nine to write
through to the package it aliases -- but a real RootPackage delegates to the
same base state either way, so both take one path.
An alias of an alias has no representation here, so narrowing the
constructor argument to a real package is an explicit error rather than a
silent demotion.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-rpc/php/stubs/Composer/Package/CompleteAliasPackage.php')
| -rw-r--r-- | crates/shirabe-php-rpc/php/stubs/Composer/Package/CompleteAliasPackage.php | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/crates/shirabe-php-rpc/php/stubs/Composer/Package/CompleteAliasPackage.php b/crates/shirabe-php-rpc/php/stubs/Composer/Package/CompleteAliasPackage.php new file mode 100644 index 00000000..19555915 --- /dev/null +++ b/crates/shirabe-php-rpc/php/stubs/Composer/Package/CompleteAliasPackage.php @@ -0,0 +1,140 @@ +<?php + +// Generated by scripts/plugin-stub-generator; do not edit by hand. +// Proxy stub for Composer\Package\CompleteAliasPackage: the public surface forwards to the Rust-side entity over RPC. + +namespace Composer\Package; + +class CompleteAliasPackage extends AliasPackage implements CompletePackageInterface +{ + public function __construct(CompletePackage $aliasOf, string $version, string $prettyVersion) + { + [$this->__rhandle, $this->__epoch] = \ShirabeRpcRuntime::callRust(0, '__shirabeConstruct', [static::class, [$aliasOf, $version, $prettyVersion]]); + \ShirabeRustObjectRegistry::adopt($this->__rhandle, $this); + } + + public function getScripts(): array + { + return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getScripts', []); + } + + public function setScripts(array $scripts): void + { + \ShirabeRpcRuntime::callRust($this->__rhandle, 'setScripts', [$scripts]); + } + + public function getRepositories(): array + { + return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getRepositories', []); + } + + public function setRepositories(array $repositories): void + { + \ShirabeRpcRuntime::callRust($this->__rhandle, 'setRepositories', [$repositories]); + } + + public function getLicense(): array + { + return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getLicense', []); + } + + public function setLicense(array $license): void + { + \ShirabeRpcRuntime::callRust($this->__rhandle, 'setLicense', [$license]); + } + + public function getKeywords(): array + { + return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getKeywords', []); + } + + public function setKeywords(array $keywords): void + { + \ShirabeRpcRuntime::callRust($this->__rhandle, 'setKeywords', [$keywords]); + } + + public function getDescription(): ?string + { + return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getDescription', []); + } + + public function setDescription(?string $description): void + { + \ShirabeRpcRuntime::callRust($this->__rhandle, 'setDescription', [$description]); + } + + public function getHomepage(): ?string + { + return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getHomepage', []); + } + + public function setHomepage(?string $homepage): void + { + \ShirabeRpcRuntime::callRust($this->__rhandle, 'setHomepage', [$homepage]); + } + + public function getAuthors(): array + { + return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getAuthors', []); + } + + public function setAuthors(array $authors): void + { + \ShirabeRpcRuntime::callRust($this->__rhandle, 'setAuthors', [$authors]); + } + + public function getSupport(): array + { + return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getSupport', []); + } + + public function setSupport(array $support): void + { + \ShirabeRpcRuntime::callRust($this->__rhandle, 'setSupport', [$support]); + } + + public function getFunding(): array + { + return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getFunding', []); + } + + public function setFunding(array $funding): void + { + \ShirabeRpcRuntime::callRust($this->__rhandle, 'setFunding', [$funding]); + } + + public function isAbandoned(): bool + { + return \ShirabeRpcRuntime::callRust($this->__rhandle, 'isAbandoned', []); + } + + public function getReplacementPackage(): ?string + { + return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getReplacementPackage', []); + } + + public function setAbandoned($abandoned): void + { + \ShirabeRpcRuntime::callRust($this->__rhandle, 'setAbandoned', [$abandoned]); + } + + public function getArchiveName(): ?string + { + return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getArchiveName', []); + } + + public function setArchiveName(?string $name): void + { + \ShirabeRpcRuntime::callRust($this->__rhandle, 'setArchiveName', [$name]); + } + + public function getArchiveExcludes(): array + { + return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getArchiveExcludes', []); + } + + public function setArchiveExcludes(array $excludes): void + { + \ShirabeRpcRuntime::callRust($this->__rhandle, 'setArchiveExcludes', [$excludes]); + } +} |
