Skip to content

Commit 88fcac1

Browse files
committed
fix: #18 - warn if the Phar class is not loaded
1 parent a6dc627 commit 88fcac1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/phar-generator-script.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@
4949
* @version $version
5050
* @license MIT
5151
*/
52+
if (! class_exists('Phar')) {
53+
echo 'You seem to be missing the Phar extension' . PHP_EOL;
54+
echo 'Please read: https://stackoverflow.com/a/8851170/5155484 to find a solution' . PHP_EOL;
55+
echo 'You can also ask for help on https://github.com/code-lts/doctum/issues if you think this is bug' . PHP_EOL;
56+
exit(1);
57+
}
5258
Phar::interceptFileFuncs();
5359
Phar::mapPhar('$pharAlias');
5460
include 'phar://' . __FILE__ . '/bin/doctum-binary.php';

0 commit comments

Comments
 (0)