Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 14, 2025

Description

This PR is intended to allow for conversation about the "press release"/mail to funders to accompany the PHP_CodeSniffer 4.0 release.

At this time, the text is just some draft notes to get the conversation started.


## 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.

## Highlights of the 4.0 release

* Root rulesets can now overrule config and CLI settings set in child rulesets.
* 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.

@@ -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!

* Root rulesets can now overrule config and CLI settings set in child rulesets.
* Ability to scan files without extension.
* 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).

* Less chance on scans failing on parse errors during live coding.
* Exit code improvements
* 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants