aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/composer/xdebug_handler/xdebug_handler.rs
AgeCommit message (Collapse)Author
2026-07-24fix(dependency-resolver): query real PHP for ext-* version/loaded checksnsfisis
Two shim gaps made the extension-related branches of solver-problem messages wrong: - phpversion($ext) with a non-empty extension can't be known statically (it's shirabe-php-shim's todo!()); Problem::get_missing_package_reason now calls shirabe_php_rpc::phpversion, the same RPC bridge platform::runtime::Runtime::get_extension_version already uses. - extension_loaded's hardcoded allowlist was missing "pcre", a mandatory always-compiled-in PHP extension, so ext-pcre was misreported as "missing from your system" instead of "disabled by your platform config" whenever a platform override disabled it. Also fix XdebugHandler::getAllIniFiles() always returning `[""]` (a php-runtime stub): create_extension_hint()'s early-return guard (`paths[0] empty && len==1`) fired unconditionally, silently dropping the entire "To enable extensions..." hint from every solver-problem message that mentions missing extensions. shirabe-external-packages can't depend on shirabe-php-rpc (shirabe-php-rpc already depends on shirabe-external-packages), so IniHelper::get_all() queries a new get_all_ini_files RPC command directly instead of going through the stub. This exposed that XdebugHandler is never constructed with a name because bin/composer's restart-without-Xdebug bootstrap was never ported to main.rs, making COMPOSER_ORIGINAL_INIS-driven behavior unreachable; documented with a TODO(phase-c) and updated ini_helper_test.rs's ignore reasons (and ignored test_with_no_ini, which only passed before by coincidence with the old stub's constant output) to match.
2026-07-20fix(xdebug-handler): implement get_all_ini_files for no-PHP-runtime casensfisis
Without a PHP runtime no XdebugHandler is ever constructed, so the COMPOSER_ORIG_INIS lookup is skipped and php_ini_loaded_file() / php_ini_scanned_files() are both false; PHP would return [(string) false] = [""]. Model that directly instead of todo!(). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04fix(xdebug-handler): implement get_skipped_versionnsfisis
The restart-to-disable-xdebug mechanism isn't ported (is_xdebug_active is hardcoded false), so a restart never happens and PHP's self::$skipped stays at its default empty string. Return that directly instead of todo!(), since PlatformRepository::initialize() calls this unconditionally. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-06-14feat(php-shim): implement more shim functionsnsfisis
2026-06-14chore: add "ref" comments to file headernsfisis
2026-05-17feat(port): add stub implementations of shirabe-external-packagesnsfisis