summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/phpiac10
-rw-r--r--src/IAC.php3
2 files changed, 8 insertions, 5 deletions
diff --git a/bin/phpiac b/bin/phpiac
index 3e2b520..21ff26b 100755
--- a/bin/phpiac
+++ b/bin/phpiac
@@ -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();