Skip to content

Commit ac2fd64

Browse files
Revert "SONARPHP-1607 Replace call to deprecated sonar-api method" (#1351)
1 parent 58cb759 commit ac2fd64

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

sonar-php-plugin/src/main/java/org/sonar/plugins/php/PhpPlugin.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import org.sonar.api.Plugin;
2020
import org.sonar.api.SonarProduct;
2121
import org.sonar.api.config.PropertyDefinition;
22-
import org.sonar.api.config.PropertyDefinition.ConfigScope;
22+
import org.sonar.api.resources.Qualifiers;
2323
import org.sonar.plugins.php.api.Php;
2424
import org.sonar.plugins.php.reports.phpstan.PhpStanRulesDefinition;
2525
import org.sonar.plugins.php.reports.phpstan.PhpStanSensor;
@@ -67,7 +67,7 @@ public void define(Context context) {
6767
.defaultValue(Php.DEFAULT_FILE_SUFFIXES)
6868
.name("File Suffixes")
6969
.description("List of suffixes of PHP files to analyze.")
70-
.onConfigScopes(ConfigScope.PROJECT)
70+
.onQualifiers(Qualifiers.PROJECT)
7171
.category(PHP_CATEGORY)
7272
.multiValues(true)
7373
.subCategory(GENERAL_SUBCATEGORY)
@@ -77,7 +77,7 @@ public void define(Context context) {
7777
.defaultValue(PHP_EXCLUSIONS_DEFAULT_VALUE)
7878
.name("PHP Exclusions")
7979
.description("List of file path patterns to be excluded from analysis of PHP files.")
80-
.onConfigScopes(ConfigScope.PROJECT)
80+
.onQualifiers(Qualifiers.PROJECT)
8181
.category(PHP_CATEGORY)
8282
.subCategory(GENERAL_SUBCATEGORY)
8383
.multiValues(true)
@@ -87,7 +87,7 @@ public void define(Context context) {
8787
.defaultValue(PHP_FRAMEWORK_DETECTION_DEFAULT_VALUE)
8888
.name("PHP Framework detection")
8989
.description("Enable the detection of PHP framework in analyzed file, which adapt some rules behavior.")
90-
.onConfigScopes(ConfigScope.PROJECT)
90+
.onQualifiers(Qualifiers.PROJECT)
9191
.category(PHP_CATEGORY)
9292
.subCategory(GENERAL_SUBCATEGORY)
9393
.build());
@@ -106,15 +106,15 @@ private static void addPhpUnitExtensions(Context context) {
106106
PropertyDefinition.builder(PHPUNIT_TESTS_REPORT_PATH_KEY)
107107
.name("Unit Test Report")
108108
.description("Comma-separated list of paths to PHPUnit unit test execution report files. Paths may be either absolute or relative to the project base directory.")
109-
.onConfigScopes(ConfigScope.PROJECT)
109+
.onQualifiers(Qualifiers.PROJECT)
110110
.category(PHP_CATEGORY)
111111
.multiValues(true)
112112
.subCategory(PHPUNIT_SUBCATEGORY)
113113
.build(),
114114
PropertyDefinition.builder(PHPUNIT_COVERAGE_REPORT_PATHS_KEY)
115115
.name("Coverage Reports")
116116
.description("List of PHPUnit code coverage report files. Each path can be either absolute or relative.")
117-
.onConfigScopes(ConfigScope.PROJECT)
117+
.onQualifiers(Qualifiers.PROJECT)
118118
.category(PHP_CATEGORY)
119119
.multiValues(true)
120120
.subCategory(PHPUNIT_SUBCATEGORY)
@@ -130,7 +130,7 @@ private static void addPhpStanExtensions(Context context) {
130130
.description("Paths (absolute or relative) to report files with PHPStan issues.")
131131
.category(EXTERNAL_ANALYZERS_SUBCATEGORY)
132132
.subCategory(PHP_CATEGORY)
133-
.onConfigScopes(ConfigScope.PROJECT)
133+
.onQualifiers(Qualifiers.PROJECT)
134134
.multiValues(true)
135135
.build());
136136
}
@@ -144,7 +144,7 @@ private static void addPsalmExtensions(Context context) {
144144
.description("Paths (absolute or relative) to report files with Psalm issues.")
145145
.category(EXTERNAL_ANALYZERS_SUBCATEGORY)
146146
.subCategory(PHP_CATEGORY)
147-
.onConfigScopes(ConfigScope.PROJECT)
147+
.onQualifiers(Qualifiers.PROJECT)
148148
.multiValues(true)
149149
.build());
150150
}

0 commit comments

Comments
 (0)