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 --- 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 +++++ 4 files changed, 17 insertions(+) create mode 100644 crates/shirabe-php-shim/Cargo.toml create mode 100644 crates/shirabe-php-shim/src/lib.rs (limited to 'crates') 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