Bug #71317 [Com]: PharData fails to open specific file
| From: | doktor1360 at gmail dot com | Date: | Fri, 12 Feb 2016 19:41:22 +0000 |
| Subject: | Bug #71317 [Com]: PharData fails to open specific file | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-199180@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71317&edit=1
ID: 71317
Comment by: doktor1360 at gmail dot com
Reported by: weirdan at gmail dot com
Summary: PharData fails to open specific file
Status: Open
Type: Bug
Package: PHAR related
Operating System: Debian/sid
PHP Version: 7.0.2
Block user comment: N
Private report: N
New Comment:
Same problem with php 7.0.2 on CentOS 7.2.1511 - ius-community (build php70u)
Previous Comments:
------------------------------------------------------------------------
[2016-02-10 21:13:54] fb at felix-blanke dot de
Same problem with php 7.0.3 on Gentoo. Composer isn't going anywhere because of this.
------------------------------------------------------------------------
[2016-01-28 16:00:28] zk at imc-web dot de
I have the same issue using arch Linux, so this is not only a Debian issue.
PHP 7 is default in arch linux now, so composer is broken on it.
------------------------------------------------------------------------
[2016-01-28 05:15:47] smcjones at gmail dot com
I would add that I did not have this issue when I downloaded PHP 7.0. I did not test PHP 7.0.1, but
I believe that the original PHP7 codebase did not contain this error.
------------------------------------------------------------------------
[2016-01-14 00:31:28] chris dot kingslynne at gmail dot com
I noticed this issue and posted about it here:
https://stackoverflow.com/questions/34667830/does-using-composer-to-install-pear-packages-work-in-php-7
This appears to critically affect the ability to use Composer under PHP 7 :(
Chris
------------------------------------------------------------------------
[2016-01-09 00:25:34] weirdan at gmail dot com
Description:
------------
There's a tar file that PharData fails to open: http://download.pear.php.net/package/Structures_Graph-1.1.1.tgz
(either gzipped or ungzipped).
It works with php 5.3 (vanilla), 5.6 (debian build), but fails starting with php 7.0.{0,1,2} (all
vanilla versions from php.net)
If I repack the archive (unpack and pack it back with tar cvf) it works fine. At first I thought the
cause of the problem was that the archive did not include directories, but other similar archive
(also without folder entries) http://download.pear.php.net/package/Console_CommandLine-1.2.1.tgz
opens just fine.
Test script:
---------------
#!/bin/bash
for ver in 5.3.29 system 7.0.0 7.0.1 7.0.2; do
phpenv local $ver
php -r 'echo phpversion() . "\n"; new
\PharData("bad/Structures_Graph-1.1.1.tar");'
done
Expected result:
----------------
5.3.29
5.6.16-4
7.0.0
7.0.1
7.0.2
Actual result:
--------------
5.3.29
5.6.16-4
7.0.0
PHP Fatal error: Uncaught UnexpectedValueException: phar error: tar-based phar
"Structures_Graph-1.1.1/tests/BasicGraphTest.php" cannot be registered in Command line
code:1
Stack trace:
#0 Command line code(1): PharData->__construct('bad/Structures_...')
#1 {main}
thrown in Command line code on line 1
7.0.1
PHP Fatal error: Uncaught UnexpectedValueException: phar error: tar-based phar
"Structures_Graph-1.1.1/tests/BasicGraphTest.php" cannot be registered in Command line
code:1
Stack trace:
#0 Command line code(1): PharData->__construct('bad/Structures_...')
#1 {main}
thrown in Command line code on line 1
7.0.2
PHP Fatal error: Uncaught UnexpectedValueException: phar error: tar-based phar
"Structures_Graph-1.1.1/tests/BasicGraphTest.php" cannot be registered in Command line
code:1
Stack trace:
#0 Command line code(1): PharData->__construct('bad/Structures_...')
#1 {main}
thrown in Command line code on line 1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71317&edit=1