git.cweiske.de
/
php-sqllint.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c1ae7d6
)
Fix #2: Load dependencies correctly when used as composer dependency
v0.1.1
author
Christian Weiske
<cweiske@cweiske.de>
Thu, 14 Apr 2016 05:46:12 +0000
(07:46 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Thu, 14 Apr 2016 05:46:12 +0000
(07:46 +0200)
bin/php-sqllint
patch
|
blob
|
history
diff --git
a/bin/php-sqllint
b/bin/php-sqllint
index f746813650c7a37e9ad99896fc834b19b7220dbd..8075c9e636300e20bc2f555baecbcfaab5a99efc 100755
(executable)
--- a/
bin/php-sqllint
+++ b/
bin/php-sqllint
@@
-13,9
+13,14
@@
*/
namespace phpsqllint;
*/
namespace phpsqllint;
-if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
+if (file_exists('vendor/autoload.php')) {
+ //dependency composer installation
+ include_once 'vendor/autoload.php';
+} else if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
+ //local git checkout
include_once __DIR__ . '/../vendor/autoload.php';
}
include_once __DIR__ . '/../vendor/autoload.php';
}
+
if (file_exists(__DIR__ . '/../src/phpsqllint/Autoloader.php')) {
include_once __DIR__ . '/../src/phpsqllint/Autoloader.php';
Autoloader::register();
if (file_exists(__DIR__ . '/../src/phpsqllint/Autoloader.php')) {
include_once __DIR__ . '/../src/phpsqllint/Autoloader.php';
Autoloader::register();