Conditions | 5 |
Paths | 7 |
Total Lines | 28 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function check() |
||
24 | { |
||
25 | $brokenCores = []; |
||
26 | |||
27 | if (!class_exists(Solr::class)) { |
||
28 | return [ |
||
29 | EnvironmentCheck::ERROR, |
||
30 | 'Class `' . Solr::class . '` not found. Is the fulltextsearch module installed?' |
||
31 | ]; |
||
32 | } |
||
33 | |||
34 | $service = Solr::service(); |
||
35 | foreach (Solr::get_indexes() as $index) { |
||
36 | /** @var SolrIndex $core */ |
||
37 | $core = $index->getIndexName(); |
||
38 | if (!$service->coreIsActive($core)) { |
||
39 | $brokenCores[] = $core; |
||
40 | } |
||
41 | } |
||
42 | |||
43 | if (!empty($brokenCores)) { |
||
44 | return [ |
||
45 | EnvironmentCheck::ERROR, |
||
46 | 'The following indexes are unavailable: ' . implode($brokenCores, ', ') |
||
47 | ]; |
||
48 | } |
||
49 | |||
50 | return [EnvironmentCheck::OK, 'Expected indexes are available.']; |
||
51 | } |
||
53 |
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