File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env php
2
2
<?php
3
3
4
- $ vendorDir = __DIR__ .'/../vendor ' ;
5
-
6
- $ file = $ vendorDir .'/autoload.php ' ;
7
- if (file_exists ($ file )) {
8
- $ autoload = require_once $ file ;
9
- } else {
10
- die ("Install dependencies before using this command. \n" );
4
+ if (!class_exists ('\Symfony\Component\Console\Application ' )) {
5
+ if (is_file (__DIR__ .'/../vendor/autoload.php ' )) {
6
+ require __DIR__ .'/../vendor/autoload.php ' ;
7
+ } elseif (is_file (__DIR__ .'/../../../autoload.php ' )) {
8
+ require __DIR__ .'/../../../autoload.php ' ;
9
+ } else {
10
+ echo 'Cannot find the vendor directory, have you executed composer install? ' .PHP_EOL ;
11
+ echo 'See https://getcomposer.org to get Composer. ' .PHP_EOL ;
12
+ exit (1 );
13
+ }
11
14
}
12
15
13
16
$ configFile = getcwd () . DIRECTORY_SEPARATOR . 'cli-config.php ' ;
Original file line number Diff line number Diff line change 39
39
"PHPCR\\ Util" : " src"
40
40
}
41
41
},
42
+ "bin" : [" bin/phpcr" ],
42
43
"extra" : {
43
44
"branch-alias" : {
44
45
"dev-master" : " 1.2-dev"
You can’t perform that action at this time.
0 commit comments