Add deprecation version to the list

This commit is contained in:
Joas Schilling 2015-06-15 16:08:54 +02:00
parent d2fc1b2302
commit 483c886291
2 changed files with 14 additions and 9 deletions

View file

@ -38,14 +38,19 @@ class CodeCheckVisitor extends NodeVisitorAbstract {
/**
* @param string $blackListDescription
* @param string[] $blackListedClassNames
* @param array $blackListedClassNames
* @param bool $checkEqualOperatorUsage
*/
public function __construct($blackListDescription, $blackListedClassNames, $checkEqualOperatorUsage) {
$this->blackListDescription = $blackListDescription;
$this->blackListedClassNames = [];
foreach ($blackListedClassNames as $class) {
foreach ($blackListedClassNames as $class => $blackListInfo) {
if (is_numeric($class) && is_string($blackListInfo)) {
$class = $blackListInfo;
$blackListInfo = null;
}
$class = strtolower($class);
$this->blackListedClassNames[$class] = $class;
}

View file

@ -33,12 +33,12 @@ class DeprecationCodeChecker extends CodeChecker {
protected $blackListedClassNames = [
// Deprecated classes
'OCP\IConfig',
'OCP\Contacts',
'OCP\DB',
'OCP\IHelper',
'OCP\JSON',
'OCP\Response',
'OCP\AppFramework\IApi',
'OCP\Config' => '8.0.0',
'OCP\Contacts' => '8.1.0',
'OCP\DB' => '8.1.0',
'OCP\IHelper' => '8.1.0',
'OCP\JSON' => '8.1.0',
'OCP\Response' => '8.1.0',
'OCP\AppFramework\IApi' => '8.0.0',
];
}