We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14da745 commit 44f0b51Copy full SHA for 44f0b51
res/sqlite-worker.php
@@ -6,7 +6,13 @@
6
use Clue\React\NDJson\Decoder;
7
use Clue\React\NDJson\Encoder;
8
9
-require __DIR__ . '/../vendor/autoload.php';
+if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
10
+ // local project development, go from /res to /vendor
11
+ require __DIR__ . '/../vendor/autoload.php';
12
+} else {
13
+ // project installed as dependency, go upwards from /vendor/clue/reactphp-sqlite/res
14
+ require __DIR__ . '/../../../autoload.php';
15
+}
16
17
$loop = Factory::create();
18
$in = new Decoder(new ReadableResourceStream(\STDIN, $loop));
0 commit comments