Bug #76584 [NEW]: PharFileInfo::decompress not working
| From: | thenewherobrinex at gmail dot com | Date: | Thu, 05 Jul 2018 21:21:10 +0000 |
| Subject: | Bug #76584 [NEW]: PharFileInfo::decompress not working | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-216162@lists.php.net to get a copy of this message | ||
From: thenewherobrinex at gmail dot com
Operating system: Mac/Linux
PHP version: 7.2.7
Package: PHAR related
Bug Type: Bug
Bug description:PharFileInfo::decompress not working
Description:
------------
PharFileInfo::decompress marks the file in the phar as not compressed
but when you extract the file from the phar it will be compressed.
Test script:
---------------
<?php
file_put_contents("test.txt", "This is a test file.");
$phar = new Phar("test.phar");
$phar->addFile("test.txt");
$file = $phar["test.txt"];
var_dump($file->compress(Phar::GZ)); //true (success)
var_dump($file->isCompressed()); //true (the file is compressed)
var_dump($file->decompress()); //true (success)
var_dump($file->isCompressed()); //false (the file should not be
compressed anymore)
var_dump($phar->extractTo("test")); //true (success but the extracted
file in the folder is compressed)
--
Edit bug report at https://bugs.php.net/bug.php?id=76584&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76584&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76584&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76584&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76584&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76584&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76584&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76584&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76584&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76584&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76584&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76584&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76584&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76584&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76584&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76584&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76584&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76584&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76584&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76584&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76584&r=mysqlcfg