Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ words:
- maxlevel
- replacer
- Shellcheck

# Used in newsletters.
- Robbert
20 changes: 20 additions & 0 deletions newsletters/202509-phpcs-4.0-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# PRESS RELEASE
Copy link

@yvettesonneveld yvettesonneveld Sep 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# PRESS RELEASE
# PHPCS 4.0 is now available - Thanks to your support!


## Highlights of the 4.0 release

* Root rulesets can now overrule config and CLI settings set in child rulesets.
Copy link

@yvettesonneveld yvettesonneveld Sep 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Root rulesets can now overrule config and CLI settings set in child rulesets.
### Root rulesets can now overrule config and CLI settings set in child rulesets.
<config> directives set in the "root" ruleset are now prioritized over directives in included rulesets. Reminder: When two included rulesets at the same nesting level both set the same directive, the value from the last included ruleset gets prioritized. This has not changed.

* Ability to scan files without extension.
Copy link

@yvettesonneveld yvettesonneveld Sep 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Ability to scan files without extension.
### Scanning files without extension.
Files without extensions are no longer ignored. That is, if users explicitly pass them on the command line or specify them in a ruleset. When users scan directories recursively, however, files without extensions will still be ignored.

* Less chance on scans failing on parse errors during live coding.
* Exit code improvements
Copy link

@yvettesonneveld yvettesonneveld Sep 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Exit code improvements
### Automatically exit with exit code 0
If no issues were found or remain after fixing, both PHPCS and PHPCBF now exit with code 0. Users who prefer for non auto-fixables to be ignored for the exit code determination can now set the new ignore_non_auto_fixable_on_exit config flag to 1.
For full details on the new exit codes, check the ["Advanced Usage"] Wiki page at (https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Advanced-Usage#understanding-the-exit-codes).

* Proper separation of output between STDOUT and STDERR.
Piping output to STDOUT will no longer contain progress information or error notices

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Piping output to STDOUT will no longer contain progress information or error notices
As per POSIX standards (https://en.wikipedia.org/wiki/Standard_streams#Standard_error_.28stderr.29), all status, debug, and progress output is now directed to STDERR instead of STDOUT. Only report output is now directed to STDOUT. Piping output to STDOUT will no longer contain progress information or error notices. As a result, timing and memory consumption stats will now be displayed more often.

* Array properties set in a ruleset file can now extend a potential default value for the property.


Other note worthy improvements from the past few months
* Permalinks to XSD schema
* The documentation Wiki is now publicly editable.


<!-- MAYBE, but probably not appropriate for the release mail, maybe better to move this to the "2 year after take-over" mail Dec 1st -->
We'd also like to commemorate Robbert Müller, co-maintainer of the PHP_CodeSniffer Composer Installer plugin, who passed away at the age of 46 this July.
Loading