Skip to content

Commit

Permalink
Merge pull request #44 from robinvdvleuten/autoload-path
Browse files Browse the repository at this point in the history
Resolve autoload file when included as dependency
  • Loading branch information
jenssegers authored Jan 22, 2019
2 parents d243505 + 11f3ebc commit 83e1a65
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/optimus
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/usr/bin/env php
<?php

require __DIR__ . '/../vendor/autoload.php';
foreach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../vendor/autoload.php'] as $file) {
if (file_exists($file)) {
require_once $file;
break;
}
}

use Jenssegers\Optimus\Commands\SparkCommand;
use Symfony\Component\Console\Application;
Expand Down

0 comments on commit 83e1a65

Please sign in to comment.