| Age | Commit message (Collapse) | Author |
|
getFileContent catch type
Remove 17 TODO(phase-b) markers across exception-modeling sites where the
existing single-Result closure+match already faithfully models the PHP
try/catch (catch paths only rethrow, retry, log, or silently ignore and
never yield a recoverable value, so a double Result is unnecessary).
Fix SvnDriver::get_file_content to catch only RuntimeException (matching
PHP's catch RuntimeException) and extract its .message instead of calling
e.to_string() on the anyhow::Error, which would panic while the shim
exception Display is unimplemented; other errors now propagate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
handle/as_any
Resolve three category-4 TODO(phase-b) placeholders that were short-circuited
to None/true, by routing them through downcast mechanisms that already exist:
- package_sorter: PackageInterfaceHandle::as_root() for the
instanceof RootPackageInterface check that adds dev-requires
- platform_repository::is_complete_package: as_complete().is_some(),
consistent with the inlined check already in add_package
- create_project_command: PlatformRequirementFilterInterface::as_any()
downcast to IgnoreAllPlatformRequirementFilter
No new trait infrastructure introduced.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
Resolve the PHP try/catch instanceof checks that select on exception type:
TransportException-only catches in RepositorySet, SvnDriver and JsonFile;
the RuntimeException/IrrecoverableDownloadException handleError closure and
the RuntimeException update-retry catch in DownloadManager. Each uses
anyhow::Error::downcast_ref and reads the exception's message field directly
(Display is todo\!() on the shim exceptions). PHPUnit\Framework\Exception
checks in VcsDownloader are documented as intentionally always-false since
the test framework is out of scope.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
Implement the security advisory pool filter end to end, plus the
remaining actionable wirings it unblocked.
- Unify the PartialSecurityAdvisory|SecurityAdvisory union as the
PartialOrFullSecurityAdvisory enum and make the advisory types Clone,
so advisories can be collected and stored; Pool.security_removed_versions
now carries the union. This also unblocks PoolOptimizer's clone of the
security-removed versions.
- Thread the filter result through run_security_advisory_filter/build_pool
as anyhow::Result.
- Introduce typed PlatformRepositoryHandle and pass platform repos as
handles through determine_requirements instead of &PlatformRepository.
- Wire RuleSetGenerator's is_unacceptable_fixed_or_locked_package check
and UpdateCommand's non-locked installed-packages branch.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
Share LockArrayRepository via Rc<RefCell<_>> while preserving the PHP
?LockArrayRepository type strength: Request.locked_repository, Locker
::get_locked_repository, and the installer create_* helpers now thread
the typed handle instead of an owned LockArrayRepository, and pool
builder identity check becomes a strict ptr_eq via widening into
RepositoryInterfaceHandle.
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 Opus 4.7 (1M context) <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>
|
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Mechanically convert promise-returning function bodies to async/await:
resolve() returns the value directly, forwarding calls get .await, and
simple .then chains become await sequences. Also collapse the installer
double-Option (Result<Option<Option<PhpMixed>>> -> Result<Option<PhpMixed>>).
Hard spots that depend on the Loop::wait / job-machine boundary
(accept/reject orchestration, closures capturing &mut self, batch waits)
are left intact and marked with TODO(phase-c-promise) for manual porting.
The crate does not compile yet; traits still need #[async_trait].
Co-Authored-By: Claude Opus 4.7 <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>
|
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
|
|
|
|
|
|
Implement BaseCommand trait and other abstract class traits across
all command, downloader, io, package, and VCS driver types. Also
fix trait method signatures for composer_mut and io_mut to return
mutable references to Option rather than Option of mutable references.
|
|
PHP abstract classes are represented as traits to better align with
Rust's type system.
|
|
|
|
Co-Authored-By: Claude Sonnet 4.6 <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>
|
|
|
|
VersionSelector.php
|
|
PathRepository.php, StreamContextFactory.php
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
|
|
|
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
|