Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Commit

Permalink
Replaced git submodule with composer dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Soner Sayakci committed Apr 23, 2016
1 parent 5b20d71 commit 942674b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/composer.lock
/vendor
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

14 changes: 4 additions & 10 deletions Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ public function onShopwareStartDispatch(Enlight_Event_EventArgs $args)

if ($subject->getParam('noErrorHandler')) {
$requestUri = $subject->Request()->getRequestUri();
spl_autoload_register(array($this, 'loader'));

if (file_exists($this->Path() . 'vendor/autoload.php')) {
require_once $this->Path() . 'vendor/autoload.php';
}

$whoops = new Run;

Expand All @@ -56,13 +59,4 @@ public function onShopwareStartDispatch(Enlight_Event_EventArgs $args)
restore_error_handler();
}
}

public function loader($className)
{
if (!strstr($className, 'Whoops')) {
return;
}
$className = str_replace('\\', '/', $className);
require_once($this->Path() . '/vendor/filp/whoops/src/' . $className . '.php');
}
}
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"require": {
"php": ">=5.5.9",
"composer/installers": "^1.0"
"composer/installers": "^1.0",
"filp/whoops": "^2.1"
}
}
}

0 comments on commit 942674b

Please sign in to comment.