From a8aa49013faa6c43bef628eea6d6b5687100c17a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 12 May 2026 02:10:40 +0900 Subject: feat(port): port PluginBlockedException.php --- Cargo.lock | 7 +++++++ Cargo.toml | 1 + crates/shirabe-php-shim/Cargo.toml | 4 ++++ crates/shirabe-php-shim/src/lib.rs | 5 +++++ crates/shirabe/Cargo.toml | 3 +++ crates/shirabe/src/plugin/plugin_blocked_exception.rs | 5 +++++ 6 files changed, 25 insertions(+) create mode 100644 crates/shirabe-php-shim/Cargo.toml create mode 100644 crates/shirabe-php-shim/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index d379c5a..336b966 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,3 +5,10 @@ version = 4 [[package]] name = "shirabe" version = "0.0.1" +dependencies = [ + "shirabe-php-shim", +] + +[[package]] +name = "shirabe-php-shim" +version = "0.0.1" diff --git a/Cargo.toml b/Cargo.toml index 5950f2d..557a594 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,3 +7,4 @@ version = "0.0.1" edition = "2024" [workspace.dependencies] +shirabe-php-shim = { path = "crates/shirabe-php-shim" } diff --git a/crates/shirabe-php-shim/Cargo.toml b/crates/shirabe-php-shim/Cargo.toml new file mode 100644 index 0000000..d565ea7 --- /dev/null +++ b/crates/shirabe-php-shim/Cargo.toml @@ -0,0 +1,4 @@ +[package] +name = "shirabe-php-shim" +version.workspace = true +edition.workspace = true diff --git a/crates/shirabe-php-shim/src/lib.rs b/crates/shirabe-php-shim/src/lib.rs new file mode 100644 index 0000000..0e8fab5 --- /dev/null +++ b/crates/shirabe-php-shim/src/lib.rs @@ -0,0 +1,5 @@ +#[derive(Debug)] +pub struct UnexpectedValueException { + pub message: String, + pub code: i64, +} diff --git a/crates/shirabe/Cargo.toml b/crates/shirabe/Cargo.toml index 597a886..28d0456 100644 --- a/crates/shirabe/Cargo.toml +++ b/crates/shirabe/Cargo.toml @@ -2,3 +2,6 @@ name = "shirabe" version.workspace = true edition.workspace = true + +[dependencies] +shirabe-php-shim.workspace = true diff --git a/crates/shirabe/src/plugin/plugin_blocked_exception.rs b/crates/shirabe/src/plugin/plugin_blocked_exception.rs index ea89194..b8f2301 100644 --- a/crates/shirabe/src/plugin/plugin_blocked_exception.rs +++ b/crates/shirabe/src/plugin/plugin_blocked_exception.rs @@ -1 +1,6 @@ //! ref: composer/src/Composer/Plugin/PluginBlockedException.php + +use shirabe_php_shim::UnexpectedValueException; + +// TODO(plugin): PluginBlockedException is a part of Plugin API. +pub struct PluginBlockedException(pub UnexpectedValueException); -- cgit v1.3.1