Phpdocumentor: exception with custom composer vendor-dir in 2.7

Created on 26 Aug 2014  路  4Comments  路  Source: phpDocumentor/phpDocumentor

E.g. in project/composer.json

    "config": {
        "vendor-dir": "lib/vendor"
    },

to install files into project/lib/vendor throws:

phpDocumentor expected to find an autoloader at "<..>/project/lib/vendor/phpdocumentor/phpdocumentor/src/phpDocumentor/../../vendor/autoload.php" but it was not there. Usually this is because the "composer install" command has not been ran yet. If this is not the case, please open an issue at http://github.com/phpDocumentor/phpDocumentor2 detailing what installation method you used, which path is mentioned in this error message and any other relevant information.

It seems that phpDocumentor\Bootstrap::findVendorPath expects composer.json and vendor-folder always to be in the in the same directory, which is not necessarily the case.

bug

Most helpful comment

Hi there, just wondering if there's been any update to this issue?

I'm still getting this error using v2.9.0:
PHP Fatal error: Uncaught exception 'RuntimeException' with message 'phpDocumentor expected to find an autoloader at ...

We have a custom location for the vendor dir in the config block of our composer.json file:

"config": {
        "vendor-dir": "app/vendor"
}

All 4 comments

Hi @Schlaefer,

Thanks for reporting this. Support for custom vendor folders is new for phpDocumentor so we have to get some issues fixed.

@Schlaefer this issue is resolved in PR #1420 by @jaapio; starting with phpDocumentor 2.8.0 will the current working directory be checked for a composer.json when all other checks fail and the vendor directory is extracted from it

This issue remains in v2.8.5. Is there any plan to resolve this? It would appear that after the revert to correct #1451, this issue was left closed and no further activity has been recorded.

Hi there, just wondering if there's been any update to this issue?

I'm still getting this error using v2.9.0:
PHP Fatal error: Uncaught exception 'RuntimeException' with message 'phpDocumentor expected to find an autoloader at ...

We have a custom location for the vendor dir in the config block of our composer.json file:

"config": {
        "vendor-dir": "app/vendor"
}
Was this page helpful?
0 / 5 - 0 ratings