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

Fix no-vendor-phpcs flag #92

Merged
merged 2 commits into from
Aug 21, 2023
Merged

Fix no-vendor-phpcs flag #92

merged 2 commits into from
Aug 21, 2023

Conversation

sirbrillig
Copy link
Owner

@sirbrillig sirbrillig commented Aug 21, 2023

PHP's getopt function sets boolean options to false, which is counter-intuitive. When we parse options, we must take that into account. That was already done for other boolean options, but I made a mistake in #81 and did not correctly set the --no-vendor-phpcs option.

This was hidden because the unit tests do not use getopt and instead create the options manually and I forgot to set the option to false.

In this PR I fix those tests and then fix the bug.

In researching this bug, I also found a bunch of other options in the tests that did not correctly set their flags to false, which I've also fixed (thankfully they did not uncover any additional bugs).

@sirbrillig sirbrillig merged commit 8af0f19 into trunk Aug 21, 2023
@sirbrillig sirbrillig deleted the fix/no-vendor-phpcs branch August 21, 2023 15:05
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.

1 participant