Skip to content

Commit e339c7c

Browse files
committed
[#60] Adding an interface should be a MINOR increment (not a MAJOR)
1 parent 127fa1d commit e339c7c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

docs/Ruleset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ V062 | PATCH | Class private method parameter name changed
4949

5050
Code | Level | Rule
5151
-----|-------|-------
52-
V032 | MAJOR | Interface added
52+
V032 | MINOR | Interface added
5353
V033 | MAJOR | Interface removed
5454
V034 | MAJOR | Interface method added
5555
V035 | MAJOR | Interface method removed

src/PHPSemVerChecker/Configuration/LevelMapping.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class LevelMapping
3838
'V029' => Level::PATCH,
3939
'V030' => Level::PATCH,
4040
'V031' => Level::PATCH,
41-
'V032' => Level::MAJOR,
41+
'V032' => Level::MINOR,
4242
'V033' => Level::MAJOR,
4343
'V034' => Level::MAJOR,
4444
'V035' => Level::MAJOR,

tests/PHPSemVerChecker/Analyzer/InterfaceAnalyzerTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function testCompareSimilarInterface()
2727
Assert::assertNoDifference($report);
2828
}
2929

30-
public function testVXXXInterfaceRemoved()
30+
public function testV033InterfaceRemoved()
3131
{
3232
$before = new Registry();
3333
$after = new Registry();
@@ -42,7 +42,7 @@ public function testVXXXInterfaceRemoved()
4242
$this->assertSame('tmp', $report['interface'][Level::MAJOR][0]->getTarget());
4343
}
4444

45-
public function testVXXXInterfaceAdded()
45+
public function testV032InterfaceAdded()
4646
{
4747
$before = new Registry();
4848
$after = new Registry();
@@ -52,8 +52,8 @@ public function testVXXXInterfaceAdded()
5252
$analyzer = new InterfaceAnalyzer();
5353
$report = $analyzer->analyze($before, $after);
5454

55-
Assert::assertDifference($report, 'interface', Level::MAJOR);
56-
$this->assertSame('Interface was added.', $report['interface'][Level::MAJOR][0]->getReason());
57-
$this->assertSame('tmp', $report['interface'][Level::MAJOR][0]->getTarget());
55+
Assert::assertDifference($report, 'interface', Level::MINOR);
56+
$this->assertSame('Interface was added.', $report['interface'][Level::MINOR][0]->getReason());
57+
$this->assertSame('tmp', $report['interface'][Level::MINOR][0]->getTarget());
5858
}
5959
}

0 commit comments

Comments
 (0)