Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions parallel-lint
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50400) {
$autoloadLocations = [
getcwd() . '/vendor/autoload.php',
getcwd() . '/../../autoload.php',
__DIR__ . '/vendor/autoload.php',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a similar case.
If you call the script from outside your project folder, the same error message appears.
e.g. my-project-in-subfolder/vendor/bin/parallel-lint

This would fix it:

Suggested change
__DIR__ . '/vendor/autoload.php',
__DIR__ . '/vendor/autoload.php',
__DIR__ . '/../../autoload.php',

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there are basically more issues with the autoloading. PR #2 was also a step in the right direction, but a more structural, stable solution is needed.

__DIR__ . '/../vendor/autoload.php',
__DIR__ . '/../../../autoload.php',
];
Expand Down