Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Forbid old config filename usage #5609

Merged
merged 1 commit into from
Apr 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions UPGRADE-v3.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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