aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-06 14:29:50 +0900
committernsfisis <nsfisis@gmail.com>2026-06-06 14:29:50 +0900
commite89e1785e3df047a869c48b91709289a3b145b49 (patch)
treee7ae86b6657821cf32bd1c4244d1c374af1ce911 /crates/shirabe-external-packages
parent558c22c072d7e7e77e0e5e3493a71727301f7c73 (diff)
downloadphp-shirabe-e89e1785e3df047a869c48b91709289a3b145b49.tar.gz
php-shirabe-e89e1785e3df047a869c48b91709289a3b145b49.tar.zst
php-shirabe-e89e1785e3df047a869c48b91709289a3b145b49.zip
refactor(archiver): yield PathBuf from ArchivableFilesFinder, drop SplFileInfo
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>
Diffstat (limited to 'crates/shirabe-external-packages')
-rw-r--r--crates/shirabe-external-packages/src/symfony/component/finder/finder.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/component/finder/finder.rs b/crates/shirabe-external-packages/src/symfony/component/finder/finder.rs
index 9d1e9e6..9e84e26 100644
--- a/crates/shirabe-external-packages/src/symfony/component/finder/finder.rs
+++ b/crates/shirabe-external-packages/src/symfony/component/finder/finder.rs
@@ -44,7 +44,7 @@ impl Finder {
todo!()
}
- pub fn filter(&mut self, _closure: Box<dyn FnMut(&SplFileInfo) -> bool>) -> &mut Self {
+ pub fn filter(&mut self, _closure: Box<dyn FnMut(&std::path::Path) -> bool>) -> &mut Self {
todo!()
}