aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates
AgeCommit message (Collapse)Author
44 hoursfeat(downloader): wire as_* downcasts for file/archive/path/git downloadersnsfisis
Override DownloaderInterface's as_change_report_interface / as_vcs_capable_downloader_interface / as_dvcs_downloader_interface so PHP-style instanceof checks resolve to the concrete sub-interface: FileDownloader and the six archive downloaders (Zip/Tar/Gzip/Xz/Rar/Phar) plus PathDownloader gain ChangeReportInterface (archives/path delegate to the inner FileDownloader), PathDownloader exposes VcsCapableDownloaderInterface, and GitDownloader exposes DvcsDownloaderInterface. The default None impls remain correct for downloaders that do not implement a given sub-interface, so their stale TODO markers are dropped. VCS downloaders' ChangeReport/VcsCapable conformance follows separately. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
45 hoursfix(config,loader): wire JsonValidationException catch; drop unportable ↵nsfisis
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>
46 hoursrefactor(downloader,repository,json): drop stale try/catch TODOs; fix svn ↵nsfisis
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>
47 hoursfeat(php-shim): align fwrite/touch2/PHP_OS_FAMILY/PHP_URL_SCHEME with PHPnsfisis
Adjust fwrite to return int|false equivalent (Option<i64>), add touch2 with mtime, implement PHP_OS_FAMILY via std::env::consts::OS, and swap the PHP_URL_HOST placeholders for the now-available PHP_URL_SCHEME. Wire these into locker, filesystem, platform, and remote_filesystem. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 daysfeat(downcast): wire package/repo/filter instanceof checks via existing ↵nsfisis
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>
3 daysfeat(downloader,repository): wire exception instanceof downcasts via anyhownsfisis
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>
3 daysfeat(installer): wire OperationInterface instanceof downcasts in batchesnsfisis
Resolve the UpdateOperation/InstallOperation batch-splitting checks and the markAliasInstalled/markAliasUninstalled dispatch in InstallationManager using the existing as_update_operation/as_install_operation accessors and as_any downcasts to the MarkAlias operation types. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 daysfeat(io): add as_any downcast shims for IOInterface and OutputInterfacensfisis
Introduce the cross-cutting downcast base for PHP `instanceof` checks on io/output trait objects: `IOInterface::as_any` (ConsoleIO/NullIO/BufferIO) and `OutputInterface::as_console_output_interface` (promoting ConsoleOutput to a proper ConsoleOutputInterface). Wire the resolved downcasts in ConsoleIO error output, Auditor table format, and the event dispatcher. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 daysfeat(resolver): port SecurityAdvisoryPoolFilter::filternsfisis
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>
5 daysfix(package): port every PHP clone operator to handle dup()nsfisis
5 daysfeat(resolver): construct alias packages from handles in pool/installernsfisis
5 daysfeat(installer): downcast UpdateOperation in download/execute batchesnsfisis
5 daysfeat(resolver): wire url/mirror setters in update_mirror_and_urlsnsfisis
8 daysrefactor(repository): introduce typed LockArrayRepositoryHandlensfisis
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>
8 daysrefactor(io): unify IOInterface params to Rc<RefCell<dyn _>>nsfisis
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8 daysfeat: resolve TODOs unblocked by package handle get_repositorynsfisis
PackageInterfaceHandle::get_repository and handle upcasts have been available since the recent Rc<RefCell<_>> handle refactors; wire them at sites still carrying TODO(phase-c) markers. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8 daysrefactor(repository): introduce Rc<RefCell<_>> handles for repositoriesnsfisis
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 daysrefactor(package): pass package handles by value throughoutnsfisis
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 daysfeat(factory): construct PluginManager after Rc::new_cyclicnsfisis
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 daysrefactor(io): share IOInterface via Rc<RefCell<dyn _>> handlensfisis
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
12 daysrefactor(package): introduce Rc<RefCell<_>> handles for packagesnsfisis
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>
13 daysrefactor(semver): change ConstraintInterface to a closed enumnsfisis
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>
13 daysrefactor(resolver): change Rule to a closed enumnsfisis
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
13 daysrefactor(promise): drop \React\Promisensfisis
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13 daysrefactor(promise): rewrite promise bodies to async/awaitnsfisis
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>
13 daysfeat(deps): add tokio, async-traitnsfisis
13 daysrefactor(promise): change functions returning PromiseInterface to async fnnsfisis
2026-05-22refactor: share Pool via Rc<RefCell>nsfisis
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>
2026-05-22refactor(php-shim): remove unnecessary methodsnsfisis
2026-05-22refactor(composer): unify Composer/PartialComposer via Rc handlesnsfisis
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>
2026-05-20refactor: re-export module items to shorten import pathsnsfisis
2026-05-20chore: allow unused codensfisis
2026-05-20fix(compile): fix all remaining compile errorsnsfisis
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19fix(compile): fix more random compile errorsnsfisis
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19fix(compile): fix various compile errorsnsfisis
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18fix(compile): extract static methods from BasePackage traitnsfisis
2026-05-18fix(compile): impl std::error::Error for custom error typesnsfisis
2026-05-17fix(compile): use std::sync::LazyLock for global cachensfisis
2026-05-17fix(compile): convert Command struct to traitnsfisis
Symfony Command was a struct but used as dyn Trait (Box<dyn Command>) in console/application.rs. Convert it to a trait with CommandBase as the concrete stub, and add impl Command for all Composer commands.
2026-05-17fix(compile): make Rule trait dyn-compatible by extracting RuleBasensfisis
Removed the static fn new() from the Rule trait (which prevented dyn compatibility) and moved it into a new RuleBase struct.
2026-05-17fix(compile): extract constants from traits to make them dyn-compatiblensfisis
2026-05-17fix(compile): add missing PackageInterface and RepositoryInterface implsnsfisis
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17fix(compile): remove to_string from impl Rule blocks (E0407)nsfisis
2026-05-17fix(compile): add dyn keyword to all trait object usages (E0782)nsfisis
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17fix(compile): fix IOInterface method signature mismatchesnsfisis
- Change write/write_error/write_raw/write_error_raw/overwrite/ overwrite_error/ask/ask_confirmation/ask_and_validate/ ask_and_hide_answer/select to &mut self in trait and NullIO - Change ask-family question params from PhpMixed to String in ConsoleIO, converting to PhpMixed::String internally - Change ConsoleIO::select choices param from PhpMixed to Vec<String> - Fix NullIO::load_configuration to use &mut Config and return Result
2026-05-17fix(compile): align ChangeReportInterface::get_local_changes return typensfisis
2026-05-17fix(compile): add stubs for missing trait implementationsnsfisis
2026-05-17fix(compile): add Display impls and fix trait signaturesnsfisis
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17fix(compile): add missing use declarations for Command, Composer, ↵nsfisis
IOInterface, etc.
2026-05-17fix(compile): correct module pathsnsfisis