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 validate strict warnings #8605

Merged
merged 8 commits into from Feb 14, 2020
Merged

Fix validate strict warnings #8605

merged 8 commits into from Feb 14, 2020

Conversation

@guilliamxavier
Copy link
Contributor

guilliamxavier commented Feb 13, 2020

  • The first commit fixes a regression in #7637
  • The second commit fixes #8602
  • Extra commits are to improve maintainability
…s too
@Seldaek Seldaek added this to the 1.10 milestone Feb 13, 2020
Copy link
Contributor Author

guilliamxavier left a comment

@Seldaek: Thanks, you are right, and made me realize that actually it was useless to add $publishErrors/$lockErrors to $warnings (modified by reference) in the !$isStrict case (because it won't be checked).
Also, instead of adding to a copy, we could add to an empty array and merge at the end (see the list of Suggested changes below), which one do you prefer?

src/Composer/Command/ValidateCommand.php Outdated Show resolved Hide resolved
src/Composer/Command/ValidateCommand.php Outdated Show resolved Hide resolved
src/Composer/Command/ValidateCommand.php Outdated Show resolved Hide resolved
src/Composer/Command/ValidateCommand.php Outdated Show resolved Hide resolved
Co-Authored-By: Guilliam Xavier <guilliamxavier@users.noreply.github.com>
@Seldaek

This comment has been minimized.

Copy link
Member

Seldaek commented Feb 14, 2020

Yup thanks that is easier to follow I think

@guilliamxavier

This comment has been minimized.

Copy link
Contributor Author

guilliamxavier commented Feb 14, 2020

Oops I had forgotten PHP 5.3, sorry, fixed

@Seldaek Seldaek merged commit 653e62f into composer:master Feb 14, 2020
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Seldaek

This comment has been minimized.

Copy link
Member

Seldaek commented Feb 14, 2020

Thanks

@guilliamxavier guilliamxavier deleted the guilliamxavier:fix-validate-strict-warnings branch Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.