Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

merged branch Seldaek/patch-1 (PR #2)

This PR was merged into the master branch.

Commits
-------

f6c6981 Allow the checker to be installed as a dependency

Discussion
----------

Allow the checker to be installed as a dependency
  • Loading branch information...
commit d6f88d2d911be88f685097d33ee5f0f5044af1e1 2 parents 194f03d + f6c6981
@fabpot fabpot authored
Showing with 12 additions and 1 deletion.
  1. +12 −1 security-checker
View
13 security-checker
@@ -1,7 +1,18 @@
#!/usr/bin/env php
<?php
-require_once __DIR__.'/vendor/autoload.php';
+function includeIfExists($file)
+{
+ if (file_exists($file)) {
+ return include $file;
+ }
+}
+
+if ((!$loader = includeIfExists(__DIR__.'/vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__.'/../../autoload.php'))) {
+ die('You must set up the project dependencies, run the following commands:'.PHP_EOL.
+ 'curl -sS https://getcomposer.org/installer | php'.PHP_EOL.
+ 'php composer.phar install'.PHP_EOL);
+}
use Symfony\Component\Console\Application;
use SensioLabs\Security\Command\SecurityCheckerCommand;
Please sign in to comment.
Something went wrong with that request. Please try again.