Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Assertion::nullOrString(value: $value)throws “Missing the first argument” on PHP 8 because the magic dispatcher only checks argument index0. The same problem affects theall…variants.Resolve the first parameter name from the underlying assertion (including subclass overrides), move that argument into the existing value slot, and preserve the remaining named arguments for PHP to bind. This supports reordered arguments and assertions whose first parameter is named
countable, while retaining native duplicate/unknown argument errors.Fixes #343.
Regression tests cover both delegates, null and iterable values, reordered/mixed arguments, subclass parameter names, and failure details. On the original implementation, 11 of the initial 14 regression cases error. With the change, PHPUnit passes 544 tests / 944 assertions with 3 skips for the unavailable
intlextension (PHP 8.5.4, PHPUnit 9.6.38).composer assert:cs-lintcannot run with the currently resolved fixer 3 because the existing.php_csconfiguration is obsolete. Running fixer 2.19.3 against the changed files reports the same preexisting formatting changes as the clean base. Other PHP versions were not run locally; the new tests skip named-argument calls on PHP 7.