[PR][php-src][#297][master] - Fixed issue #60953
| From: | noreply@php.net | Date: | Tue, 17 Mar 2015 14:51:29 +0000 |
| Subject: | [PR][php-src][#297][master] - Fixed issue #60953 | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-2763@lists.php.net to get a copy of this message | ||
You can view the Pull Request on github:
https://github.com/php/php-src/pull/297
Pull Request Description:
Altered phar_rename_archive() such that it will look for well known file extensions to strip off
when attempting to rename. Not BC safe with regards to PHP-5x.
https://bugs.php.net/bug.php?id=60953
A large part of the motivation here is to allow dotted versions in the name of a phar, and expect
the convert*() functions to do minimal processing on the file name, and allow those dotted version
names to persist as they should be.
This allows the following to be possible:
```php
$phar = new Phar(__DIR__ . '/package-1.2.3.phar');
$phar['hello.txt'] = 'Hello World';
$phar->stopBuffering();
unset($phar);
$phar = new Phar(__DIR__ . '/package-1.2.3.phar');
$phar->convertToExecutable(Phar::TAR, Phar::GZ);
var_dump(file_exists(__DIR__ . '/package-1.2.3.phar'));
var_dump(file_exists(__DIR__ . '/package-1.2.3.phar.tar.gz'));
```