From fe0352e2db35ed559506c2b477708180768000e8 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 19 Jul 2026 18:47:48 +0900 Subject: fix(show-command): un-ignore 10 tests by fixing show-warnings typing and repo bugs Replace the PhpMixed-based `$showWarnings` hack in VersionSelector:: findBestCandidate with a typed ShowWarnings enum (Always / Predicate), letting ShowCommand::findLatestPackage pass its real closure instead of hardcoding `true`. Fix the --no-dev branch in ShowCommand::execute, which built `repos` from an empty package list instead of sharing the same InstalledRepository as `installed_repo`. Pass repository handles instead of pre-borrowed `&dyn RepositoryInterface` refs into get_package/ generate_package_tree/add_tree to stop a RefCell double-borrow panic on --all/--locked. Add the missing CompletePackage/RootPackage set_release_date setter so the outdated sorting-by-age test can set fixture dates. Resolve OutputFormatterStyleStack::pop's empty-style todo!() via clone_box(), and fix FileDownloader's cache-GC log call to pass the VERY_VERBOSE verbosity PHP uses. Co-Authored-By: Claude Sonnet 5 --- crates/shirabe/src/command/create_project_command.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/shirabe/src/command/create_project_command.rs') diff --git a/crates/shirabe/src/command/create_project_command.rs b/crates/shirabe/src/command/create_project_command.rs index 9a2c4755..8ea4f07f 100644 --- a/crates/shirabe/src/command/create_project_command.rs +++ b/crates/shirabe/src/command/create_project_command.rs @@ -21,6 +21,7 @@ use crate::io::IOInterfaceImmutable; use crate::json::JsonFile; use crate::package::version::VersionParser; use crate::package::version::VersionSelector; +use crate::package::version::version_selector::ShowWarnings; use crate::package::{STABILITIES, SUPPORTED_LINK_TYPES}; use crate::plugin::PluginBlockedException; use crate::repository::CompositeRepository; @@ -895,7 +896,7 @@ impl CreateProjectCommand { Some(platform_requirement_filter.clone()), 0, Some(io.clone()), - PhpMixed::Bool(true), + ShowWarnings::Always, )?; if package.is_none() { @@ -921,7 +922,7 @@ impl CreateProjectCommand { Some(PlatformRequirementFilterFactory::ignore_all()), 0, None, - PhpMixed::Bool(true), + ShowWarnings::Always, )? .is_some() { -- cgit v1.3.1