diff options
-rwxr-xr-x | bin/phpiac | 10 | ||||
-rw-r--r-- | src/IAC.php | 3 |
2 files changed, 8 insertions, 5 deletions
@@ -1,6 +1,12 @@ #!/usr/bin/env php <?php -require dirname(__DIR__) . '/vendor/autoload.php'; +$autoloadAsProjectPath = dirname(__DIR__) . '/vendor/autoload.php'; +$autoloadAsDependencyPath = dirname(__DIR__) . '/../../autoload.php'; +if (file_exists($autoloadAsProjectPath)) { + require $autoloadAsProjectPath; +} else { + require $autoloadAsDependencyPath; +} -\PHPIAC\IAC::getInstance(); +new \PHPIAC\IAC(); diff --git a/src/IAC.php b/src/IAC.php index c4e476d..59df281 100644 --- a/src/IAC.php +++ b/src/IAC.php @@ -2,14 +2,11 @@ namespace PHPIAC; -use PetrKnap\Php\Singleton\SingletonTrait; use PHPIAC\Command\RunCommand; use Symfony\Component\Console\Application; class IAC { - use SingletonTrait; - public function __construct() { $application = new Application(); |