Skip to content

Commit

Permalink
minor #5609 Forbid old config filename usage (keradus)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 3.0 branch.

Discussion
----------

Forbid old config filename usage

Depends on:
- [x] #5607
- [x] #5608

Commits
-------

7ba957d Forbid old config filename usage
  • Loading branch information
keradus committed Apr 13, 2021
2 parents 3ac438a + 7ba957d commit 814aac8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions UPGRADE-v3.md
Expand Up @@ -8,6 +8,8 @@ Rename of files

| 2.x | 3.0 | Description |
| ---------------- | ------------------------ | -------------------------------------- |
| `.php_cs` | `.php-cs-fixer.php` | Configuration file (local) |
| `.php_cs.dist` | `.php-cs-fixer.dist.php` | Configuration file (to be distributed) |
| `.php_cs.cache` | `.php-cs-fixer.cache` | Cache file |

CLI options
Expand Down
3 changes: 1 addition & 2 deletions src/Console/ConfigurationResolver.php
Expand Up @@ -223,8 +223,7 @@ public function getConfig(): ConfigInterface
];

if (isset($deprecatedConfigs[$configFileBasename])) {
$message = "Configuration file `{$configFileBasename}` is deprecated, rename to `{$deprecatedConfigs[$configFileBasename]}`.";
Utils::triggerDeprecation($message, InvalidConfigurationException::class);
throw new InvalidConfigurationException("Configuration file `{$configFileBasename}` is outdated, rename to `{$deprecatedConfigs[$configFileBasename]}`.");
}

$this->config = self::separatedContextLessInclude($configFile);
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixer/Basic/BracesFixerTest.php
Expand Up @@ -5423,7 +5423,7 @@ public function provideFixAlternativeSyntaxCases()
*
* @dataProvider provideFix80Cases
*/
public function testFix80($expected, $input): voild
public function testFix80($expected, $input): void
{
$this->doTest($expected, $input);
}
Expand Down

0 comments on commit 814aac8

Please sign in to comment.