summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2021-04-28 14:48:48 +0200
committerDaniel Weipert <code@drogueronin.de>2021-04-28 14:48:48 +0200
commitb3160d7bfd29288fcbfe528e4fd1fcd80864807f (patch)
treedda7a95d8a73cc87d18c21a291517f2be9af6a83
parent9f0ccee3f967c2cd6cd5cfaea97dc35e1a7bd12a (diff)
Fixes bin autoloadHEADv1.0.2main
-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();