1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
/* |
6
|
|
|
* Copyright Humbly Arrogant Ltd 2020-2022. |
7
|
|
|
* |
8
|
|
|
* Use of this software is governed by the Business Source License included in the LICENSE file and at https://getparthenon.com/docs/next/license. |
9
|
|
|
* |
10
|
|
|
* Change Date: TBD ( 3 years after 2.0.0 release ) |
11
|
|
|
* |
12
|
|
|
* On the date above, in accordance with the Business Source License, use of this software will be governed by the open source license specified in the LICENSE file. |
13
|
|
|
*/ |
14
|
|
|
|
15
|
|
|
namespace Parthenon\DependencyInjection\Modules; |
16
|
|
|
|
17
|
|
|
use Parthenon\Health\Checks\CheckInterface; |
18
|
|
|
use Symfony\Component\Config\Definition\Builder\NodeBuilder; |
19
|
|
|
use Symfony\Component\Config\FileLocator; |
20
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
|
|
|
21
|
|
|
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; |
|
|
|
|
22
|
|
|
|
23
|
|
|
final class Health implements ModuleConfigurationInterface |
24
|
|
|
{ |
25
|
|
|
public function addConfig(NodeBuilder $nodeBuilder): void |
26
|
|
|
{ |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
public function handleDefaultParameters(ContainerBuilder $container): void |
30
|
|
|
{ |
31
|
|
|
// TODO: Implement handleDefaultParameters() method. |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
public function handleConfiguration(array $config, ContainerBuilder $container): void |
35
|
|
|
{ |
36
|
|
|
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../../Resources/config')); |
37
|
|
|
$loader->load('services/health.xml'); |
38
|
|
|
$container->registerForAutoconfiguration(CheckInterface::class)->addTag('parthenon.health.check'); |
39
|
|
|
|
40
|
|
|
$bundles = $container->getParameter('kernel.bundles'); |
41
|
|
|
|
42
|
|
|
$this->configureDoctrine($bundles, $loader); |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
private function configureDoctrine(float|array|bool|int|string|null $bundles, XmlFileLoader $loader): void |
46
|
|
|
{ |
47
|
|
|
if (isset($bundles['DoctrineBundle'])) { |
48
|
|
|
$loader->load('services/orm/health.xml'); |
49
|
|
|
} |
50
|
|
|
} |
51
|
|
|
} |
52
|
|
|
|
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