| Age | Commit message (Collapse) | Author |
|
The Phase B stub discarded the decoded PhpMixed and handed an empty
IndexMap to LoaderInterface::load, so nothing was actually loaded.
Unbox PhpMixed::Array into the map; mirror PHP's array $config type
juggling by raising a TypeError for non-array decode results.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
Resolve the phase-b TODO that left the supported-link-types loop as dead
code (links were always an empty Vec), so requires/conflicts/provides/
replaces/require-dev are dumped again via
PackageInterface::get_links_for_type, matching the PHP magic-call loop.
Every Link in production is constructed with a pretty constraint (all
ArrayLoader/AliasPackage/PlatformRepository/InstalledRepository sites
pass one), so make Link::pretty_constraint a required String instead of
Option<String>. get_pretty_constraint() now returns &str directly rather
than anyhow::Result<&str>, dropping the unreachable
UnexpectedValueException guard, and all call sites are updated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
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>
|
|
(create_object/configure_object/dispatch)
Make ArrayLoader::load build and return a fully configured package for both
the CompletePackage and RootPackage class strings.
- Introduce a private CompleteOrRootPackage enum to model PHP's
createObject(): CompletePackage return (RootPackage extends CompletePackage),
with accessors for the inner Package, the CompletePackageInterface view, and
conversion into a PackageInterfaceHandle.
- create_object: instantiate CompletePackage/RootPackage by class string.
- load / configure_cached_links: implement the dynamic setter dispatch
($package->{'set'.ucfirst($method)}($links)) via apply_link_setter.
- configure_object: wire all ~21 setters (Package inherent + CompletePackageInterface),
source/dist with Mirror conversion, suggest self.version replacement, release
date, and the branch-alias return (RootAliasPackage/CompleteAliasPackage).
The PHP `instanceof CompletePackage` guard in configureObject is dropped: it is
unreachable since createObject is private and returns `: CompletePackage`, an
invariant now enforced at compile time by the enum. DateTime parsing for `time`
keeps its existing approximate scaffold (noted with a TODO).
RootPackage.inner is made pub(crate) (matching CompletePackage.inner) so the
loader can reach the core Package.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
Replace todo!("VersionParser::new()") with VersionParser::new() at 6
call sites (array_loader, base_command, create_project_command,
vcs_repository, http_downloader x2) and EventDispatcher::io_clone with
self.io.clone(). All targets already exist on their types.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
chain TODOs
JsonConfigSource::manipulate_json now downcasts the validate_schema error
to JsonValidationException (matching PHP's specific catch), restores the
original contents, and surfaces e.get_errors(); other errors propagate.
ArrayLoader's two version-parse catch sites only had TODOs for preserving
the original exception as 'previous'. shirabe_semver raises generic
anyhow errors (not shim exception types), so the existing catch-all is
already faithful to PHP's catch (\UnexpectedValueException), and the flat
shim exception structs intentionally hold no previous field; the wrapped
message already carries the original cause. Remove the stale TODOs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
|
|
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
|
PHP packages have reference semantics, so introduce shared-ownership
handles over an AnyPackage enum (PackageInterfaceHandle and friends)
and replace Box<dyn PackageInterface> throughout.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Replace the dyn ConstraintInterface trait objects with an AnyConstraint
enum closing over its four implementors (Simple, Multi, MatchAll,
MatchNone), mirroring the earlier Rule enum conversion. Rename
constraint.rs to simple_constraint.rs to match the renamed Constraint
type.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Convert Pool to Rc<RefCell<Pool>> so Solver, Decisions, and
RuleSetGenerator share it, resolving the todo!() placeholders that
blocked the dependency resolver (Phase C shared ownership).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Model PHP's `Composer extends PartialComposer` as a PartialOrFullComposer
enum and merge partial_composer.rs into composer.rs. Introduce
ComposerHandle / PartialComposerHandle (plus their Weak variants) so the
graph can be shared, and build it at once with Rc::new_cyclic in the
factory to resolve the back-reference cycles.
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>
|
|
|
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|