Skip to content

Commit

Permalink
Dev Added automated composer install when using console. This should …
Browse files Browse the repository at this point in the history
…ease initial run for developers.
  • Loading branch information
SamMousa committed Jun 19, 2015
1 parent 46fe201 commit aba9ec7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion application/entry.php
Expand Up @@ -27,7 +27,7 @@
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);// Not needed if user don't remove his 'debug'=>0, for application/config/config.php (Installation is OK with E_ALL)
}

if (version_compare(PHP_VERSION, '5.4.0', '<'))
if (version_compare(PHP_VERSION, '5.5.0', '<'))
die('This version of LimeSurvey requires PHP version 5.4.0 or later! Your version: '.PHP_VERSION);


Expand Down
25 changes: 12 additions & 13 deletions application/limesurvey
@@ -1,17 +1,16 @@
#!/usr/bin/php
<?php
/**
* LimeSurvey (tm)
* Copyright (C) 2011 The LimeSurvey Project Team / Carsten Schmitz
* All rights reserved.
* License: GNU/GPL License v2 or later, see LICENSE.php
* LimeSurvey is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*
*/
<?php
if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
echo "Composer autoloader not detected. Attempting to run composer install...\n";
chdir(__DIR__ . '/..');
passthru("composer install", $return);
if ($return !== 0) {
die("Failed to run composer install, please do it manually.");
} else {
echo "Composer install OK\n";
}

}
$loader = require_once(__DIR__ . '/vendor/autoload.php');
class_exists(Yii::class);
if (!isset($argv[0])) die("This must be run from the console.\n");
Expand Down

1 comment on commit aba9ec7

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\o/

Please sign in to comment.