Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release WordPressCS 3.0.0 #2369

Merged
merged 1,105 commits into from
Aug 21, 2023
Merged
Changes from 1 commit
Commits
Show all changes
1105 commits
Select commit Hold shift + click to select a range
10e4891
VariableHelper::is_comparison(): minor defensive coding tweak
jrfnl Jul 9, 2023
4ed7675
Security/NonceVerification: rename test case file
jrfnl Jul 7, 2023
bbfbb9e
Security/NonceVerification: move test involving global scope to separ…
jrfnl Jul 7, 2023
071122b
Security/NonceVerification: add some extra tests involving global scope
jrfnl Jul 7, 2023
851b75d
Security/NonceVerification: test with empty()
jrfnl Jul 9, 2023
46eeac7
Security/NonceVerification: remove redundant function call
jrfnl Jul 7, 2023
d842ffc
Security/NonceVerification: remove redundant local variable
jrfnl Jul 7, 2023
436a9a1
Security/NonceVerification: changes to `$addedCustomFunctions` property
jrfnl Jul 7, 2023
3b00b2c
Security/NonceVerification: bug fix - `$_FILES` not `$_FILE`
jrfnl Jul 7, 2023
93dbac4
Security/NonceVerification: move results cache to property
jrfnl Jul 7, 2023
ea8cbb2
Security/NonceVerification: improve caching
jrfnl Jul 7, 2023
916c28b
Security/NonceVerification: add cache getter and setter methods
jrfnl Jul 7, 2023
3a8edc2
Security/NonceVerification: implement PHPCSUtils
jrfnl Dec 17, 2022
0866afc
Security/NonceVerification: bug fix - ignore OO properties
jrfnl Jul 7, 2023
10e3180
Security/NonceVerification: bug fix - disregard assignments via list()
jrfnl Jul 9, 2023
f8cd505
Security/NonceVerification: new `needs_nonce_check()` method
jrfnl Jul 8, 2023
154855a
Security/NonceVerification: efficiency fix - check for being in a non…
jrfnl Jul 8, 2023
8f2dd9c
Security/NonceVerification: bug fix - allow unsetting of superglobal …
jrfnl Jul 7, 2023
68ccbc9
Security/NonceVerification: add test with PHP 7.0+ null coalesce oper…
jrfnl Jul 9, 2023
c0f47eb
Security/NonceVerification: support PHP 7.4+ null coalesce equals
jrfnl Jul 9, 2023
5a9d988
Security/NonceVerification: disregard PHP 7.4 arrow function when det…
jrfnl Jul 9, 2023
ae646c6
Security/NonceVerification: disregard nonce check in PHP 7.4 arrow fu…
jrfnl Jul 9, 2023
a915928
Security/NonceVerification: add test with PHP 8.0+ match construct
jrfnl Jul 9, 2023
c73c642
Security/NonceVerification: add test with PHP 8.1+ nested enum
jrfnl Jul 9, 2023
59856f7
Security/NonceVerification: various documentation tweaks
jrfnl Jul 8, 2023
4428474
Merge pull request #2296 from WordPress/feature/variablehelper-defens…
dingo-d Jul 10, 2023
495d61a
Merge pull request #2297 from WordPress/feature/nonceverification-review
dingo-d Jul 10, 2023
0fc6aa0
NamingConventions/ValidVariableName: bring back `$catID`
jrfnl Jul 10, 2023
e6523fa
Arrays/ArrayDeclarationSpacing: implement PHPCSUtils [1]
jrfnl Jul 10, 2023
590259f
Arrays/ArrayDeclarationSpacing: implement PHPCSUtils [2] / PHP 7.2+ …
jrfnl Jul 10, 2023
a0b40fd
Arrays/ArrayDeclarationSpacing: implement PHPCSUtils [3]
jrfnl Jul 10, 2023
8765b74
Arrays/ArrayDeclarationSpacing: implement PHPCSUtils [4]
jrfnl Jul 10, 2023
ebb9d61
Arrays/ArrayDeclarationSpacing: replace whitespace checks with PHPCSE…
jrfnl Jul 10, 2023
e38b250
Arrays/ArrayDeclarationSpacing::process_multi_line_array(): remove re…
jrfnl Jul 10, 2023
7c87f4f
Arrays/ArrayDeclarationSpacing::process_single_line_array(): lower ne…
jrfnl Jul 10, 2023
c7eae91
Arrays/ArrayDeclarationSpacing: minor test tweaks
jrfnl Jul 10, 2023
ceff5f5
Merge pull request #2300 from WordPress/feature/validvariablename-bri…
dingo-d Jul 11, 2023
0734364
Merge pull request #2301 from WordPress/feature/arraydeclarationspaci…
dingo-d Jul 11, 2023
5c04d9d
Core: add section about trait use statement rules with select new sniffs
jrfnl Oct 28, 2022
a510c20
Merge pull request #2303 from WordPress/feature/core-add-trait-use-rules
GaryJones Jul 19, 2023
0ed93af
Composer: update PHPCSUtils + PHPCSExtra
jrfnl Jul 19, 2023
1767f3a
Merge pull request #2307 from WordPress/feature/composer-update-phpcs…
dingo-d Jul 20, 2023
33f0361
Core: add some more sniffs for import `use` statements
jrfnl Jun 18, 2023
098012a
Extra: add sniff to detect inefficient "echo sprintf(...)"
jrfnl Jun 18, 2023
20029ed
Replace the WordPress.Array.CommaAfterArrayItem sniff
jrfnl Jul 17, 2023
2277863
Merge pull request #2310 from WordPress/feature/core-replace-arrays-c…
GaryJones Jul 20, 2023
0fe8f4f
Merge pull request #2309 from WordPress/feature/extra-ruleset-add-noe…
GaryJones Jul 20, 2023
61217ff
Merge pull request #2308 from WordPress/feature/core-ruleset-add-more…
GaryJones Jul 20, 2023
6e3f97e
Rulesets: various minor tweaks
jrfnl Jun 12, 2023
e6b50e6
Merge pull request #2312 from WordPress/feature/ruleset-tweaks-tidy-up
dingo-d Jul 21, 2023
7fd57b7
DB/PreparedSQLPlaceholders: final fixes for %i support
jrfnl Jul 21, 2023
f59e3d5
Merge pull request #2072 from craigfrancis/patch-1
jrfnl Jul 21, 2023
fcea43c
DB/PreparedSQLPlaceholders: add extra tests
jrfnl Jan 11, 2023
671289d
DB/PreparedSQLPlaceholders: make variables used explicit
jrfnl Jul 22, 2023
27ca935
DB/PreparedSQLPlaceholders: implement PHPCSUtils
jrfnl Jan 11, 2023
0f7b3ad
DB/PreparedSQLPlaceholders: minor simplification
jrfnl Jul 22, 2023
7004173
DB/PreparedSQLPlaceholders: prevent false positive due to comments in…
jrfnl Jul 22, 2023
abcba3d
DB/PreparedSQLPlaceholders: prevent false negative due to comments in…
jrfnl Jul 22, 2023
4fc71c3
DB/PreparedSQLPlaceholders: prevent false positive due to comments in…
jrfnl Jul 22, 2023
eee85c0
DB/PreparedSQLPlaceholders: bug fix - allow for FQN function calls
jrfnl Jul 22, 2023
7a4259f
DB/PreparedSQLPlaceholders: bug fix - sniff could skip too much
jrfnl Jul 22, 2023
7d06fbb
DB/PreparedSQLPlaceholders: improve error message precision for Ident…
jrfnl Jul 22, 2023
bc75ffe
DB/PreparedSQLPlaceholders: improve error message precision for Quote…
jrfnl Jul 22, 2023
01c5bf4
DB/PreparedSQLPlaceholders: prevent token walking too far
jrfnl Jul 22, 2023
e2f237f
DB/PreparedSQLPlaceholders: add tests with PHP 7.3+ trailing commas i…
jrfnl Jul 22, 2023
d61a616
DB/PreparedSQLPlaceholders: add tests with PHP 8.0+ nullsafe object o…
jrfnl Jul 22, 2023
b1c9095
DB/PreparedSQLPlaceholders: add tests with PHP 8.0+ nullsafe object o…
jrfnl Jul 22, 2023
8f745ff
DB/PreparedSQLPlaceholders: add support for PHP 8.0+ named parameters…
jrfnl Jan 11, 2023
7e13937
DB/PreparedSQLPlaceholders: add support for PHP 8.0+ named parameters…
jrfnl Jan 11, 2023
995ff43
DB/PreparedSQLPlaceholders: add support for PHP 8.0+ named parameters…
jrfnl Apr 8, 2023
6063a6a
DB/PreparedSQLPlaceholders: add support for PHP 8.0+ named parameters…
jrfnl Jul 22, 2023
57df20c
DB/PreparedSQLPlaceholders: add tests with PHP 8.1+ first class callable
jrfnl Jul 22, 2023
9045552
DB/PreparedSQLPlaceholders: minor documentation fix
jrfnl Apr 12, 2023
7112225
Docs: various minor tweaks
jrfnl Jul 4, 2023
690f93e
Merge pull request #2313 from WordPress/feature/various-minor-doc-tweaks
dingo-d Jul 23, 2023
824ba43
NamingConventions/PrefixAllGlobals: order constants list alphabetically
jrfnl Jul 2, 2023
3fe65af
NamingConventions/PrefixAllGlobals: update the constants list based o…
jrfnl Jul 2, 2023
aeacb6c
NamingConventions/ValidPostTypeSlug: order reserved names alphabetically
jrfnl Jul 2, 2023
af770df
NamingConventions/ValidPostTypeSlug: update the reserved post types l…
jrfnl Jul 2, 2023
72fd88b
WP/ClassNameCase: update the class lists based on WP 6.3-RC1
jrfnl Jul 1, 2023
f71b5ce
WP/ClassNameCase: add list of `Twenty*` themes classes
jrfnl Jul 1, 2023
3cae0a4
WP/DeprecatedClasses: update the class list based on WP 6.3-RC1
jrfnl Jul 1, 2023
090aa17
WP/DeprecatedFunctions: update the functions list based on WP 6.3-RC1
jrfnl Jul 1, 2023
57bea4d
WP/DeprecatedParameters: update the list based on WP 6.3-RC1
jrfnl Jul 1, 2023
b71cf17
Merge pull request #2320 from WordPress/feature/deprecatedparameters-…
dingo-d Jul 23, 2023
946ee44
Merge pull request #2319 from WordPress/feature/deprecatedfunctions-u…
dingo-d Jul 23, 2023
894a372
Merge pull request #2318 from WordPress/feature/deprecatedclasses-upd…
dingo-d Jul 23, 2023
d65600c
Merge pull request #2317 from WordPress/feature/classnamecase-update-…
dingo-d Jul 23, 2023
0a5905e
Merge pull request #2316 from WordPress/feature/validposttypeslug-upd…
dingo-d Jul 23, 2023
cfe143d
Merge pull request #2315 from WordPress/feature/prefixallglobals-upda…
dingo-d Jul 23, 2023
bf9d82a
Merge pull request #2314 from WordPress/feature/db-preparedsqlplaceho…
dingo-d Jul 23, 2023
230535a
Update the `minimum_wp_version` to WP 6.0
jrfnl Jun 26, 2023
f04d9d6
.gitattributes: minor update
jrfnl Jun 25, 2023
67d98d2
PHPUnit config: remove file which no longer exists
jrfnl Jul 1, 2023
942e786
Merge pull request #2321 from WordPress/feature/minimumwpversion-up-t…
dingo-d Jul 24, 2023
e14fd95
Merge pull request #2322 from WordPress/feature/gitattributes-sync
dingo-d Jul 24, 2023
2c593e4
Merge pull request #2323 from WordPress/feature/phpunit-update-file-list
dingo-d Jul 24, 2023
01d23a6
Core/Extra: tweak the inclusion of the `Modernize.FunctionCalls.Dirna…
jrfnl Jul 26, 2023
ca2da67
Merge pull request #2324 from WordPress/feature/core-update-dirname-s…
GaryJones Jul 26, 2023
208516e
EscapingFunctionsTrait: add esc_xml() to the list of escaping functions
jrfnl Jul 27, 2023
ed8c30d
EscapingFunctionsTrait: add wp_timezone_choice() to the list of auto-…
jrfnl Jul 27, 2023
38d3d6e
EscapingFunctionsTrait: add wp_readonly() to the list of auto-escaped…
jrfnl Jul 27, 2023
73be58a
SanitizingFunctionsTrait: add sanitize_url() to the list of sanitizat…
jrfnl Jul 27, 2023
b1ae705
[SanitizingFunctions|EscapingFunctions]Trait: add wp_kses_one_attr() …
jrfnl Jul 27, 2023
7cb6224
Merge pull request #2325 from WordPress/feature/update-various-functi…
GaryJones Jul 27, 2023
5794920
Security/EscapeOutput: rename test case file
jrfnl Jul 23, 2023
7d39aad
Security/EscapeOutput: move parse error related test to separate file
jrfnl Jul 26, 2023
2b5fa26
Security/EscapeOutput: use Tokens::$magicConstants
jrfnl Jun 30, 2020
93033c6
Security/EscapeOutput: use PHPCSUtils
jrfnl Jul 26, 2023
9af97f4
Security/EscapeOutput: normalize the `$safe_components` array
jrfnl Jul 26, 2023
26095ef
Security/EscapeOutput: bug fix - expand the "safe components" list
jrfnl Jul 27, 2023
268d415
Security/EscapeOutput: split `process_token()` method [1]
jrfnl Jul 23, 2023
4221832
Security/EscapeOutput: split `process_token()` method [2]
jrfnl Jul 24, 2023
51dd364
Security/EscapeOutput: bug fix - false positives on non-function calls
jrfnl Jul 24, 2023
8d1fffb
Helpers/PrintingFunctionsTrait: add `get_printing_functions()` method
jrfnl Jul 23, 2023
4f57d4c
Security/EscapeOutput: bug fix - false positives on non-global functi…
jrfnl Jul 24, 2023
ecbc52f
Security/EscapeOutput: bug fix - function names are case-insensitive
jrfnl Jul 24, 2023
530de77
Security/EscapeOutput: prevent false positive due to comments in param
jrfnl Jul 26, 2023
616c2c9
Security/EscapeOutput: code readability improvements [1]
jrfnl Jul 24, 2023
511787d
Security/EscapeOutput: bug fix - only examine exit/die with parentheses
jrfnl Jul 24, 2023
793fc7e
Security/EscapeOutput: bug fix - improve start/end determination for …
jrfnl Jul 25, 2023
f882b53
Security/EscapeOutput: efficiency tweak for parse errors in echo stat…
jrfnl Jul 25, 2023
2d76c1d
Security/EscapeOutput: fix up after refactor
jrfnl Jul 25, 2023
0167eb7
Security/EscapeOutput: bug fix - allow for nested statements with ter…
jrfnl Jul 25, 2023
6bcb6b0
Security/EscapeOutput: bug fix - [improved] allow for nested statemen…
jrfnl Jul 26, 2023
a59a60f
Security/EscapeOutput: bug fix - allow non-matching parentheses
jrfnl Jul 26, 2023
fd3101a
Security/EscapeOutput: bug fix - fix ternary finding within the loop
jrfnl Jul 26, 2023
e15a50e
Security/EscapeOutput: bug fix - false negatives for short ternary
jrfnl Jul 26, 2023
05df272
Security/EscapeOutput: code readability improvements [2]
jrfnl Jul 25, 2023
d49715f
Security/EscapeOutput: efficiency tweak [1]
jrfnl Jul 25, 2023
f3bd49b
Security/EscapeOutput: efficiency tweak [2]
jrfnl Jul 25, 2023
b6ec4a2
Security/EscapeOutput: bug fix - sniff would skip too much
jrfnl Jul 25, 2023
2dcd742
Security/EscapeOutput: bug fix - sniff did not handle function call p…
jrfnl Jul 26, 2023
05de946
Security/EscapeOutput: add tests for PHP 7.4 numeric literals + PHP 8…
jrfnl Jul 25, 2023
f108735
Security/EscapeOutput: add support for PHP 8.0+ named parameters [1]
jrfnl Jul 25, 2023
4a4858c
Security/EscapeOutput: add support for PHP 8.0+ named parameters [2]
jrfnl Jul 25, 2023
eab1f2b
Security/EscapeOutput: add support for PHP 8.0+ match expressions [1]
jrfnl Jul 26, 2023
3987f6d
Security/EscapeOutput: add support for PHP 8.0+ match expressions [2]
jrfnl Jul 26, 2023
4ee9469
Security/EscapeOutput: add support for *::class and PHP 8.0+ $obj::class
jrfnl Jul 26, 2023
90f291c
Security/EscapeOutput: add support for examining throw statements and…
jrfnl Jul 27, 2023
b501cd9
Security/EscapeOutput: improve handling of inline expressions
jrfnl Jul 27, 2023
ad2b2a1
Security/EscapeOutput: improve handling of params in unsafe printing …
jrfnl Jul 27, 2023
8e7b9a4
Security/EscapeOutput: very minor code readability improvements [3]
jrfnl Jul 27, 2023
2f40190
Security/EscapeOutput: bug fix - sniff did not handle arrays correctly
jrfnl Jul 27, 2023
3ccc769
Security/EscapeOutput: group common token check together
jrfnl Jul 27, 2023
1689ea5
Security/EscapeOutput: improve handling of heredocs, include PHP 7.3+…
jrfnl Jul 27, 2023
2db499f
Security/EscapeOutput: improve handling of params in formatting funct…
jrfnl Jul 27, 2023
f165714
Security/EscapeOutput: special case get_search_query( false )
jrfnl Jul 28, 2023
bb0b7d6
Security/EscapeOutput: various minor docs fixes
jrfnl Jul 27, 2023
efbaa1d
Merge pull request #2326 from WordPress/feature/escapeoutput-review-p…
dingo-d Jul 28, 2023
72be374
Core: properly check formatting of function declaration statements
jrfnl Aug 10, 2023
dfc72e4
CS: fix up closure spacing to comply with new rules
jrfnl Aug 10, 2023
602d9ef
GlobalVariablesOverride: move parse error test to separate file
jrfnl Aug 11, 2023
a025c6d
Composer: make PHP extension dependencies explicit
jrfnl Jun 25, 2023
9cf9f24
Merge pull request #2330 from WordPress/feature/composer-make-extensi…
dingo-d Aug 11, 2023
306542c
Merge pull request #2328 from WordPress/feature/core-check-function-d…
GaryJones Aug 11, 2023
38c950e
Docs: remove redundant `@package` tags
jrfnl Aug 11, 2023
e17e05c
Merge pull request #2331 from WordPress/feature/docs-remove-redundant…
dingo-d Aug 12, 2023
3c04dc7
Add release checklist
jrfnl Jun 30, 2023
71d8fed
Release checklist: update for review comments
jrfnl Aug 11, 2023
e1b4418
Merge pull request #2329 from WordPress/feature/add-release-checklist
dingo-d Aug 12, 2023
f6adf52
Whitespace/ControlStructureSpacing: sync with upstream [1]
jrfnl May 31, 2022
e1ae45b
Whitespace/ControlStructureSpacing: sync with upstream [2]
jrfnl Aug 13, 2023
2b1ba78
Whitespace/ControlStructureSpacing: sync with upstream [3]
jrfnl Aug 14, 2023
c355ab9
Whitespace/ControlStructureSpacing: sync with upstream [4]
jrfnl Aug 14, 2023
e5d967e
WhiteSpace/ControlStructureSpacing: implement PHPCSUtils
jrfnl Jun 30, 2020
612b555
WhiteSpace/ControlStructureSpacing: fix/update class docblock
jrfnl May 31, 2022
2d7f396
Merge pull request #2333 from WordPress/feature/controlstructurespaci…
dingo-d Aug 14, 2023
b42e428
Docs: remove orphaned CommaAfterArrayItem docs
jrfnl Aug 15, 2023
7e9185f
Docs: remove orphaned ClassInstantiation docs
jrfnl Aug 15, 2023
09c629f
WhiteSpace/ControlStructureSpacing: add documentation
jrfnl Aug 15, 2023
9c23de6
Docs: update the sample ruleset
jrfnl Nov 26, 2022
46810c6
Merge pull request #2335 from WordPress/feature/removed-orphaned-docs
dingo-d Aug 15, 2023
9518e8e
Merge pull request #2334 from WordPress/docs/WordPress.WhiteSpace.Con…
dingo-d Aug 15, 2023
3bca142
Merge pull request #2336 from WordPress/feature/example-ruleset-update
GaryJones Aug 16, 2023
77cbc30
Code coverage: initial setup for CodeCov
jrfnl Apr 9, 2020
d3b0a0c
Utils/I18nTextDomainFixer: use PHPCSUtils in one more place
jrfnl Aug 17, 2023
248485a
WP/Capabilities: minor clean up
jrfnl Aug 17, 2023
3a398c4
DB/DirectDatabaseQuery: minor defensive coding tweak
jrfnl Aug 17, 2023
480b1af
Files/FileName: minor defensive coding tweak in test code
jrfnl Aug 17, 2023
782f8fe
DateTime/CurrentTimeTimestamp: rename some local variables
jrfnl Aug 16, 2023
29670d7
WhiteSpace/ControlStructureSpacing: minor defensive coding tweak
jrfnl Aug 17, 2023
f119d86
Docs: array properties expect arrays
jrfnl Aug 17, 2023
ba92929
Merge pull request #2338 from WordPress/feature/add-code-coverage-rec…
dingo-d Aug 17, 2023
eb8fe7e
Merge pull request #2345 from WordPress/feature/docs-public-array-pro…
GaryJones Aug 17, 2023
c3b5b2b
Merge pull request #2344 from WordPress/feature/controlstructurespaci…
GaryJones Aug 17, 2023
f401dac
Merge pull request #2343 from WordPress/feature/filename-defensive-co…
GaryJones Aug 17, 2023
23bfa84
Merge pull request #2342 from WordPress/feature/directdbquery-minor-d…
GaryJones Aug 17, 2023
4ac8ad7
Merge pull request #2341 from WordPress/feature/currenttimetimestamp-…
GaryJones Aug 17, 2023
0957f5a
Merge pull request #2340 from WordPress/feature/capabilities-minor-cl…
GaryJones Aug 17, 2023
04dba47
Merge pull request #2339 from WordPress/feature/i18ntextdomainfixer-u…
GaryJones Aug 17, 2023
fa06a59
Sniff: move "missing unslashing" handling to callback function
jrfnl Aug 17, 2023
754dfd2
README: fix codecov badge
jrfnl Aug 17, 2023
31cef73
Merge pull request #2348 from WordPress/feature/readme-fix-codecov-badge
GaryJones Aug 17, 2023
e31c0cb
Merge pull request #2347 from WordPress/feature/move-unslash-handling…
GaryJones Aug 17, 2023
315d4e0
QA/CS: various minor tweaks
jrfnl Mar 19, 2023
dcdd602
QA/CS: alphabetize import use statements
jrfnl Mar 19, 2023
1bed57e
GH Actions: fix quicktest for `develop`
jrfnl Aug 17, 2023
d180742
Issue template: minor tweaks
jrfnl Aug 17, 2023
15a790b
Changelog: update references to the Composer PHPCS plugin
jrfnl Aug 17, 2023
84cb209
Codecov config: tweak patch config
jrfnl Aug 17, 2023
21d8cae
Rename `SanitizingFunctionsTrait` to `SanitizationHelperTrait`
jrfnl Aug 18, 2023
50e1fe9
Move sanitization methods to `SanitizationHelperTrait`
jrfnl Jul 6, 2023
e72ca2c
SanitizationHelperTrait::is_sanitized(): add some defensive coding
jrfnl Aug 18, 2023
b217ebc
SanitizationHelperTrait::is_sanitized(): implement PHPCSUtils
jrfnl Jul 6, 2023
0834f59
SanitizationHelperTrait::is_sanitized(): efficiency tweak - move unse…
jrfnl Aug 18, 2023
1bf115b
SanitizationHelperTrait::is_sanitized(): efficiency fix/improve perfo…
jrfnl Aug 18, 2023
6440bed
SanitizationHelperTrait::is_sanitized(): minor code tweaks
jrfnl Aug 18, 2023
2d019df
SanitizationHelperTrait::is_sanitized(): minor doc tweaks
jrfnl Aug 18, 2023
8da663b
Merge pull request #2356 from WordPress/feature/sniff-move-is_sanitiz…
dingo-d Aug 18, 2023
f9a73b4
Merge pull request #2350 from WordPress/feature/ghactions-fix-quick-test
dingo-d Aug 18, 2023
b4975aa
Merge pull request #2351 from WordPress/feature/issue-templates-tweaks
dingo-d Aug 18, 2023
59984c3
Merge pull request #2352 from WordPress/feature/changelog-update-comp…
dingo-d Aug 18, 2023
25d2e7e
Merge pull request #2353 from WordPress/feature/codecov-tweak-config
dingo-d Aug 18, 2023
659e3d3
Various minor doc fixes
jrfnl Aug 7, 2023
2e73eba
Docs: improve test `@return` tags
jrfnl Aug 16, 2023
b0fc0c0
Docs: more `@var`/`@param`/`@return` tag improvements
jrfnl Aug 16, 2023
6a9da70
Docs: add missing `@return` tags
jrfnl Aug 17, 2023
cfecf3f
Merge pull request #2349 from WordPress/feature/various-minor-docs-fixes
dingo-d Aug 18, 2023
c24b906
Merge pull request #2354 from WordPress/feature/various-cs-fixes
dingo-d Aug 18, 2023
d6e47ab
Add PHPStan to QA checks
jrfnl Aug 17, 2023
75a78cf
Merge pull request #2355 from WordPress/feature/ghactions-add-phpstan
dingo-d Aug 18, 2023
36c2df6
Updates related to branch rename from `master` to `main`
jrfnl Nov 26, 2022
ea871fb
Make methods in traits `final`
jrfnl Jun 14, 2023
5f565a1
Merge pull request #2360 from WordPress/feature/update-references-aft…
GaryJones Aug 18, 2023
d199361
Merge pull request #2361 from WordPress/feature/helpers-final-trait-m…
GaryJones Aug 18, 2023
bd66ced
ValidationHelper: bug fix - unsetting is not validation
jrfnl Aug 18, 2023
0883596
ValidationHelper: bug fix - validation done in another scope
jrfnl Aug 18, 2023
087249d
Security/ValidatedSanitizedInput: make sure all superglobals being ex…
jrfnl Aug 18, 2023
a594136
Security/ValidatedSanitizedInput: use PHPCSUtils for superglobal dete…
jrfnl Jun 27, 2022
d2a52ce
Security/ValidatedSanitizedInput: use PHPCSUtils for superglobal dete…
jrfnl Aug 18, 2023
57db689
Security/ValidatedSanitizedInput: add extra test for PHP 7.4+ null co…
jrfnl Aug 18, 2023
6e0a6c9
Security/ValidatedSanitizedInput: add test with PHP 8.0+ match [1]
jrfnl Aug 18, 2023
be30b5e
Security/ValidatedSanitizedInput: add tests with PHP 8.0+ match [2]
jrfnl Aug 18, 2023
f69e595
Security/ValidatedSanitizedInput: make `MissingUnslash` message more …
jrfnl Aug 18, 2023
5f8fe49
Security/ValidatedSanitizedInput: make closures static
jrfnl Aug 18, 2023
8c81cc6
CS: closures not using `$this` should be static
jrfnl Aug 18, 2023
4e8f340
Merge pull request #2363 from WordPress/feature/cs-closures-should-be…
GaryJones Aug 19, 2023
1eb217b
Merge pull request #2362 from WordPress/feature/validatedsanitizedinp…
GaryJones Aug 19, 2023
0b548b9
Helpers: add type declarations whenever possible
jrfnl Apr 17, 2023
977e3f2
Sniff: remove `init()` method
jrfnl Aug 20, 2023
afbd469
Merge pull request #2365 from WordPress/feature/helpers-use-type-decl…
dingo-d Aug 20, 2023
185308a
Merge pull request #2364 from WordPress/feature/sniff-remove-init-method
dingo-d Aug 20, 2023
d3a58e9
Tests: Remove redundant placeholder function
GaryJones Aug 20, 2023
d847317
README: updates for WordPressCS 3.0.0
jrfnl Aug 20, 2023
4a33d46
CONTRIBUTING: updates for WordPressCS 3.0.0
jrfnl Aug 20, 2023
71dc238
Docs: miscellaneous changes
jrfnl Aug 17, 2023
1413982
Merge pull request #2367 from WordPress/feature/docs-update-readme-co…
dingo-d Aug 20, 2023
c2d244c
Merge pull request #2366 from WordPress/replace-non-inclsuive-test-fu…
jrfnl Aug 21, 2023
e36e0ea
Changelog for WordPressCS 3.0.0 (#2368)
jrfnl Aug 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DB/PreparedSQLPlaceholders: minor simplification
In both these cases, a "quick check" for the target function call was done prior to walking the tokens, but the token walking with a negative search for `Tokens::$emptyToken` doesn't contain the risk of walking very far, so this quick check isn't really needed and removing it shouldn't impact performance.
jrfnl committed Jul 22, 2023
commit 0f7b3ad3f1d0df0cc2f04359b13761b348ec7faf
8 changes: 0 additions & 8 deletions WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php
Original file line number Diff line number Diff line change
@@ -635,10 +635,6 @@ protected function analyse_sprintf( $sprintf_params ) {
unset( $sprintf_params[1] );

foreach ( $sprintf_params as $sprintf_param ) {
if ( strpos( strtolower( $sprintf_param['raw'] ), 'implode' ) === false ) {
continue;
}

$implode = $this->phpcsFile->findNext(
Tokens::$emptyTokens,
$sprintf_param['start'],
@@ -689,10 +685,6 @@ protected function analyse_implode( $implode_token ) {
return false;
}

if ( strpos( strtolower( $implode_params[2]['raw'] ), 'array_fill' ) === false ) {
return false;
}

$array_fill = $this->phpcsFile->findNext(
Tokens::$emptyTokens,
$implode_params[2]['start'],