bearsunday /
BEAR.QueryRepository
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace BEAR\QueryRepository\Cdn; |
||
| 6 | |||
| 7 | use BEAR\FastlyModule\FastlyPurgeModule; |
||
| 8 | use BEAR\QueryRepository\CdnCacheControlHeaderSetterInterface; |
||
| 9 | use BEAR\QueryRepository\PurgerInterface; |
||
| 10 | use LogicException; |
||
| 11 | use Override; |
||
| 12 | use Ray\Di\AbstractModule; |
||
| 13 | |||
| 14 | use function class_exists; |
||
| 15 | |||
| 16 | final class FastlyModule extends AbstractModule |
||
| 17 | { |
||
| 18 | public function __construct( |
||
| 19 | private readonly string $fastlyApiKey, |
||
| 20 | private readonly string $fastlyServiceId, |
||
| 21 | AbstractModule|null $module = null, |
||
| 22 | ) { |
||
| 23 | parent::__construct($module); |
||
| 24 | |||
| 25 | if (! class_exists(FastlyPurgeModule::class)) { |
||
| 26 | throw new LogicException('Install bear/fastly-module'); // @codeCoverageIgnore |
||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * {@inheritDoc} |
||
| 32 | */ |
||
| 33 | #[Override] |
||
| 34 | protected function configure(): void |
||
| 35 | { |
||
| 36 | $this->install(new FastlyPurgeModule($this->fastlyApiKey, $this->fastlyServiceId)); |
||
| 37 | $this->bind(CdnCacheControlHeaderSetterInterface::class)->to(FastlyCacheControlHeaderSetter::class); |
||
|
0 ignored issues
–
show
|
|||
| 38 | $this->bind(PurgerInterface::class)->to(FastlyCachePurger::class); |
||
| 39 | } |
||
| 40 | } |
||
| 41 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths