aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-shim/src/phar.rs
AgeCommit message (Collapse)Author
2026-08-02chore(php-shim): drop the unused Phar APIs left as todo!()nsfisis
Phar::running has its only Composer call site in SelfUpdateCommand, and self-update will not go through a phar in Shirabe. The .phar writing API (and the SHA512 constant it takes) is only used by Composer's Compiler, which packages composer.phar and has no counterpart in a native binary. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01feat(php-shim): implement Phar/PharData and the zlib/bzip2 functionsnsfisis
Adopt the tar, flate2, and bzip2 crates to fill in the phar.rs and compress.rs todos: PharData tar/zip reading, building, and whole-archive compression, plus a native .phar reader that follows the php.net file-format manual and verifies hash-based signatures. Callers now propagate the constructor/extract errors PHP throws, and fwrite accepts byte strings so gzread no longer needs lossy UTF-8. The native .phar writing API stays todo!() (no call sites; Composer's Compiler is not ported) and OPENSSL phar signatures are accepted unverified (TODO(phase-c)). This unblocks Tar::getComposerJson and the tar/phar/gzip downloaders; tar_test (7), artifact_repository_test (2), and phar_archiver_test zip (1) are un-ignored. The archive command itself still panics because ArchiveManager::archive always generates glob excludes whose look-ahead regexes the regex crate cannot compile; converting those patterns to regex-compatible ones is a separate, still-undecided work item. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-27refactor: fix compiler warnings and clippy warningsnsfisis
2026-06-21refactor(php-shim): split lib.rsnsfisis