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 14c5665 commit f21e23eCopy full SHA for f21e23e
bin/php-sl.php
@@ -11,7 +11,18 @@
11
exit(1);
12
}
13
14
-require_once __DIR__ . '/../vendor/autoload.php';
+$autoloadPath = __DIR__ . '/../../../../vendor/autoload.php'; // Path for Composer-installed package as user.
15
+
16
+if (!file_exists($autoloadPath)) {
17
+ $autoloadPath = __DIR__ . '/../vendor/autoload.php'; // Path for local development.
18
+}
19
20
21
+ fwrite(STDERR, "Error: Vendor autoload file not found. Run 'composer install'.\n");
22
+ exit(1);
23
24
25
+require_once $autoloadPath;
26
27
use Yousha\PhpSecurityLinter\Linter;
28
use Yousha\PhpSecurityLinter\Exceptions\LinterException;
0 commit comments