Skip to content
Snippets Groups Projects
Commit 483c8862 authored by Joas Schilling's avatar Joas Schilling
Browse files

Add deprecation version to the list

parent d2fc1b23
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
......@@ -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',
];
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment