aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/composer/xdebug_handler/xdebug_handler.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-09 11:24:48 +0900
committernsfisis <nsfisis@gmail.com>2026-08-09 11:24:48 +0900
commit596482de82ff32705e85f18c1c9ae784e6cd2c6f (patch)
tree6a970fa30f7770d702d3f6c53232c123d0478d16 /crates/shirabe-external-packages/src/composer/xdebug_handler/xdebug_handler.rs
parent738a258496318edb6e264b13b8a6d0dc313795d3 (diff)
downloadphp-shirabe-596482de82ff32705e85f18c1c9ae784e6cd2c6f.tar.gz
php-shirabe-596482de82ff32705e85f18c1c9ae784e6cd2c6f.tar.zst
php-shirabe-596482de82ff32705e85f18c1c9ae784e6cd2c6f.zip
refactor(xdebug-handler): extract composer/xdebug_handler into the shirabe-xdebug-handler crate
Move `Composer\XdebugHandler` out of shirabe-external-packages and into its own crate, so the path is `shirabe_xdebug_handler::XdebugHandler` instead of `shirabe_external_packages::composer::xdebug_handler::XdebugHandler`. Standing alone, the stub no longer sits in a crate that shirabe-php-rpc depends on, so drop the dependency-cycle rationale from the comments that explain why callers reach for shirabe_php_rpc directly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-external-packages/src/composer/xdebug_handler/xdebug_handler.rs')
-rw-r--r--crates/shirabe-external-packages/src/composer/xdebug_handler/xdebug_handler.rs34
1 files changed, 0 insertions, 34 deletions
diff --git a/crates/shirabe-external-packages/src/composer/xdebug_handler/xdebug_handler.rs b/crates/shirabe-external-packages/src/composer/xdebug_handler/xdebug_handler.rs
deleted file mode 100644
index 3bbe9014..00000000
--- a/crates/shirabe-external-packages/src/composer/xdebug_handler/xdebug_handler.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-//! ref: composer/vendor/composer/xdebug-handler/src/XdebugHandler.php
-
-#[derive(Debug)]
-pub struct XdebugHandler;
-
-impl XdebugHandler {
- pub fn is_xdebug_active() -> bool {
- // TODO(php-runtime)
- false
- }
-
- pub fn get_skipped_version() -> Option<String> {
- // TODO(php-runtime)
- // The restart-to-disable-xdebug mechanism is not ported (`is_xdebug_active` is
- // hardcoded `false`), so a restart never happens and `self::$skipped` stays at
- // its PHP default of `""`.
- Some(String::new())
- }
-
- pub fn get_all_ini_files() -> Vec<String> {
- // TODO(php-runtime)
- // No XdebugHandler is ever constructed (`self::$name` stays null), because the
- // `new XdebugHandler('Composer'); $xdebug->check();` bootstrap in `bin/composer` is not
- // ported (see the TODO(phase-c) at the top of shirabe's main.rs), so the
- // COMPOSER_ORIGINAL_INIS env-var branch is unreachable here.
- //
- // shirabe-external-packages cannot depend on shirabe-php-rpc (the reverse dependency
- // would cycle, since shirabe-php-rpc already depends on shirabe-external-packages), so
- // callers that need the real PHP runtime's ini files (php_ini_loaded_file() /
- // php_ini_scanned_files()) query shirabe_php_rpc directly instead of going through this
- // stub; see crate::util::ini_helper::IniHelper::get_all.
- vec![String::new()]
- }
-}