Skip to content

Commit

Permalink
Regression fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienHarper committed Dec 2, 2022
1 parent 7c1427b commit b92f19f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ parameters:
- '~Dead catch - Throwable is never thrown in the try block~'
- '~Parameter \#1 \$className of method Doctrine\\ORM\\EntityManagerInterface\:\:getClassMetadata\(\) expects class-string<object>, string given\.~'
- '~Unable to resolve the template type T in call to method Doctrine\\ORM\\EntityManagerInterface\:\:getClassMetadata\(\)~'
- '~Property DH\\Auditor\\Provider\\Doctrine\\Configuration\:\:\$(storage|auditing)Services is never read, only written\.~'
10 changes: 10 additions & 0 deletions src/Provider/Doctrine/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ class Configuration implements ConfigurationInterface

private ?array $entities = null;

private array $storageServices = [];

private array $auditingServices = [];

private bool $isViewerEnabled;

private bool $initialized = false;
Expand Down Expand Up @@ -53,6 +57,8 @@ public function __construct(array $options)
}
}

$this->storageServices = $config['storage_services'];
$this->auditingServices = $config['auditing_services'];
$this->isViewerEnabled = $config['viewer'];
$this->storageMapper = $config['storage_mapper'];
}
Expand All @@ -66,13 +72,17 @@ public function configureOptions(OptionsResolver $resolver): void
'table_suffix' => '_audit',
'ignored_columns' => [],
'entities' => [],
'storage_services' => [],
'auditing_services' => [],
'viewer' => true,
'storage_mapper' => null,
])
->setAllowedTypes('table_prefix', 'string')
->setAllowedTypes('table_suffix', 'string')
->setAllowedTypes('ignored_columns', 'array')
->setAllowedTypes('entities', 'array')
->setAllowedTypes('storage_services', 'array')
->setAllowedTypes('auditing_services', 'array')
->setAllowedTypes('viewer', 'bool')
->setAllowedTypes('storage_mapper', ['null', 'string', 'callable'])
;
Expand Down

0 comments on commit b92f19f

Please sign in to comment.