Skip to content

Commit 93ebdf7

Browse files
authored
Remove deprecated fixers
1 parent a025273 commit 93ebdf7

File tree

6 files changed

+3
-799
lines changed

6 files changed

+3
-799
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## v3.0.0
44
- Drop support for PHP CS Fixer v2
55
- Add StringableInterfaceFixer
6+
- Remove NoUselessSprintfFixer - use "no_useless_sprintf"
7+
- Remove OperatorLinebreakFixer - use "operator_linebreak"
68
- NoCommentedOutCodeFixer - do not remove URLs
79
- NoDuplicatedArrayKeyFixer - add option "ignore_expressions"
810
- NoUselessParenthesisFixer - fix expressions

README.md

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![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)
44
[![PHP version](https://img.shields.io/packagist/php-v/kubawerlos/php-cs-fixer-custom-fixers.svg)](https://php.net)
55
[![License](https://img.shields.io/github/license/kubawerlos/php-cs-fixer-custom-fixers.svg)](LICENSE)
6-
![Tests](https://img.shields.io/badge/tests-2869-brightgreen.svg)
6+
![Tests](https://img.shields.io/badge/tests-2678-brightgreen.svg)
77
[![Downloads](https://img.shields.io/packagist/dt/kubawerlos/php-cs-fixer-custom-fixers.svg)](https://packagist.org/packages/kubawerlos/php-cs-fixer-custom-fixers)
88

99
[![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)
@@ -280,16 +280,6 @@ There must be no useless parentheses.
280280
+foo($bar);
281281
```
282282

283-
#### NoUselessSprintfFixer
284-
There must be no `sprintf` calls with only the first argument.
285-
DEPRECATED: use `no_useless_sprintf` instead.
286-
*Risky: when the `sprintf` function is overridden.*
287-
```diff
288-
<?php
289-
-$foo = sprintf('bar');
290-
+$foo = 'bar';
291-
```
292-
293283
#### NoUselessStrlenFixer
294284
The `strlen` or` mb_strlen` functions should not be compared against 0.
295285
*Risky: when the function `strlen` is overridden.*
@@ -323,22 +313,6 @@ Configuration options:
323313
+echo 01234567; // octal
324314
```
325315

326-
#### OperatorLinebreakFixer
327-
Operators - when multiline - must always be at the beginning or at the end of the line.
328-
DEPRECATED: use `operator_linebreak` instead.
329-
Configuration options:
330-
- `only_booleans` (`bool`): whether to limit operators to only boolean ones; defaults to `false`
331-
- `position` (`'beginning'`, `'end'`): whether to place operators at the beginning or at the end of the line; defaults to `'beginning'`
332-
```diff
333-
<?php
334-
function foo() {
335-
- return $bar ||
336-
- $baz;
337-
+ return $bar
338-
+ || $baz;
339-
}
340-
```
341-
342316
#### PhpUnitNoUselessReturnFixer
343317
PHPUnit `fail`, `markTestIncomplete` and `markTestSkipped` functions should not be followed directly by return.
344318
*Risky: when original PHPUnit methods are overwritten.*

src/Fixer/NoUselessSprintfFixer.php

Lines changed: 0 additions & 74 deletions
This file was deleted.

src/Fixer/OperatorLinebreakFixer.php

Lines changed: 0 additions & 80 deletions
This file was deleted.

tests/Fixer/NoUselessSprintfFixerTest.php

Lines changed: 0 additions & 111 deletions
This file was deleted.

0 commit comments

Comments
 (0)