From ae82788e7e80053c044940335a0a89737c2b0fb2 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 12 May 2026 02:52:21 +0900 Subject: feat(port): ConfigurableRepositoryInterface.php --- crates/shirabe-php-shim/Cargo.toml | 3 +++ crates/shirabe-php-shim/src/lib.rs | 13 +++++++++++++ crates/shirabe/Cargo.toml | 9 +++++++++ .../src/repository/configurable_repository_interface.rs | 7 +++++++ 4 files changed, 32 insertions(+) (limited to 'crates') diff --git a/crates/shirabe-php-shim/Cargo.toml b/crates/shirabe-php-shim/Cargo.toml index d565ea7..4256d47 100644 --- a/crates/shirabe-php-shim/Cargo.toml +++ b/crates/shirabe-php-shim/Cargo.toml @@ -2,3 +2,6 @@ name = "shirabe-php-shim" version.workspace = true edition.workspace = true + +[dependencies] +indexmap.workspace = true diff --git a/crates/shirabe-php-shim/src/lib.rs b/crates/shirabe-php-shim/src/lib.rs index b5cd9c3..df2a0c3 100644 --- a/crates/shirabe-php-shim/src/lib.rs +++ b/crates/shirabe-php-shim/src/lib.rs @@ -1,3 +1,16 @@ +use indexmap::IndexMap; + +#[derive(Debug)] +pub enum PhpMixed { + Null, + Bool(bool), + Int(i64), + Float(f64), + String(String), + List(Vec>), + Array(IndexMap>), +} + #[derive(Debug)] pub struct Exception { pub message: String, diff --git a/crates/shirabe/Cargo.toml b/crates/shirabe/Cargo.toml index 28d0456..8ff50f0 100644 --- a/crates/shirabe/Cargo.toml +++ b/crates/shirabe/Cargo.toml @@ -5,3 +5,12 @@ edition.workspace = true [dependencies] shirabe-php-shim.workspace = true +anyhow.workspace = true +base64.workspace = true +indexmap.workspace = true +md5.workspace = true +regex.workspace = true +serde.workspace = true +serde_json.workspace = true +sha1.workspace = true +url.workspace = true diff --git a/crates/shirabe/src/repository/configurable_repository_interface.rs b/crates/shirabe/src/repository/configurable_repository_interface.rs index 855f71b..f6d36ba 100644 --- a/crates/shirabe/src/repository/configurable_repository_interface.rs +++ b/crates/shirabe/src/repository/configurable_repository_interface.rs @@ -1 +1,8 @@ //! ref: composer/src/Composer/Repository/ConfigurableRepositoryInterface.php + +use indexmap::IndexMap; +use shirabe_php_shim::PhpMixed; + +pub trait ConfigurableRepositoryInterface { + fn get_repo_config(&self) -> IndexMap; +} -- cgit v1.3.1