Skip to content

Commit 6cca708

Browse files
committed
Allow configuring AbstractApi
1 parent 3c788ce commit 6cca708

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

DependencyInjection/Configuration.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@ public function getConfigTreeBuilder()
5959
->end()
6060
->arrayNode('providers')
6161
->children()
62+
->arrayNode('abstract_api')
63+
->children()
64+
->integerNode('priority')->defaultValue(0)->end()
65+
->scalarNode('api_key')
66+
->treatFalseLike(null)
67+
->treatTrueLike(null)
68+
->isRequired()
69+
->cannotBeEmpty()
70+
->end()
71+
->end()
72+
->end()
6273
->arrayNode('fixer')
6374
->children()
6475
->integerNode('priority')->defaultValue(0)->end()

Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ public function testInvalidCacheConfig(array $cache): void
115115
public function provideValidProvidersConfigs(): array
116116
{
117117
return [
118+
[['abstract_api' => ['api_key' => 'any']]],
118119
[['central_bank_of_czech_republic' => null]],
119120
[['central_bank_of_republic_turkey' => []]],
120121
[['european_central_bank' => null]],

0 commit comments

Comments
 (0)