From:             
Operating system: MacOS X 10.6.8
PHP version:      5.3.6
Package:          PHAR related
Bug Type:         Bug
Bug description:\Phar::createDefaultStub() does not handle its arguments

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 bug report at https://bugs.php.net/bug.php?id=55441&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=55441&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=55441&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=55441&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=55441&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55441&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=55441&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=55441&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=55441&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=55441&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=55441&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=55441&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=55441&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=55441&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=55441&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=55441&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55441&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=55441&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=55441&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=55441&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=55441&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=55441&r=mysqlcfg

Reply via email to