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

Improve CliUtils $argv handling #7210

Merged
merged 4 commits into from Dec 26, 2021

Conversation

vstm
Copy link
Contributor

@vstm vstm commented Dec 24, 2021

This pull request aims to simplify the CliUtils handling by skipping the first value of the $argv array when trying to get the arguments and the paths to be checked.

I have also added a CliUtils test which covers some basic (and one not so basic) use cases of the two methods I changed. Some parts I couldn't test yet (for example when passing - as argument, I would have to "mock" STDIN).

This also solves an issue with composer 2.2 when the "bin-dir" config is set, because in with the proxies the value in $argv[0] is not covered anymore in the code where psalm "recognices" itself (the part of the code which I removed completely). See this gist on how to reproduce the issue: https://gist.github.com/vstm/40258de6df2991cf9309cd10e716089b

@weirdan weirdan added the release:fix The PR will be included in 'Fixes' section of the release notes label Dec 24, 2021
@weirdan weirdan merged commit fb56d5c into vimeo:master Dec 26, 2021
@weirdan
Copy link
Collaborator

weirdan commented Dec 26, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix The PR will be included in 'Fixes' section of the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants