Skip to content
This repository was archived by the owner on Feb 6, 2020. It is now read-only.

Commit 75cda56

Browse files
committed
Also test for autoloader in current working dir
Needed to allow testing CLI tool using a composer path repository.
1 parent 12cb654 commit 75cda56

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/dump-config.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
namespace Zend\ServiceManager;
1010

1111
// Setup/verify autoloading
12-
if (file_exists($a = __DIR__ . '/../../../autoload.php')) {
12+
if (file_exists($a = getcwd() . '/vendor/autoload.php')) {
13+
require $a;
14+
} elseif (file_exists($a = __DIR__ . '/../../../autoload.php')) {
1315
require $a;
1416
} elseif (file_exists($a = __DIR__ . '/../vendor/autoload.php')) {
1517
require $a;
@@ -42,6 +44,7 @@
4244
$e->getMessage(),
4345
PHP_EOL
4446
));
47+
exit(1);
4548
}
4649
echo Tool\CliTool::dumpConfigFile($config);
4750
exit(0);

0 commit comments

Comments
 (0)