| Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
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>
|
|
|
|
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>
|
|
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|