Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating docs from multiple directories always uses only one #2070

Closed
horgh opened this issue Mar 12, 2019 · 3 comments
Closed

Generating docs from multiple directories always uses only one #2070

horgh opened this issue Mar 12, 2019 · 3 comments

Comments

@horgh
Copy link

horgh commented Mar 12, 2019

Expected Behavior

I have two related projects, and I want to include docs generated from both in one run. (Two directories)

Actual Behavior

I only get docs from only one directory.

Steps to Reproduce the Problem

php /will/bin/phpDocumentor2/build/phpDocumentor.phar -d src,../MaxMind-DB-Reader-php/src --cache-folder=mycache -t doc-test

I also tried using a config - same result. Config:

<?xml version="1.0" encoding="UTF-8" ?>                                                                                                                                              
<phpdocumentor>
  <files>
    <directory>src</directory>
    <directory>../MaxMind-DB-Reader-php/src</directory>
  </files>
</phpdocumentor>

Your environment

@jaapio
Copy link
Member

jaapio commented Mar 14, 2019

At the moment phpdocumentor only supports one root directory. As a work around I think you should be able to run phpdocumentor from the common root directory of both projects.

@jaapio jaapio added this to Needs triage in Issue Triage Jun 15, 2019
@jaapio
Copy link
Member

jaapio commented Jan 16, 2020

Hi @horgh,

You would help us a lot when you are able to give the nightly builds a try.
https://github.com/phpDocumentor/phpDocumentor#nightly-builds

we did change a lot in the path handling. So your setup could work.
As in phpDoc v2 paths are relative to the current working directory, but indifference we do only support 1 root directory. at the moment. More about this is explained in #2159

So running phpdocumentor in a directory like this: /opt/phpdoc/src/phpDocumentor/Parser$ ../../../bin/phpdoc --env=dev -d . -d ../Pipeline/ will not work currently.
What phpdocumentor will do is get the first path as "project root". but since ../Pipeline is breaking out of this root it will fail to find the directory. However when you pass a config file:

<?xml version="1.0" encoding="UTF-8" ?>                                                                                                                                              
<phpdocumentor>
  <files>
    <directory>./Parser</directory>
    <directory>./Pipeline</directory>
  </files>
</phpdocumentor> 

Then execute /opt/phpdoc/src/phpDocumentor/Parser$ ../../../bin/phpdoc --config=../config.xml it will work.

Please let us know if this fixes your issue. We will keep you posted about the progress of multiple root directory support.

@jaapio jaapio moved this from Needs triage to Triaged in Issue Triage Jan 16, 2020
@horgh
Copy link
Author

horgh commented Jan 18, 2020

I tested just now using this build. It worked great! Thank you for the great instructions and for making this work. Awesome!

@jaapio jaapio closed this as completed Jan 18, 2020
Issue Triage automation moved this from Triaged to Closed Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Closed
Issue Triage
  
Closed
Development

No branches or pull requests

2 participants