Skip to content

Commit ddd96ad

Browse files
Remove deprecation errors
- Move .php_cs.dist to .php-cs-fixer.dist.php - Stopped using deprecated Config::create() - removed deprecated `use_yoda_style` : this is already taken care of by `yoda_style` fixer - Updated README
1 parent 8e618ec commit ddd96ad

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

.php_cs.dist renamed to .php-cs-fixer.dist.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
use PhpCsFixer\Finder;
88

99
$finder = Finder::create()
10-
->name('.php_cs.dist') // Fix this file as well
10+
->name('.php-cs-fixer.dist.php') // Fix this file as well
1111
->in(__DIR__);
1212

1313
$overrides = [
1414
'declare_strict_types' => true,
1515
];
1616

17-
return Config::create()
17+
return (new Config())
1818
->setFinder($finder)
1919
->setRiskyAllowed(true)
2020
->setRules(Rules::getForPhp71($overrides));

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ $config->setRules(Rules::getForPhp73());
2424

2525
### New to PHP-CS-Fixer
2626

27-
Place a file named `.php_cs.dist` that has following content in your project's root directory.
27+
Place a file named `.php-cs-fixer.dist.php` that has the following content in your project's root directory.
2828

2929
```php
3030
<?php
@@ -34,10 +34,10 @@ use PhpCsFixer\Config;
3434
use PhpCsFixer\Finder;
3535

3636
$finder = Finder::create()
37-
->name('.php_cs.dist') // Fix this file as well
37+
->name('.php-cs-fixer.dist.php') // Fix this file as well
3838
->in(__DIR__);
3939

40-
return Config::create()
40+
return (new Config())
4141
->setFinder($finder)
4242
->setRiskyAllowed(true)
4343
// use specific rules for your php version e.g.: getForPhp71, getForPhp72, getForPhp73

src/PhpCsFixer/Rules.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ private static function getBaseRules(): array
7979
'increment_style' => [
8080
'style' => 'post',
8181
],
82-
'is_null' => [
83-
'use_yoda_style' => false,
84-
],
8582
'list_syntax' => [
8683
'syntax' => 'short',
8784
],

0 commit comments

Comments
 (0)