Allow renaming of shpub.phar to shpub
authorChristian Weiske <weiske@mogic.com>
Mon, 28 Aug 2017 10:32:31 +0000 (12:32 +0200)
committerChristian Weiske <weiske@mogic.com>
Mon, 28 Aug 2017 10:32:31 +0000 (12:32 +0200)
Resolves: https://github.com/cweiske/shpub/issues/7
Solution: https://cweiske.de/tagebuch/phar-renaming-no-ext.htm

src/phar-stub.php

index 653c0d0b0ad31bee0d5a4cd7aa1913a48ac56864..5ffe5c7adb9aa636aa8f9d94cff02d2040525cf1 100644 (file)
@@ -15,7 +15,7 @@ if (!in_array('phar', stream_get_wrappers()) || !class_exists('Phar', false)) {
     exit(255);
 }
 
     exit(255);
 }
 
-//Phar::interceptFileFuncs();
+Phar::mapPhar('shpub.phar');
 set_include_path(
     'phar://' . __FILE__
     . PATH_SEPARATOR . 'phar://' . __FILE__ . '/lib/'
 set_include_path(
     'phar://' . __FILE__
     . PATH_SEPARATOR . 'phar://' . __FILE__ . '/lib/'