Skip to content

Commit 425754d

Browse files
authored
Merge pull request #571 from phpDocumentor/feature/config
[FEATURE] Search for configuration in parent of vendor
2 parents 1f69ca0 + 25cc1c3 commit 425754d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/guides-cli/bin/guides

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@ if (file_exists($autoloadDirectory)){
3333
$input = new ArgvInput();
3434

3535
$containerFactory = new ContainerFactory([new ApplicationExtension()]);
36+
37+
if (is_file($vendorDir . '/../guides.xml')) {
38+
// vendor folder was placed directly into the project directory
39+
$containerFactory->addConfigFile($vendorDir . '/../guides.xml');
40+
}
3641
if (is_file($input->getParameterOption('--config', getcwd(), true).'/guides.xml')) {
37-
$containerFactory->addConfigFile('guides.xml');
42+
$containerFactory->addConfigFile($input->getParameterOption('--config', getcwd(), true).'/guides.xml');
3843
}
3944
$container = $containerFactory->create($vendorDir);
4045

0 commit comments

Comments
 (0)