Run the tests written for @pure-unless-parameter-passed - #310
Merged
Conversation
The provider holding them was written but never named among the ones `testParse` is run with, so its two cases had never run. They do not pass: `PureUnlessParameterIsPassedTagValueNode` is the one node of `src/Ast/PhpDoc` without a `__set_state()`, which is what the test reads the node back with after writing it out with `var_export()`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GavWEzia8ZVUYEe6JEde9i
Contributor
|
Nice catch. Thank you. I guess PHPStan would have caught it as a unused method in case shipmonk/dead-code-detector would be included in this package? |
Member
Author
|
Yes, it should catch that |
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.
providePureUnlessParameterIsPassedTagsDatawas written for@pure-unless-parameter-passedin fb19eed, but was never named among the@dataProviderlinestestParseis run with. Its two cases had never run.They do not pass.
PureUnlessParameterIsPassedTagValueNodeis the one concrete node ofsrc/Ast/PhpDocwithout a__set_state(), andtestParsewrites every node out withvar_export()and reads it back:So this names the provider and gives the node the
__set_state()its siblings have —PureUnlessCallableIsImpureTagValueNode's, word for word.Found while writing the grammar-sync test of #309, which reads the inputs of every other test out of the providers they are written with, and so walks over providers nothing else runs.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GavWEzia8ZVUYEe6JEde9i