Skip to content

Commit

Permalink
src/anabelle bin: look for composer autoload.php in more destinations
Browse files Browse the repository at this point in the history
  • Loading branch information
paveljanda committed Nov 22, 2017
1 parent 163293e commit 6146059
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
ublaboo/anabelle
================

## JSON-RPC Api documentation generator
## Api documentation generator (JSON-RPC / REST)

(No matter whether you're using REST or JSON-RPC)

### Example

Expand Down
11 changes: 9 additions & 2 deletions src/anabelle
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#!/usr/bin/env php
<?php

//require __DIR__ . '/../../../autoload.php';
require __DIR__ . '/../vendor/autoload.php';
if (file_exists(__DIR__ . '/../../../autoload.php')) {
require __DIR__ . '/../../../autoload.php';
} elseif (file_exists(__DIR__ . '/../vendor/autoload.php')) {
require __DIR__ . '/../vendor/autoload.php';
} else {
throw new \RuntimeException(
'Could not find composer autoloader file. Did you run "composer install?"'
);
}

use Symfony\Component\Console\Application;
use Ublaboo\Anabelle\Console\GenerateDocuCommand;
Expand Down

0 comments on commit 6146059

Please sign in to comment.