Skip to content

Fix validate strict warnings#8605

Merged
Seldaek merged 8 commits intocomposer:masterfrom
guilliamxavier:fix-validate-strict-warnings
Feb 14, 2020
Merged

Fix validate strict warnings#8605
Seldaek merged 8 commits intocomposer:masterfrom
guilliamxavier:fix-validate-strict-warnings

Conversation

@guilliamxavier
Copy link
Copy Markdown
Contributor

@Seldaek Seldaek added this to the 1.10 milestone Feb 13, 2020
Copy link
Copy Markdown
Contributor Author

@guilliamxavier guilliamxavier left a comment

Choose a reason for hiding this comment

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

@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?

Co-Authored-By: Guilliam Xavier <guilliamxavier@users.noreply.github.com>
@Seldaek
Copy link
Copy Markdown
Member

Seldaek commented Feb 14, 2020

Yup thanks that is easier to follow I think

@guilliamxavier
Copy link
Copy Markdown
Contributor Author

Oops I had forgotten PHP 5.3, sorry, fixed

@Seldaek Seldaek merged commit 653e62f into composer:master Feb 14, 2020
@Seldaek
Copy link
Copy Markdown
Member

Seldaek commented Feb 14, 2020

Thanks

@guilliamxavier guilliamxavier deleted the fix-validate-strict-warnings branch February 14, 2020 13:50
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.

validate command: with --no-check-publish, adding --strict makes warnings disappear from output

2 participants