Skip to content

Commit

Permalink
Docs: Warn about thoughtless approving of risky changes
Browse files Browse the repository at this point in the history
  • Loading branch information
OndraM committed May 14, 2024
1 parent 73d9b54 commit b2e17f7
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion UPGRADE-4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,20 @@ $ vendor/bin/ecs check --ansi src/ tests/ # old
$ vendor/bin/ecs check --ansi # new
```

### 5. Sanity check
### 5. BE CAREFUL WITH SUGGESTED CHANGES! ⚠️

Some of the new default fixers introduced in php-coding-standard 4.0 and 4.1 suggest changes, which - if not
thoughtfully reviewed - can change the code behavior. Especially changes introduced by (but not limited to!):

- PhpdocToPropertyTypeFixer + PropertyTypeHintSniff
- PhpdocToParamTypeFixer + ParameterTypeHintSniff
- PhpdocToReturnTypeFixer + ReturnTypeHintSniff

**Always carefully review the changes suggested by all fixers!** You may want to skip some of the checks
(using `withSkip()`) in the first phase of upgrading to the new version of the coding standard
or you can introduce some of the rules gradually or on a file-by-file basis.

### 6. Sanity check
Besides running your code style checks, you can ensure all predefined checks are loaded as well, by running:

```sh
Expand Down

0 comments on commit b2e17f7

Please sign in to comment.