Skip to content

Commit

Permalink
fix autoload
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jan 9, 2024
1 parent d139a24 commit bc711c2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion bin/rng.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@
use Rector\ReleaseNotesGenerator\GithubApiCaller;
use Symfony\Component\Console\Application;

require __DIR__ . '/../vendor/autoload.php';
$possibleAutoloadPaths = [
// dependency
__DIR__ . '/../../../autoload.php',
// after split package
__DIR__ . '/../vendor/autoload.php',
];

foreach ($possibleAutoloadPaths as $possibleAutoloadPath) {
if (file_exists($possibleAutoloadPath)) {
require_once $possibleAutoloadPath;
break;
}
}

$container = new Container();
$container->when(GithubApiCaller::class)
Expand Down

0 comments on commit bc711c2

Please sign in to comment.