Edit report at https://bugs.php.net/bug.php?id=55441&edit=1
ID: 55441 Updated by: ka...@php.net Reported by: frederic dot hardy at mageekbox dot net Summary: \Phar::createDefaultStub() does not handle its arguments -Status: Open +Status: Feedback Type: Bug Package: PHAR related Operating System: MacOS X 10.6.8 PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: By quickly skimming over the source it seems that in order for this function to work both parameters must have a value. Have you tried that? Previous Comments: ------------------------------------------------------------------------ [2011-08-17 13:43:16] frederic dot hardy at mageekbox dot net Description: ------------ \Phar::createDefaultStub() takes two optional arguments. With these arguments, the user can defined file in phar archive which will be used in stub. However, these arguments seems to be not used by \Phar::createDefaultStub(). Test script: --------------- <?php # In CLI, do php -d phar.readonly=0 path/to/this/script to generate my.phar. # In CLI, do php my.phar $phar = new \phar('my.phar'); $phar['stub.php'] = '<?php echo 'This is the stub !'; ?>'; $phar->createDefaultStub('stub.php'); Expected result: ---------------- This is the stub ! Actual result: -------------- PHP Warning: include(phar:///path/to/my.phar/index.php): failed to open stream: phar error: "index.php" is not a file in phar "/path/to/my.phar" in /path/to/my.phar on line 9 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55441&edit=1