Skip to content

Commit 10cfa5b

Browse files
Merge pull request #95 from barbushin/patch-1
Fix Composer autoload path in examples
2 parents 5311a4b + ffd1c45 commit 10cfa5b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/common.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99
ini_set('log_errors', 0);
1010
ini_set('html_errors', 0);
1111

12-
require_once __DIR__ . '/../vendor/autoload.php';
12+
foreach(array(__DIR__ . '/../vendor', __DIR__ . '/../../../../vendor') as $vendorDir) {
13+
if(is_dir($vendorDir)) {
14+
require_once $vendorDir . '/autoload.php';
15+
break;
16+
}
17+
}
1318

1419
function test_notify(cli\Notify $notify, $cycle = 1000000, $sleep = null) {
1520
for ($i = 0; $i <= $cycle; $i++) {

0 commit comments

Comments
 (0)