Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

Autoload issue #131

Open
gertvdb opened this issue Feb 21, 2019 · 2 comments
Open

Autoload issue #131

gertvdb opened this issue Feb 21, 2019 · 2 comments

Comments

@gertvdb
Copy link

gertvdb commented Feb 21, 2019

The autoloader doesn't work when the vendor-dir is set to a different dir in the composer.json file.
I keep getting : "You must set up the project dependencies, run the following commands: "

"config": {
    "vendor-dir": "lib/vendor",
}
@jrfnl
Copy link

jrfnl commented Aug 18, 2019

I have tested this, but cannot reproduce the issue.

Using the following composer.json file:

{
    "name": "testing/issue-131",
    "description": "",
    "require": {
        "php": ">=5.4.0"
    },
    "require-dev": {
        "jakub-onderka/php-parallel-lint": "^1.0",
        "jakub-onderka/php-console-highlighter": "~0.3"
    },
	"config": {
	    "vendor-dir": "lib/vendor"
	}
}

I then added a file with a parse error to the directory and ran:

composer install
"lib/vendor/bin/parallel-lint" . --exclude lib/vendor

I am not getting any autoloader errors, the tool looks to run without problems.

PL-131

Please provide more detailed steps to reproduce the issue.

@mlutonsky
Copy link

We are having the same issue. How to reproduce:
assume composer configuration:

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

-> autoload is located in lib/composer/autoload.php (relative to project's root)

I'm running following command from project's root directory:

[~/www/project]$ lib/composer/bin/parallel-lint app

Evaluated $autoloadLocations (inside parallel-lint script) are:

array(4) {
  [0]=>
  string(49) "~/www/project/vendor/autoload.php"
  [1]=>
  string(48) "~/www/project/../../autoload.php"
  [2]=>
  string(101) "~/www/project/lib/composer/php-parallel-lint/php-parallel-lint/../vendor/autoload.php"
  [3]=>
  string(100) "~/www/project/lib/composer/php-parallel-lint/php-parallel-lint/../../../autoload.php"
}

The last one path is almost success, but imho there is too many ../?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants