File tree Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Original file line number Diff line number Diff line change 47
47
}
48
48
49
49
$ paths = array (
50
- '/.. ' ,
51
- ' /.. /../../.. '
50
+ __DIR__ . '/../vendor ' ,
51
+ __DIR__ . ' /../../.. '
52
52
);
53
53
54
54
foreach ($ paths as $ path ) {
55
- $ vendor = __DIR__ . $ path . '/vendor ' ;
56
- if (is_dir ($ vendor . '/composer ' ) &&
57
- is_file ($ vendor . '/autoload.php ' )) {
58
- require_once $ vendor . '/autoload.php ' ;
59
- define ('PHPUNIT_COMPOSER_INSTALL ' , $ vendor . '/autoload.php ' );
55
+ if (is_dir ($ path . '/composer ' ) &&
56
+ is_file ($ path . '/autoload.php ' )) {
57
+ require_once $ path . '/autoload.php ' ;
58
+ define ('PHPUNIT_COMPOSER_INSTALL ' , $ path . '/autoload.php ' );
60
59
61
60
return ;
62
61
}
Original file line number Diff line number Diff line change @@ -47,16 +47,15 @@ if (defined('PHPUNIT_COMPOSER_INSTALL')) {
47
47
}
48
48
49
49
$paths = array(
50
- '/..',
51
- '/.. /../../..'
50
+ __DIR__ . '/../vendor ',
51
+ __DIR__ . ' /../../..'
52
52
);
53
53
54
54
foreach ($paths as $path) {
55
- $vendor = __DIR__ . $path . '/vendor';
56
- if (is_dir($vendor . '/composer') &&
57
- is_file($vendor . '/autoload.php')) {
58
- require_once $vendor . '/autoload.php';
59
- define('PHPUNIT_COMPOSER_INSTALL', $vendor . '/autoload.php');
55
+ if (is_dir($path . '/composer') &&
56
+ is_file($path . '/autoload.php')) {
57
+ require_once $path . '/autoload.php';
58
+ define('PHPUNIT_COMPOSER_INSTALL', $path . '/autoload.php');
60
59
61
60
return;
62
61
}
You can’t perform that action at this time.
0 commit comments