Skip to content

Commit b2e17f7

Browse files
committed
Docs: Warn about thoughtless approving of risky changes
1 parent 73d9b54 commit b2e17f7

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

UPGRADE-4.0.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,20 @@ $ vendor/bin/ecs check --ansi src/ tests/ # old
8585
$ vendor/bin/ecs check --ansi # new
8686
```
8787

88-
### 5. Sanity check
88+
### 5. BE CAREFUL WITH SUGGESTED CHANGES! ⚠️
89+
90+
Some of the new default fixers introduced in php-coding-standard 4.0 and 4.1 suggest changes, which - if not
91+
thoughtfully reviewed - can change the code behavior. Especially changes introduced by (but not limited to!):
92+
93+
- PhpdocToPropertyTypeFixer + PropertyTypeHintSniff
94+
- PhpdocToParamTypeFixer + ParameterTypeHintSniff
95+
- PhpdocToReturnTypeFixer + ReturnTypeHintSniff
96+
97+
**Always carefully review the changes suggested by all fixers!** You may want to skip some of the checks
98+
(using `withSkip()`) in the first phase of upgrading to the new version of the coding standard
99+
or you can introduce some of the rules gradually or on a file-by-file basis.
100+
101+
### 6. Sanity check
89102
Besides running your code style checks, you can ensure all predefined checks are loaded as well, by running:
90103

91104
```sh

0 commit comments

Comments
 (0)