Skip to content

Commit fc4ac2c

Browse files
committed
AC-1482::SVC false-positive: overriding public/protected method in child class
1 parent de980df commit fc4ac2c

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

Diff for: dev/tests/Unit/Console/Command/CompareSourceCommandApiClassesTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ public static function changesDataProvider()
7777
$pathToFixtures . '/removed-method/source-code-before',
7878
$pathToFixtures . '/removed-method/source-code-after',
7979
[
80-
'Class (PATCH)',
80+
'Class (MAJOR)',
8181
'Test\Vcs\TestClass::testMethod | [public] Method has been removed. | V006'
8282
],
83-
'Patch change is detected.'
83+
'Major change is detected.'
8484
],
8585
'api-class-new-required-method-parameter' => [
8686
$pathToFixtures . '/new-required-method-parameter/source-code-before',

Diff for: dev/tests/Unit/Console/Command/HierarchyTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ public static function changesDataProvider()
4747
$pathToFixtures . '/public-method-removed-from-non-api-parent-class-extended-by-api-class/source-code-before',
4848
$pathToFixtures . '/public-method-removed-from-non-api-parent-class-extended-by-api-class/source-code-after',
4949
[
50-
'Suggested semantic versioning change: PATCH',
50+
'Suggested semantic versioning change: MAJOR',
5151
],
52-
'Patch change is detected.',
52+
'Major change is detected.',
5353
],
5454
'public-method-removed-from-non-api-trait-used-by-api-class' => [
5555
$pathToFixtures . '/public-method-removed-from-non-api-trait-used-by-api-class/source-code-before',

Diff for: src/ReportBuilder.php

-2
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ protected function makeVersionReport()
126126
// Customize severity level of some @api changes
127127
LevelMapping::setOverrides(
128128
[
129-
'V006' => Level::PATCH, // Add public method
130-
'V007' => Level::PATCH, // Add protected method
131129
'V015' => Level::PATCH, // Add public method
132130
'V016' => Level::PATCH, // Add protected method
133131
'V019' => Level::MINOR, // Add public property

0 commit comments

Comments
 (0)