Skip to content

Commit

Permalink
fix: use correct event class
Browse files Browse the repository at this point in the history
  • Loading branch information
ramsey committed Jul 11, 2021
1 parent 5cd3331 commit 73a480f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Composer/DevToolsPlugin.php
Expand Up @@ -25,10 +25,10 @@
use Composer\Composer;
use Composer\Factory;
use Composer\IO\IOInterface;
use Composer\Installer\PackageEvent;
use Composer\Plugin\Capability\CommandProvider;
use Composer\Plugin\Capable;
use Composer\Plugin\PluginInterface;
use Composer\Script\Event;
use Ramsey\Dev\Tools\Composer\Command\AnalyzeCommand;
use Ramsey\Dev\Tools\Composer\Command\AnalyzePhpStanCommand;
use Ramsey\Dev\Tools\Composer\Command\AnalyzePsalmCommand;
Expand Down Expand Up @@ -72,7 +72,7 @@ class DevToolsPlugin implements

private string $repoRoot;

public static function setupBuildDirectory(Event $event, ?Filesystem $filesystem = null): void
public static function setupBuildDirectory(PackageEvent $event, ?Filesystem $filesystem = null): void
{
$filesystem = $filesystem ?? new Filesystem();

Expand Down
8 changes: 4 additions & 4 deletions tests/Composer/DevToolsPluginTest.php
Expand Up @@ -8,8 +8,8 @@
use Composer\Config;
use Composer\EventDispatcher\EventDispatcher;
use Composer\IO\IOInterface;
use Composer\Installer\PackageEvent;
use Composer\Plugin\Capability\CommandProvider;
use Composer\Script\Event;
use Mockery;
use Mockery\MockInterface;
use Ramsey\Dev\Tools\Composer\Command\BaseCommand;
Expand Down Expand Up @@ -197,7 +197,7 @@ public function testSetupBuildDirectory(): void
$io->expects()->write('<comment>Creating build/cache directory</comment>');
$io->expects()->write('<comment>Creating build/coverage directory</comment>');

$event = $this->mockery(Event::class, [
$event = $this->mockery(PackageEvent::class, [
'getIO' => $io,
]);

Expand Down Expand Up @@ -225,7 +225,7 @@ public function testSetupBuildDirectoryForCacheDirectory(): void
$io = $this->mockery(IOInterface::class);
$io->expects()->write('<comment>Creating build/cache directory</comment>');

$event = $this->mockery(Event::class, [
$event = $this->mockery(PackageEvent::class, [
'getIO' => $io,
]);

Expand All @@ -247,7 +247,7 @@ public function testSetupBuildDirectoryForCoverageDirectory(): void
$io = $this->mockery(IOInterface::class);
$io->expects()->write('<comment>Creating build/coverage directory</comment>');

$event = $this->mockery(Event::class, [
$event = $this->mockery(PackageEvent::class, [
'getIO' => $io,
]);

Expand Down

0 comments on commit 73a480f

Please sign in to comment.