| Age | Commit message (Collapse) | Author |
|
Resolve the remaining todo!()/placeholder sites in RootPackageLoader::load
so the root package loads with real data:
- Unbox config at use sites and change load()'s parameter from
IndexMap<String, Box<PhpMixed>> to IndexMap<String, PhpMixed>, matching
ArrayLoader::load / VersionGuesser::guess_version and dropping the
redundant box/unbox round-trip at the factory call site.
- Expose replace_version through CompletePackage/RootPackage inherent
delegation and a RootPackageHandle method (PHP Package::replaceVersion,
inherited), and apply it for the auto-versioned default.
- Collect require/require-dev links via getter dispatch and build the
pretty-string map feeding extractAliases/StabilityFlags/References.
Also reconcile the package repositories type with Config: change
CompletePackageInterface::{get,set}_repositories from
Vec<IndexMap<String, PhpMixed>> to IndexMap<String, PhpMixed> (PHP's
array<int|string, mixed>), wire setRepositories(config.getRepositories()),
and dump repositories verbatim as a keyed array (matching PHP ArrayDumper)
instead of forcing a list.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
Package/CompletePackage/RootPackage
Fill the trait-impl todo!() across the package accessor layer so loaded
packages are actually usable (the ArrayLoader::load path depends on it):
- Package: implement BasePackage/PackageInterface from struct fields and
existing inherent methods; Display via get_unique_name.
- CompletePackage: delegate PackageInterface to inner Package.
- RootPackage: delegate CompletePackageInterface/PackageInterface to inner
CompletePackage; RootPackageInterface link setters delegate to Package.
Correct three unfaithful trait signatures found during implementation:
- get_target_dir returns Option<String> (PHP computes a normalized value;
a borrow cannot represent it, and AliasPackage could not implement &str
across its aliasOf handle).
- RootPackageInterface link setters take IndexMap<String, Link>, matching
Package and the real ArrayLoader caller (PHP RootPackage inherits
Package::setRequires; the Link[] docblock was imprecise).
- get_full_pretty_version takes a DisplayMode enum instead of a raw i64;
the match is now exhaustive, so it returns String without an error path.
Move mirror conversion to the boundaries: PackageInterface mirror methods
use Vec<Mirror> (the typed form, matching the inherent methods), with
array<->Mirror conversion done by the producer (ComposerRepository) and
consumer (ArrayDumper).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
|
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
|
|
|
|
|