|
@@ -235,7 +235,7 @@ final class ConfigurationResolver
|
|
|
|
|
|
if (isset($deprecatedConfigs[$configFileBasename])) {
|
|
|
$message = "Configuration file `{$configFileBasename}` is deprecated, rename to `{$deprecatedConfigs[$configFileBasename]}`.";
|
|
|
- Utils::triggerDeprecation($message, InvalidConfigurationException::class);
|
|
|
+ Utils::triggerDeprecation(new InvalidConfigurationException($message));
|
|
|
}
|
|
|
|
|
|
$config = self::separatedContextLessInclude($configFile);
|
|
@@ -457,10 +457,9 @@ final class ConfigurationResolver
|
|
|
implode('", "', $progressTypes)
|
|
|
));
|
|
|
} elseif (\in_array($progressType, ['estimating', 'estimating-max', 'run-in'], true)) {
|
|
|
- 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
|
|
|
- );
|
|
|
+ Utils::triggerDeprecation(new \InvalidArgumentException(
|
|
|
+ 'Passing `estimating`, `estimating-max` or `run-in` is deprecated and will not be supported in 3.0, use `none` or `dots` instead.'
|
|
|
+ ));
|
|
|
}
|
|
|
|
|
|
$this->progress = $progressType;
|
|
@@ -798,7 +797,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)));
|
|
|
|
|
|
- Utils::triggerDeprecation("Rule \"{$fixerName}\" is deprecated{$messageEnd}");
|
|
|
+ Utils::triggerDeprecation(new \RuntimeException("Rule \"{$fixerName}\" is deprecated{$messageEnd}"));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -944,10 +943,9 @@ final class ConfigurationResolver
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- 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
|
|
|
- );
|
|
|
+ Utils::triggerDeprecation(new InvalidConfigurationException(
|
|
|
+ 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)
|
|
|
+ ));
|
|
|
|
|
|
return false;
|
|
|
}
|