aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/audit_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-24 20:23:01 +0900
committernsfisis <nsfisis@gmail.com>2026-07-24 20:23:01 +0900
commit93733a249437e63774ac1989e0544b2d422e13b3 (patch)
treec89f1121d291f5e60727c9bf0bee195933e0bc88 /crates/shirabe/src/command/audit_command.rs
parent8c316f2c5e93888f4b3a5b8c18df3373b54fa816 (diff)
downloadphp-shirabe-93733a249437e63774ac1989e0544b2d422e13b3.tar.gz
php-shirabe-93733a249437e63774ac1989e0544b2d422e13b3.tar.zst
php-shirabe-93733a249437e63774ac1989e0544b2d422e13b3.zip
fix(pool-builder): use plain getPackages() on locked repository
PoolBuilder::build_pool() and warn_about_non_matching_update_allow_list() called get_canonical_packages() on the locked repository during a partial update, but PHP's PoolBuilder uses the plain getPackages(). get_canonical_packages() unwraps AliasPackage down to its base package, discarding the alias's own version identity. Locker::get_locked_repository() wraps a lock entry with extra.branch-alias in a single CompleteAliasPackage rather than adding a separate base object, so canonicalizing it silently dropped the locked branch-alias version (e.g. 2.2.x-dev), leaving only the raw dev-master version behind. For a package excluded from the partial update's allow-list, that meant its locked branch-alias version could no longer satisfy the root's constraint, producing a spurious solver conflict instead of keeping the package pinned exactly as locked. Fixed the same bug in AuditCommand's --locked package listing, which had the identical get_canonical_packages()/getPackages() mismatch against AuditCommand.php.
Diffstat (limited to 'crates/shirabe/src/command/audit_command.rs')
-rw-r--r--crates/shirabe/src/command/audit_command.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/shirabe/src/command/audit_command.rs b/crates/shirabe/src/command/audit_command.rs
index fb56169e..c797eef1 100644
--- a/crates/shirabe/src/command/audit_command.rs
+++ b/crates/shirabe/src/command/audit_command.rs
@@ -8,7 +8,6 @@ use crate::command::base_command::base_command_initialize;
use crate::composer::PartialComposerHandle;
use crate::console::input::InputOption;
use crate::io::IOInterfaceImmutable;
-use crate::repository::CanonicalPackagesTrait;
use crate::repository::InstalledRepository;
use crate::repository::RepositoryInterface;
use crate::repository::RepositorySet;
@@ -265,7 +264,7 @@ impl AuditCommand {
.as_bool()
.unwrap_or(false),
)?;
- return locked_repo.borrow_mut().get_canonical_packages();
+ return locked_repo.borrow_mut().get_packages();
}
let root_pkg = composer.get_package();