DB/PreparedSQL: add tests for namespaced names#2708
Draft
rodrigoprimo wants to merge 2 commits intoWordPress:developfrom
Draft
DB/PreparedSQL: add tests for namespaced names#2708rodrigoprimo wants to merge 2 commits intoWordPress:developfrom
rodrigoprimo wants to merge 2 commits intoWordPress:developfrom
Conversation
Collaborator
Author
|
Moved this to draft as I missed that the tests were not failing in the PHPCS 4.0 preparation branch, but are failing here due to a commit that I did not include in this PR. |
Collaborator
Author
|
The tests are failing because of #2710. I will fix that issue in a separate PR and then move this one as ready to review once the tests pass. |
ae0b611 to
799b3e7
Compare
Collaborator
Author
I opted to change the approach: I updated the tests in this PR to clearly document the false positive behavior and reference #2710. The bug itself will be fixed in a separate PR, which will also update the test expectations. This PR is now ready for review. |
Collaborator
Author
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.
Description
In preparation for PHPCS 4.0, which changes the tokenization of namespaced names, this PR adds tests with all forms of namespaced function calls (partially qualified, fully qualified, and namespace-relative using the namespace keyword) as well as fully qualified global function calls to the
WordPress.DB.PreparedSQLsniff.Suggested changelog entry
N/A