From 90b3be462bd2f91ef366df06c2b5bbae2821a394 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 17 May 2026 04:44:51 +0900 Subject: fix(class-map-generator): introduce CaptureKey enum and fix class-map-generator compile errors - Add CaptureKey enum to Preg stub for typed capture access (by index or name) - Expand Preg stub with complete method set matching the PHP Composer\Pcre\Preg API - Update class-map-generator, php-file-cleaner, and php-file-parser to use new API - Add Display impls for exception types in shirabe-php-shim - Add follow_links/exclude stubs to Finder and new/get_pathname stubs to SplFileInfo Co-Authored-By: Claude Sonnet 4.6 --- crates/shirabe-php-shim/src/lib.rs | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'crates/shirabe-php-shim/src/lib.rs') diff --git a/crates/shirabe-php-shim/src/lib.rs b/crates/shirabe-php-shim/src/lib.rs index 2c09d7c..4b4d719 100644 --- a/crates/shirabe-php-shim/src/lib.rs +++ b/crates/shirabe-php-shim/src/lib.rs @@ -71,36 +71,72 @@ pub struct RuntimeException { pub code: i64, } +impl std::fmt::Display for RuntimeException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + #[derive(Debug)] pub struct UnexpectedValueException { pub message: String, pub code: i64, } +impl std::fmt::Display for UnexpectedValueException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + #[derive(Debug)] pub struct InvalidArgumentException { pub message: String, pub code: i64, } +impl std::fmt::Display for InvalidArgumentException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + #[derive(Debug)] pub struct LogicException { pub message: String, pub code: i64, } +impl std::fmt::Display for LogicException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + #[derive(Debug)] pub struct BadMethodCallException { pub message: String, pub code: i64, } +impl std::fmt::Display for BadMethodCallException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + #[derive(Debug)] pub struct OutOfBoundsException { pub message: String, pub code: i64, } +impl std::fmt::Display for OutOfBoundsException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + #[derive(Debug)] pub struct ErrorException { pub message: String, @@ -110,6 +146,12 @@ pub struct ErrorException { pub lineno: i64, } +impl std::fmt::Display for ErrorException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + pub fn is_bool(value: &PhpMixed) -> bool { todo!() } -- cgit v1.3.1