We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db9843b commit 3ae8a4cCopy full SHA for 3ae8a4c
create-phar.php
@@ -11,14 +11,19 @@
11
}
12
13
// Create phar
14
-$p = new Phar($pharFile);
+$p = new Phar($pharFile, 0, 'monstercat-dl.phar');
15
+$p->setSignatureAlgorithm(\Phar::SHA1);
16
+$p->startBuffering();
17
18
// Creating our library using whole directory
19
$p->buildFromDirectory('src/');
20
-// Pointing main file which requires all classes
-$p->setDefaultStub('monstercat-dl.php', '/monstercat-dl.php');
21
+// Create default stub
22
+$defaultStub = $p->createDefaultStub('monstercat-dl.php');
23
+$stub = "#!/usr/bin/env php\n" . $defaultStub;
24
+$p->setStub($stub);
25
26
+$p->stopBuffering();
27
// Plus - compressing it into gzip
28
$p->compress(Phar::GZ);
29
0 commit comments