Skip to content

Commit 358d6af

Browse files
authored
Dynamic autoload for executable script (#82)
1 parent 3276afb commit 358d6af

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/php-converter

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
declare(strict_types=1);
55

6-
require_once __DIR__ . '/../vendor/autoload.php';
6+
// https://getcomposer.org/doc/articles/vendor-binaries.md#finding-the-composer-autoloader-from-a-binary
7+
include $_composer_autoload_path ?? __DIR__ . '/../vendor/autoload.php';
78

89
use Riverwaysoft\PhpConverter\Cli\ConvertCommand;
910
use Symfony\Component\Console\Application;

0 commit comments

Comments
 (0)