Skip to content

Commit

Permalink
fix: solve deprecation message regarding warm-up class
Browse files Browse the repository at this point in the history
Co-authored-by: Romain Canon <romain.hydrocanon@gmail.com>
  • Loading branch information
simPod and romm committed Feb 16, 2024
1 parent d928556 commit 2d6bba8
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;

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

View workflow job for this annotation

GitHub Actions / Mutation tests

Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ } public function isOptional() : bool { - return true; + return false; } }
Expand Down
40 changes: 0 additions & 40 deletions src/Cache/WarmUpCompatibility.php

This file was deleted.

0 comments on commit 2d6bba8

Please sign in to comment.