|
2 | 2 |
|
3 | 3 | All notable changes to this project will be documented in this file. |
4 | 4 |
|
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/). |
6 | 6 |
|
7 | 7 | ## [Unreleased] |
8 | 8 |
|
9 | 9 | _No documentation available about unreleased changes as of yet._ |
10 | 10 |
|
| 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 | + |
11 | 93 | ## [3.3.0] - 2025-11-25 |
12 | 94 |
|
13 | 95 | ### Added |
@@ -1715,6 +1797,7 @@ Initial tagged release. |
1715 | 1797 | [PHPCompatibility]: https://github.com/PHPCompatibility/PHPCompatibility |
1716 | 1798 |
|
1717 | 1799 | [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 |
1718 | 1801 | [3.3.0]: https://github.com/WordPress/WordPress-Coding-Standards/compare/3.2.0...3.3.0 |
1719 | 1802 | [3.2.0]: https://github.com/WordPress/WordPress-Coding-Standards/compare/3.1.0...3.2.0 |
1720 | 1803 | [3.1.0]: https://github.com/WordPress/WordPress-Coding-Standards/compare/3.0.1...3.1.0 |
@@ -1750,28 +1833,40 @@ Initial tagged release. |
1750 | 1833 |
|
1751 | 1834 | [@anomiex]: https://github.com/anomiex |
1752 | 1835 | [@aiolachiara]: https://github.com/aiolachiara |
| 1836 | +[@bhubbard]: https://github.com/bhubbard |
1753 | 1837 | [@Chouby]: https://github.com/Chouby |
1754 | 1838 | [@ckanitz]: https://github.com/ckanitz |
1755 | 1839 | [@craigfrancis]: https://github.com/craigfrancis |
1756 | 1840 | [@davidperezgar]: https://github.com/davidperezgar |
1757 | 1841 | [@dawidurbanski]: https://github.com/dawidurbanski |
| 1842 | +[@dd32]: https://github.com/dd32 |
1758 | 1843 | [@desrosj]: https://github.com/desrosj |
1759 | 1844 | [@dingo-d]: https://github.com/dingo-d |
1760 | 1845 | [@fredden]: https://github.com/fredden |
1761 | 1846 | [@GaryJones]: https://github.com/GaryJones |
| 1847 | +[@gogdzl]: https://github.com/gogdzl |
1762 | 1848 | [@grappler]: https://github.com/grappler |
1763 | 1849 | [@Ipstenu]: https://github.com/Ipstenu |
| 1850 | +[@jasonkenison]: https://github.com/jasonkenison |
1764 | 1851 | [@jaymcp]: https://github.com/jaymcp |
1765 | 1852 | [@JDGrimes]: https://github.com/JDGrimes |
1766 | 1853 | [@johnjago]: https://github.com/johnjago |
1767 | 1854 | [@jrfnl]: https://github.com/jrfnl |
1768 | 1855 | [@khacoder]: https://github.com/khacoder |
1769 | 1856 | [@Luc45]: https://github.com/Luc45 |
1770 | 1857 | [@marconmartins]: https://github.com/marconmartins |
| 1858 | +[@mattgaldino]: https://github.com/mattgaldino |
| 1859 | +[@Nic-Sevic]: https://github.com/Nic-Sevic |
1771 | 1860 | [@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 |
1772 | 1866 | [@richardkorthuis]: https://github.com/richardkorthuis |
1773 | 1867 | [@rodrigoprimo]: https://github.com/rodrigoprimo |
1774 | 1868 | [@slaFFik]: https://github.com/slaFFik |
1775 | 1869 | [@sandeshjangam]: https://github.com/sandeshjangam |
1776 | 1870 | [@szepeviktor]: https://github.com/szepeviktor |
| 1871 | +[@tikifez]: https://github.com/tikifez |
1777 | 1872 | [@westonruter]: https://github.com/westonruter |
0 commit comments