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

Require the top level installed versions #54

Merged
merged 2 commits into from
Jan 3, 2024
Merged

Require the top level installed versions #54

merged 2 commits into from
Jan 3, 2024

Conversation

staabm
Copy link
Owner

@staabm staabm commented Jan 3, 2024

closes #52

@staabm staabm merged commit 6411431 into main Jan 3, 2024
12 checks passed
@staabm staabm deleted the fix branch January 3, 2024 16:07
@@ -58,6 +58,12 @@ public function __construct(
) {
$this->workingDirectory = $workingDirectory;
$this->errorBuilder = $errorBuilder;

// require the top level installed versions, so we don't mix it up with the one in phpstan.phar
$installedVersions = $this->workingDirectory . '/vendor/composer/InstalledVersions.php';

Choose a reason for hiding this comment

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

One can configure an alternative folder instead of vendor/: https://getcomposer.org/doc/06-config.md#vendor-dir
So hard coding might fail for some users.

Copy link
Owner Author

@staabm staabm Jan 3, 2024

Choose a reason for hiding this comment

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

I am aware this config exists, but AFAICS there are a lot of tools which will break when using different vendor-dir.

is this something you need for your projects?

Copy link

@DanielSiepmann DanielSiepmann Feb 7, 2024

Choose a reason for hiding this comment

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

Not until now, I've opened a separate Issue: #85

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

Successfully merging this pull request may close these issues.

by a semantic version constraint matched against a Composer dependency not working
2 participants