go to bug id or search bugs for
When we try to create a PHAR archive, and the directory, where we want to save it does not exist, PHAR complains about invalid file extension, instead of informing that there is a problem with accessing the requested location. This is a bit confusing.
// assume that "./dummy/" does not exist.
$phar = new Phar('./dummy/archive.phar');
Cannot create phar './dummy/archive.phar', invalid path in pharbuild.php on line 2
(or something like that)
UnexpectedValueException: Cannot create phar './dummy/archive.phar', file extension (or combination) not recognised in pharbuild.php on line 2
Add a Patch
Add a Pull Request
Automatic comment from SVN on behalf of iliaa
Log: Fixed bug #53898 (PHAR reports invalid error message, when the directory does not exist).
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.