Doc #55143 [Opn->Csd]: Missing documentation for Phar::mount()

From: Date: Sun, 04 Dec 2011 23:23:13 +0000
Subject: Doc #55143 [Opn->Csd]: Missing documentation for Phar::mount()
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7572@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55143&edit=1 ID: 55143 Updated by: frozenfire@php.net Reported by: staff at pro-unreal dot de Summary: Missing documentation for Phar::mount() -Status: Open +Status: Closed Type: Documentation Problem Package: PHAR related Operating System: Ubuntu Linux PHP Version: 5.3.6 -Assigned To: +Assigned To: frozenfire Block user comment: N Private report: N New Comment: 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 http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2011-12-04 23:22:59] frozenfire@php.net Automatic comment from SVN on behalf of frozenfire Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=320391 Log: Changed pharpath parameter to indicate that the path must be relative, and must not already exist. Updated example to reflect that. Closes bug #55143. ------------------------------------------------------------------------ [2011-07-06 01:44:23] staff at pro-unreal dot de Description: ------------ Hi, on the manual page for Phar::mount some information is missing that may confuse users when using this method. 1. Unlike unix mount it is not possible to mount an external location to an existing path inside the phar. $pharpath must not exist or mount will fail. 2. When calling from inside a phar it not only may be a relative path, it MUST be a relative path or mount will fail. Mounting to foreign pahr locations inside a phar is not possible. --- From manual page: http://www.php.net/phar.mount%23Description --- Test script: --------------- <?php $phar = new Phar('file.phar'); $phar->startBuffering(); $phar->addStub('<?php require_once "phar://file.phar/index.php"; __HALT_COMPILER();'); $phar->addEmptyDir('foo'); $phar->addFromString('index.php', '<?php // This will Fail! Phar::mount("foo", "/etc/foo"); // This Will also fail: Phar::mount('phar:///home/www/some.other.phar/bar', '/tmp/info'); '); $phar->stopBuffering(); Expected result: ---------------- As documented I expected both mounts to work, but they don't Actual result: -------------- Code is throwing PharException ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55143&edit=1

« previous php.doc.bugs (#7572) next »