Skip to content

Commit c82ed6d

Browse files
rieschlweierophinney
authored andcommitted
fix: make DependencyRewriterV1 implement DependencySolvingCapableInterface
Signed-off-by: Thomas Rieschl <[email protected]>
1 parent 9a77fda commit c82ed6d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/DependencyRewriterV1.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use function in_array;
1919
use function sprintf;
2020

21-
final class DependencyRewriterV1 extends AbstractDependencyRewriter
21+
final class DependencyRewriterV1 extends AbstractDependencyRewriter implements DependencySolvingCapableInterface
2222
{
2323
/**
2424
* Replace ZF packages present in the composer.json during install or

test/DependencyRewriterV1Test.php

+6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Composer\Plugin\PreCommandRunEvent;
2222
use Composer\Repository\RepositoryManager;
2323
use Laminas\DependencyPlugin\DependencyRewriterV1;
24+
use Laminas\DependencyPlugin\DependencySolvingCapableInterface;
2425
use PHPUnit\Framework\TestCase;
2526
use Prophecy\Argument;
2627
use Prophecy\PhpUnit\ProphecyTrait;
@@ -740,4 +741,9 @@ public function testPrePackageUpdatesPackageNameWhenReplacementExists() : void
740741
$this->assertNull($this->plugin->onPrePackageInstallOrUpdate($event->reveal()));
741742
$this->assertSame($replacementPackage, $operation->getTargetPackage());
742743
}
744+
745+
public function testRewriterImplementsDependencySolvingCapableInterface() : void
746+
{
747+
self::assertInstanceOf(DependencySolvingCapableInterface::class, $this->plugin);
748+
}
743749
}

0 commit comments

Comments
 (0)