Skip to content

Commit 816fc74

Browse files
authored
Merge pull request #2758 from WordPress/feature/changelog-3.4.0
Changelog for the release of WordPressCS 3.4.0
2 parents 04244a8 + 598dab1 commit 816fc74

2 files changed

Lines changed: 97 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,94 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).
5+
This project adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).
66

77
## [Unreleased]
88

99
_No documentation available about unreleased changes as of yet._
1010

11+
## [3.4.0] - 2026-07-16
12+
13+
We're happy to welcome [@rodrigoprimo] as co-maintainer of WordPressCS as of this release.
14+
15+
### Added
16+
- `WordPress.Arrays.ArrayDeclarationSpacing`: new `allow_single_item_single_line_explicit_key_arrays` property to replace the, now deprecated, `allow_single_item_single_line_associative_arrays` property. [#2696]
17+
- End-user documentation to the following existing sniffs: `WordPress.Arrays.ArrayDeclarationSpacing` (props [@RafaelFunchal], [@mattgaldino] and [@rodrigoprimo], [#2489], [#2593], [#2682]), `WordPress.CodeAnalysis.AssignmentInTernaryCondition` (props [@Nic-Sevic] and [@rodrigoprimo], [#2488], [#2678]), `WordPress.DB.RestrictedClasses` (props [@paulgibbs] and [@rodrigoprimo], [#2455], [#2689]), `WordPress.DB.DirectDatabaseQuery` (props [@jaymcp] and [@rodrigoprimo], [#2458], [#2697]), `WordPress.DB.RestrictedFunctions` (props [@paulgibbs] and [@rodrigoprimo], [#2453], [#2676]), `WordPress.DB.SlowDBQuery` (props [@petitphp] and [@rodrigoprimo], [#2464], [#2699]), `WordPress.PHP.DevelopmentFunctions` (props [@gogdzl] and [@rodrigoprimo], [#2490], [#2690]), `WordPress.PHP.NoSilencedErrors` (props [@gogdzl] and [@rodrigoprimo], [#2495], [#2694]), `WordPress.PHP.PregQuoteDelimiter` (props [@tikifez] and [@rodrigoprimo], [#2487], [#2677]), `WordPress.PHP.RestrictedPHPFunctions` (props [@gogdzl] and [@rodrigoprimo], [#2491], [#2693]), `WordPress.Security.PluginMenuSlug` (props [@jasonkenison], [#2592]), `WordPress.WP.AlternativeFunctions` (props [@pamprn09], [@bhubbard] and [@rodrigoprimo], [#2496], [#2588], [#2687]), `WordPress.WP.DiscouragedConstants` (props [@RafaelFunchal], [@paulopmt1] and [@rodrigoprimo], [#2493], [#2589], [#2680]), `WordPress.WP.GlobalVariablesOverride` (props [@paulopmt1] and [@rodrigoprimo], [#2586], [#2679]).
18+
This documentation can be exposed via the [`PHP_CodeSniffer` `--generator=...` command-line argument](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Usage).
19+
20+
### Changed
21+
- The minimum required `PHP_CodeSniffer` version to 3.13.5 (was 3.13.4). [#2761]
22+
- The minimum required `PHPCSUtils` version to 1.2.2 (was 1.1.0). [#2761]
23+
- The default value for `minimum_wp_version`, as used by a [number of sniffs detecting usage of deprecated WP features](https://github.com/WordPress/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#various-sniffs-set-the-minimum-supported-wp-version), has been updated to `6.7`. [#2757]
24+
- `WordPress.NamingConventions.PrefixAllGlobals` has been updated to recognize pluggable functions introduced in WP up to WP 7.0.0. [#2747]
25+
- `WordPress.WP.ClassNameCase` has been updated to recognize classes introduced in WP up to WP 7.0.0. [#2747]
26+
- `WordPress.WP.DeprecatedFunctions` now detects functions deprecated in WordPress up to WP 7.0.0. [#2747]
27+
- The `ConstantsHelper::is_use_of_global_constant()` method will no longer flag a constant alias created via an import `use` statement as it were the use of a global constant. [#2579]
28+
- The `ConstantsHelper::is_in_function_call()` method will now act fully case-agnostic for the function names being checked. [#2706]
29+
Previously, the `$valid_functions` parameter would need to be passed with the function names as keys in lowercase.
30+
- `WordPress.PHP.NoSilencedErrors`: error silencing is no longer accepted for the `parse_url()` function. [#2701]
31+
- Improved the wording of the error message for `WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound`. [#2688]
32+
- Improved the wording of the error message for `WordPress.PHP.RestrictedPHPFunctions`. [#2702]
33+
- Various housekeeping, including documentation and test improvements. Includes a contribution by [@dd32].
34+
35+
### Deprecated
36+
- `WordPress.Arrays.ArrayDeclarationSpacing`: the `allow_single_item_single_line_associative_arrays` property has been deprecated in favor of the new `allow_single_item_single_line_explicit_key_arrays` property. [#2696]
37+
This is a name change only. The functionality of these properties is the same.
38+
39+
### Fixed
40+
- `WordPress.DB.PreparedSQL` and `WordPress.DB.PreparedSQLPlaceholders`: false positive for static method calls to a non-global class named `wpdb`. [#2753]
41+
- `WordPress.Security.EscapeOutput`: false positive for `get_search_query()` when the `$escaped` parameter was passed as fully qualified or non-lowercase `true`. [#2618]
42+
- `WordPress.Security.EscapeOutput`: false negative for `_deprecated_file()` calls when the `basename( __FILE__ )` pattern used non-standard casing for either `basename()` and/or `__FILE__`. [#2729]
43+
- `WordPress.WP.AlternativeFunctions`: false negative when class functions/constants/properties use the same name as select global WP constants/functions. [#2617]
44+
- `WordPress.WP.AlternativeFunctions`: false positive for fully qualified references to the global PHP stream constants \STDIN, \STDOUT, and \STDERR. [#2617]
45+
- `WordPress.WP.CronInterval`: false positive when the callback function reference used a different case than the function declaration, even though they are in the same file. [#2730]
46+
47+
[#2453]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2453
48+
[#2455]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2455
49+
[#2458]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2458
50+
[#2464]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2464
51+
[#2487]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2487
52+
[#2488]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2488
53+
[#2489]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2489
54+
[#2490]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2490
55+
[#2491]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2491
56+
[#2493]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2493
57+
[#2495]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2495
58+
[#2496]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2496
59+
[#2579]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2579
60+
[#2586]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2586
61+
[#2588]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2588
62+
[#2589]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2589
63+
[#2592]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2592
64+
[#2593]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2593
65+
[#2617]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2617
66+
[#2618]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2618
67+
[#2676]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2676
68+
[#2677]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2677
69+
[#2678]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2678
70+
[#2679]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2679
71+
[#2680]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2680
72+
[#2682]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2682
73+
[#2687]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2687
74+
[#2688]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2688
75+
[#2689]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2689
76+
[#2690]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2690
77+
[#2693]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2693
78+
[#2694]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2694
79+
[#2696]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2696
80+
[#2697]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2697
81+
[#2699]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2699
82+
[#2701]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2701
83+
[#2702]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2702
84+
[#2706]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2706
85+
[#2729]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2729
86+
[#2730]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2730
87+
[#2747]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2747
88+
[#2753]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2753
89+
[#2757]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2757
90+
[#2761]: https://github.com/WordPress/WordPress-Coding-Standards/pull/2761
91+
92+
1193
## [3.3.0] - 2025-11-25
1294

1395
### Added
@@ -1715,6 +1797,7 @@ Initial tagged release.
17151797
[PHPCompatibility]: https://github.com/PHPCompatibility/PHPCompatibility
17161798

17171799
[Unreleased]: https://github.com/WordPress/WordPress-Coding-Standards/compare/main...HEAD
1800+
[3.4.0]: https://github.com/WordPress/WordPress-Coding-Standards/compare/3.3.0...3.4.0
17181801
[3.3.0]: https://github.com/WordPress/WordPress-Coding-Standards/compare/3.2.0...3.3.0
17191802
[3.2.0]: https://github.com/WordPress/WordPress-Coding-Standards/compare/3.1.0...3.2.0
17201803
[3.1.0]: https://github.com/WordPress/WordPress-Coding-Standards/compare/3.0.1...3.1.0
@@ -1750,28 +1833,40 @@ Initial tagged release.
17501833

17511834
[@anomiex]: https://github.com/anomiex
17521835
[@aiolachiara]: https://github.com/aiolachiara
1836+
[@bhubbard]: https://github.com/bhubbard
17531837
[@Chouby]: https://github.com/Chouby
17541838
[@ckanitz]: https://github.com/ckanitz
17551839
[@craigfrancis]: https://github.com/craigfrancis
17561840
[@davidperezgar]: https://github.com/davidperezgar
17571841
[@dawidurbanski]: https://github.com/dawidurbanski
1842+
[@dd32]: https://github.com/dd32
17581843
[@desrosj]: https://github.com/desrosj
17591844
[@dingo-d]: https://github.com/dingo-d
17601845
[@fredden]: https://github.com/fredden
17611846
[@GaryJones]: https://github.com/GaryJones
1847+
[@gogdzl]: https://github.com/gogdzl
17621848
[@grappler]: https://github.com/grappler
17631849
[@Ipstenu]: https://github.com/Ipstenu
1850+
[@jasonkenison]: https://github.com/jasonkenison
17641851
[@jaymcp]: https://github.com/jaymcp
17651852
[@JDGrimes]: https://github.com/JDGrimes
17661853
[@johnjago]: https://github.com/johnjago
17671854
[@jrfnl]: https://github.com/jrfnl
17681855
[@khacoder]: https://github.com/khacoder
17691856
[@Luc45]: https://github.com/Luc45
17701857
[@marconmartins]: https://github.com/marconmartins
1858+
[@mattgaldino]: https://github.com/mattgaldino
1859+
[@Nic-Sevic]: https://github.com/Nic-Sevic
17711860
[@NielsdeBlaauw]: https://github.com/NielsdeBlaauw
1861+
[@pamprn09]: https://github.com/pamprn09
1862+
[@paulgibbs]: https://github.com/paulgibbs
1863+
[@paulopmt1]: https://github.com/paulopmt1
1864+
[@petitphp]: https://github.com/petitphp
1865+
[@RafaelFunchal]: https://github.com/RafaelFunchal
17721866
[@richardkorthuis]: https://github.com/richardkorthuis
17731867
[@rodrigoprimo]: https://github.com/rodrigoprimo
17741868
[@slaFFik]: https://github.com/slaFFik
17751869
[@sandeshjangam]: https://github.com/sandeshjangam
17761870
[@szepeviktor]: https://github.com/szepeviktor
1871+
[@tikifez]: https://github.com/tikifez
17771872
[@westonruter]: https://github.com/westonruter

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
[![Tested on PHP 7.2 to 8.5](https://img.shields.io/badge/tested%20on-PHP%207.2%20|%207.3%20|%207.4%20|%208.0%20|%208.1%20|%208.2%20|%208.3%20|%208.4%20|%208.5-green.svg?maxAge=2419200)](https://github.com/WordPress/WordPress-Coding-Standards/actions/workflows/unit-tests.yml)
1414

1515
[![License: MIT](https://img.shields.io/github/license/WordPress/WordPress-Coding-Standards)](https://github.com/WordPress/WordPress-Coding-Standards/blob/develop/LICENSE)
16-
[![Total Downloads](https://img.shields.io/packagist/dt/wp-coding-standards/wpcs
17-
)](https://packagist.org/packages/wp-coding-standards/wpcs/stats)
16+
[![Total Downloads](https://img.shields.io/packagist/dt/wp-coding-standards/wpcs)](https://packagist.org/packages/wp-coding-standards/wpcs/stats)
1817

1918
</div>
2019

0 commit comments

Comments
 (0)