aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/package/archiver
AgeCommit message (Collapse)Author
2026-07-02chore(lint): ban std::io::Read/Write, Any, Command use importsnsfisis
Extends no_banned_use to cover std::any::Any, std::io::Read/Write, and std::process::Command, and teaches the linter to allow `as _` imports so trait methods can still be brought into scope without binding the banned name. Fully qualifies all existing usages across the codebase.
2026-06-28refactor: add linternsfisis
2026-06-27refactor(composer): hold managers behind *Interface traitsnsfisis
Composer/PartialComposer exposed its RepositoryManager, InstallationManager, EventDispatcher, Locker, DownloadManager, AutoloadGenerator and ArchiveManager as concrete types, but Composer's public setters (setDownloadManager() etc.) let plugins swap in subclasses. Introduce a *Interface trait per manager and store each as Rc<RefCell<dyn ...Interface>> so a replacement is honored. Only Composer's slots and the sinks fed from its accessors become trait objects; managers injected concretely at construction keep their concrete references, matching PHP semantics. Fluent setters on the affected classes now return () and Locker::update_hash is de-generified to a boxed FnOnce so the traits stay object-safe. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27refactor: fix compiler warnings and clippy warningsnsfisis
2026-06-26feat(http): reimplement CurlDownloader on reqwest; port 15 more testsnsfisis
Replace the libcurl-shim CurlDownloader with a reqwest+tokio implementation per the .ken sketch, resolving the construction panic that blocked command tests (mock path via __new_mock is untouched). Port remote_filesystem (7), hg/svn driver (4), zip_archiver/git_exclude_filter (4) tests. Fix hg/svn/git_exclude regex-delimiter and svn result-propagation porting bugs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24test: port more unimplemented testsnsfisis
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20fix(path): propagate PathBufnsfisis
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20refactor: auto-fix clippy warningsnsfisis
2026-06-14fix(archiver): resolve infinite recursion in exclude filter dispatchnsfisis
The Phase B port invented an ArchivableFilesFilter trait whose filter impls called self.filter, recursing forever; the name also collided with the real ArchivableFilesFilter FilterIterator class. Composer has no such interface: the finder holds GitExcludeFilter/ComposerExcludeFilter (both extending BaseExcludeFilter) and calls $filter->filter(). Drop the invented trait, type the filters as Box<dyn BaseExcludeFilter>, and implement BaseExcludeFilter on the concrete filters (accessors delegating to inner). Remove the unused generic default methods from the trait so it is dyn-compatible; they remain as inherent methods on BaseExcludeFilterBase, which is where every caller already reaches them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14refactor(pcre): drop Result from Preg method return typesnsfisis
The Preg methods panic on PCRE failure (per the file header rationale), so their anyhow::Result wrappers never carried an Err. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08refactor(external-packages): drop component segment from symfony pathsnsfisis
Align the Symfony namespace mapping with the documented convention (symfony::component::X -> symfony::X) and remove now-unused console stub files. Update all import paths across the workspace. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06refactor(archiver): yield PathBuf from ArchivableFilesFinder, drop SplFileInfonsfisis
Migrate ArchivableFilesFinder off Symfony's SplFileInfo onto Path/PathBuf, resolving the phar_archiver TODO(phase-b) that required a .map() adapter to bridge SplFileInfo -> PathBuf. - ArchivableFilesFinder now yields PathBuf; accept() takes &Path; the exclude closure receives &Path and uses Path::canonicalize / is_symlink. The SplFileInfo -> PathBuf conversion happens once at the symfony get_iterator boundary (get_iterator stays SplFileInfo for cache.rs). - symfony Finder::filter callback changed to FnMut(&Path) (sole caller is the finder). - PharArchiver passes the finder straight into ArchivableFilesFilter, mirroring PHP's new ArchivableFilesFilter($files). - ZipArchiver consumes PathBuf items, computing the relative path via strip_prefix(sources) in place of SplFileInfo::getRelativePathname. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06feat(archivable-files-finder): wire exclude closure into Finder::filternsfisis
Add a Finder::filter(Box<dyn FnMut(&SplFileInfo) -> bool>) stub method and route the exclude closure through it, matching PHP's ->in()->filter() chain. FnMut faithfully represents PHP's stateful \Closure. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-27refactor(package): pass package handles by value throughoutnsfisis
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23refactor(promise): drop \React\Promisensfisis
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-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-17fix(compile): implement abstract class traits across all typesnsfisis
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.
2026-05-17refactor(shirabe): convert PHP abstract classes to Rust traitsnsfisis
PHP abstract classes are represented as traits to better align with Rust's type system.
2026-05-17chore(style): cargo fmtnsfisis
2026-05-16feat(port): port ZipDownloader.phpnsfisis
2026-05-16feat(port): port ArchiveManager.phpnsfisis
2026-05-16feat(port): port BaseExcludeFilter.phpnsfisis
2026-05-16feat(port): port PharArchiver.phpnsfisis
2026-05-15feat(port): port ZipArchiver.phpnsfisis
2026-05-15feat(port): port ArchivableFilesFinder.phpnsfisis
2026-05-12feat(port): port GitExcludeFilter.phpnsfisis
2026-05-12feat(port): port ArchivableFilesFilter.phpnsfisis
2026-05-12feat(port): port ArchiverInterface.phpnsfisis
2026-05-12feat(port): port ComposerExcludeFilter.phpnsfisis
2026-05-12feat(init): add scaffold filesnsfisis