Add test failing on array types on PHP 8+ #191
Merged
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.
After a discussion in r11 it appears that from this PR the behaviour changed so that in PHP80+ typehinting an array fails because getType returns the actual string
"array"
whereas pre-PHP80 the value was simply null.Returning
"array"
causes auryn to try and instantiate an array, which is not a class, and triggerserror 8: Could not make array: Class "array" does not exist
.Orthogonally, phpunit being at version 4 makes it incompatible with PHP80+, which is necessary to make the test fail. Allegedly this would be fixed by #188.
cmb in chat proposed a quick stub that could solve the issue. The changes do not seem to impact in any way the code from the phpunit upgrade PR so there's no merging order requirement.