|
@@ -446,13 +446,10 @@ final class ConfigurationResolver
|
|
|
implode('", "', $progressTypes)
|
|
|
));
|
|
|
} elseif (\in_array($progressType, ['estimating', 'estimating-max', 'run-in'], true)) {
|
|
|
- $message = 'Passing `estimating`, `estimating-max` or `run-in` is deprecated and will not be supported in 3.0, use `none` or `dots` instead.';
|
|
|
-
|
|
|
- if (getenv('PHP_CS_FIXER_FUTURE_MODE')) {
|
|
|
- throw new \InvalidArgumentException("{$message} This check was performed as `PHP_CS_FIXER_FUTURE_MODE` env var is set.");
|
|
|
- }
|
|
|
-
|
|
|
- @trigger_error($message, E_USER_DEPRECATED);
|
|
|
+ Utils::triggerDeprecation(
|
|
|
+ 'Passing `estimating`, `estimating-max` or `run-in` is deprecated and will not be supported in 3.0, use `none` or `dots` instead.',
|
|
|
+ \InvalidArgumentException::class
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
$this->progress = $progressType;
|
|
@@ -786,13 +783,7 @@ final class ConfigurationResolver
|
|
|
? sprintf(' and will be removed in version %d.0.', Application::getMajorVersion() + 1)
|
|
|
: sprintf('. Use %s instead.', str_replace('`', '"', Utils::naturalLanguageJoinWithBackticks($successors)));
|
|
|
|
|
|
- $message = "Rule \"{$fixerName}\" is deprecated{$messageEnd}";
|
|
|
-
|
|
|
- if (getenv('PHP_CS_FIXER_FUTURE_MODE')) {
|
|
|
- throw new \RuntimeException("{$message} This check was performed as `PHP_CS_FIXER_FUTURE_MODE` env var is set.");
|
|
|
- }
|
|
|
-
|
|
|
- @trigger_error($message, E_USER_DEPRECATED);
|
|
|
+ Utils::triggerDeprecation("Rule \"{$fixerName}\" is deprecated{$messageEnd}");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -938,13 +929,10 @@ final class ConfigurationResolver
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- $message = sprintf('Expected "yes" or "no" for option "%s", other values are deprecated and support will be removed in 3.0. Got "%s", this implicitly set the option to "false".', $optionName, $value);
|
|
|
-
|
|
|
- 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(
|
|
|
+ sprintf('Expected "yes" or "no" for option "%s", other values are deprecated and support will be removed in 3.0. Got "%s", this implicitly set the option to "false".', $optionName, $value),
|
|
|
+ InvalidConfigurationException::class
|
|
|
+ );
|
|
|
|
|
|
return false;
|
|
|
}
|