Skip to content

Commit

Permalink
Remove deprecated fixers
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawerlos committed Sep 13, 2021
1 parent a025273 commit 93ebdf7
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 799 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,8 @@
## v3.0.0
- Drop support for PHP CS Fixer v2
- Add StringableInterfaceFixer
- Remove NoUselessSprintfFixer - use "no_useless_sprintf"
- Remove OperatorLinebreakFixer - use "operator_linebreak"
- NoCommentedOutCodeFixer - do not remove URLs
- NoDuplicatedArrayKeyFixer - add option "ignore_expressions"
- NoUselessParenthesisFixer - fix expressions
Expand Down
28 changes: 1 addition & 27 deletions README.md
Expand Up @@ -3,7 +3,7 @@
[![Latest stable version](https://img.shields.io/packagist/v/kubawerlos/php-cs-fixer-custom-fixers.svg?label=current%20version)](https://packagist.org/packages/kubawerlos/php-cs-fixer-custom-fixers)
[![PHP version](https://img.shields.io/packagist/php-v/kubawerlos/php-cs-fixer-custom-fixers.svg)](https://php.net)
[![License](https://img.shields.io/github/license/kubawerlos/php-cs-fixer-custom-fixers.svg)](LICENSE)
![Tests](https://img.shields.io/badge/tests-2869-brightgreen.svg)
![Tests](https://img.shields.io/badge/tests-2678-brightgreen.svg)
[![Downloads](https://img.shields.io/packagist/dt/kubawerlos/php-cs-fixer-custom-fixers.svg)](https://packagist.org/packages/kubawerlos/php-cs-fixer-custom-fixers)

[![CI Status](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/workflows/CI/badge.svg?branch=main&event=push)](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/actions)
Expand Down Expand Up @@ -280,16 +280,6 @@ There must be no useless parentheses.
+foo($bar);
```

#### NoUselessSprintfFixer
There must be no `sprintf` calls with only the first argument.
DEPRECATED: use `no_useless_sprintf` instead.
*Risky: when the `sprintf` function is overridden.*
```diff
<?php
-$foo = sprintf('bar');
+$foo = 'bar';
```

#### NoUselessStrlenFixer
The `strlen` or` mb_strlen` functions should not be compared against 0.
*Risky: when the function `strlen` is overridden.*
Expand Down Expand Up @@ -323,22 +313,6 @@ Configuration options:
+echo 01234567; // octal
```

#### OperatorLinebreakFixer
Operators - when multiline - must always be at the beginning or at the end of the line.
DEPRECATED: use `operator_linebreak` instead.
Configuration options:
- `only_booleans` (`bool`): whether to limit operators to only boolean ones; defaults to `false`
- `position` (`'beginning'`, `'end'`): whether to place operators at the beginning or at the end of the line; defaults to `'beginning'`
```diff
<?php
function foo() {
- return $bar ||
- $baz;
+ return $bar
+ || $baz;
}
```

#### PhpUnitNoUselessReturnFixer
PHPUnit `fail`, `markTestIncomplete` and `markTestSkipped` functions should not be followed directly by return.
*Risky: when original PHPUnit methods are overwritten.*
Expand Down
74 changes: 0 additions & 74 deletions src/Fixer/NoUselessSprintfFixer.php

This file was deleted.

80 changes: 0 additions & 80 deletions src/Fixer/OperatorLinebreakFixer.php

This file was deleted.

111 changes: 0 additions & 111 deletions tests/Fixer/NoUselessSprintfFixerTest.php

This file was deleted.

0 comments on commit 93ebdf7

Please sign in to comment.