Skip to content

Commit

Permalink
trigger deprecation in fancy way
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Apr 12, 2021
1 parent 25d4306 commit 1dd9a5f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Console/ConfigurationResolver.php
Expand Up @@ -235,13 +235,7 @@ public function getConfig()

if (isset($deprecatedConfigs[$configFileBasename])) {
$message = "Configuration file `{$configFileBasename}` is deprecated, rename to `{$deprecatedConfigs[$configFileBasename]}`.";

// TODO 3.0: always throw exception
if (getenv('PHP_CS_FIXER_FUTURE_MODE')) {
throw new InvalidConfigurationException("{$message} This check was performed as `PHP_CS_FIXER_FUTURE_MODE` env var is set.");
}

@trigger_error($message, E_USER_DEPRECATED);
Utils::triggerDeprecation($message, InvalidConfigurationException::class);
}

$config = self::separatedContextLessInclude($configFile);
Expand Down

0 comments on commit 1dd9a5f

Please sign in to comment.