| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Ray\AuraSqlModule; |
||
| 6 | |||
| 7 | use Aura\Sql\ExtendedPdo; |
||
| 8 | use Aura\Sql\ExtendedPdoInterface; |
||
| 9 | use Override; |
||
| 10 | use Ray\Di\AbstractModule; |
||
| 11 | use Ray\Di\Scope; |
||
| 12 | use SensitiveParameter; |
||
|
0 ignored issues
–
show
|
|||
| 13 | |||
| 14 | final class AuraSqlMasterModule extends AbstractModule |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @phpstan-param array<string, mixed> $options |
||
| 18 | * @phpstan-param array<string, mixed> $attributes |
||
| 19 | */ |
||
| 20 | public function __construct( |
||
| 21 | private readonly string $dsn, |
||
| 22 | private readonly string $user = '', |
||
| 23 | #[SensitiveParameter] |
||
| 24 | private readonly string $password = '', |
||
| 25 | /** @var array<string, mixed> */ |
||
| 26 | private readonly array $options = [], |
||
| 27 | /** @var array<string, mixed> */ |
||
| 28 | private readonly array $attributes = [], |
||
| 29 | ?AbstractModule $module = null |
||
| 30 | ) { |
||
| 31 | parent::__construct($module); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * {@inheritDoc} |
||
| 36 | */ |
||
| 37 | #[Override] |
||
| 38 | protected function configure(): void |
||
| 39 | { |
||
| 40 | $this->bind(ExtendedPdoInterface::class)->toConstructor( |
||
| 41 | ExtendedPdo::class, |
||
| 42 | 'dsn=pdo_dsn,username=pdo_user,password=pdo_pass,options=pdo_option,attributes=pdo_attributes', |
||
| 43 | )->in(Scope::SINGLETON); |
||
| 44 | $this->bind()->annotatedWith('pdo_dsn')->toInstance($this->dsn); |
||
| 45 | $this->bind()->annotatedWith('pdo_user')->toInstance($this->user); |
||
| 46 | $this->bind()->annotatedWith('pdo_pass')->toInstance($this->password); |
||
| 47 | $this->bind()->annotatedWith('pdo_option')->toInstance($this->options); |
||
| 48 | $this->bind()->annotatedWith('pdo_attributes')->toInstance($this->attributes); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |
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