Skip to content

Commit

Permalink
make use project auotload ialway loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jul 19, 2023
1 parent 1909c7d commit 57ff79a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions bin/class-leak.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
use TomasVotruba\ClassLeak\Console\ClassLeakApplication;
use TomasVotruba\ClassLeak\DependencyInjection\ContainerFactory;

if (file_exists(__DIR__ . '/../../../../vendor/autoload.php')) {
// project's autoload
require_once __DIR__ . '/../../../../vendor/autoload.php';
}

if (file_exists(__DIR__ . '/../vendor/scoper-autoload.php')) {
// A. build downgraded package
require_once __DIR__ . '/../vendor/scoper-autoload.php';
} elseif (file_exists(__DIR__ . '/../../../../vendor/autoload.php')) {
// B. dev package
require_once __DIR__ . '/../../../../vendor/autoload.php';
require_once __DIR__ . '/../vendor/scoper-autoload.php';
} else {
// C. local repository
// B. local repository
require_once __DIR__ . '/../vendor/autoload.php';
}


$containerFactory = new ContainerFactory();
$container = $containerFactory->create();

Expand Down

0 comments on commit 57ff79a

Please sign in to comment.