Skip to content

Commit

Permalink
fix: remove unneeded WarmUpCompatibility trait
Browse files Browse the repository at this point in the history
  • Loading branch information
romm committed Feb 16, 2024
1 parent b0a8342 commit 551dd99
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 42 deletions.
13 changes: 11 additions & 2 deletions src/Cache/MapperCacheWarmer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,22 @@
/** @internal */
final class MapperCacheWarmer implements CacheWarmerInterface
{
use WarmUpCompatibility;

public function __construct(
private ServiceProviderInterface $classesToWarmup,
private MapperBuilder $mapperBuilder
) {}

public function warmUp(string $cacheDir, string $buildDir = null): array
{
$this->mapperBuilder->warmup();

Check warning on line 21 in src/Cache/MapperCacheWarmer.php

View workflow job for this annotation

GitHub Actions / Mutation tests

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } public function warmUp(string $cacheDir, string $buildDir = null) : array { - $this->mapperBuilder->warmup(); + foreach ($this->classesToWarmup->getProvidedServices() as $class) { $this->mapperBuilder->warmup($class); }

foreach ($this->classesToWarmup->getProvidedServices() as $class) {
$this->mapperBuilder->warmup($class);
}

return [];
}

public function isOptional(): bool
{
return true;
Expand Down
40 changes: 0 additions & 40 deletions src/Cache/WarmUpCompatibility.php

This file was deleted.

0 comments on commit 551dd99

Please sign in to comment.