File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 11# Changelog
22All notable changes to this project will be documented in this file.
33
4+ ## 1.5.0 - UNRELEASED
5+ ### Notes
6+ The ` logical_operators ` rule is considered risky as operators ` and ` and ` && `
7+ have different precedence and in rare cases the logic of existing code could change.
8+ So to run run this new version of the configuration, you need to adjust your composer scripts like this:
9+
10+ ``` diff
11+ - "cs:check": "php-cs-fixer fix --dry-run --diff",
12+ + "cs:check": "php-cs-fixer fix --dry-run --allow-risky yes --diff",
13+ "cs:fix": "php-cs-fixer fix",
14+ ```
15+
16+ ### Added
17+ - ` logical_operators ` : Disallow ` and ` and ` or ` operator in favor of ` && ` and ` || ` .
18+
419## 1.4.0 — 2025-07-19
520### Added
621* ` no_whitespace_in_blank_line ` : Remove trailing whitespace at the end of blank lines
Original file line number Diff line number Diff line change 2323 }
2424 },
2525 "scripts" : {
26- "cs:check" : " php-cs-fixer fix --dry-run --diff" ,
26+ "cs:check" : " php-cs-fixer fix --dry-run --allow-risky yes -- diff" ,
2727 "cs:fix" : " php-cs-fixer fix" ,
2828 "lint" : " find . -name \\ *.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l"
2929 }
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ public function getRules() : array {
4141 'indentation_type ' => true ,
4242 'line_ending ' => true ,
4343 'list_syntax ' => true ,
44+ 'logical_operators ' => true ,
4445 'lowercase_cast ' => true ,
4546 'lowercase_keywords ' => true ,
4647 'method_argument_space ' => [
You can’t perform that action at this time.
0 commit comments