feat: add rename method to rename files within archives#39
Conversation
- Adds a new method `rename(array $renameMap): string` to the `SevenZip` class. - The method wraps the `7z rn` command. - Adds comprehensive documentation in `README.md`. - Includes a test suite verifying renaming inside archives. Tests correctly ignore format `bzip2` which does not support renaming out-of-the-box. - Fixes implicit nullable type deprecations for PHP 8.4 in `Exceptions/ExecutableNotFoundException.php` and `SevenZip::addFlag`, and removes their ignores from `phpstan-baseline.neon`.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Adds a new feature to the SevenZip wrapper: the
renamemethod. This allows users to easily rename files and directories directly within an existing archive without needing to extract and re-compress it.It accomplishes this by invoking the
7z rncommand under the hood, passing along an associative array that maps original paths to the desired new paths.The code includes test cases to confirm proper behavior across multiple archive formats, skipping
bzip2since it does not support file renaming inside the archive. I've also updated theREADME.mdto keep documentation up-to-date and alphabetically sorted. Additionally, fixed a couple of implicitly nullable parameter typing issues that were causing PHPStan to fail on PHP 8.4 deprecations.PR created automatically by Jules for task 10676691213184312519 started by @insign